Witam mam problem z programem sterownika pwm na atmega8
to jest ten program:
wyskakuje error w tym:
Zmieniałem kolejność tego lecz to nie pomogło. Program pochodzi z książki pana Marcina Wiązania.
to jest ten program:
$regfile = "m8def.dat"
$crystal = 8000000
Config Pinb.4 = Input
Config Pinb.2 = Input
Config Pinb.1 = Output
Config Timer1 = Pwm , Pwm = 8 ,
Compare A Pwm = Clear Down ,
Compare A Pwm = Disconnect ,
Prescale = 64
Dim I As Byte
S1 Alias Pinb.4
S2 Alias Pinb.2
Set Portb.4
Set Portb.2
Pwm1a = 0
Do
If S1 = 0 Then
Waitms 25
If S1 = 0 Then
Incr I
If I = 0 Then
I = 255
End If
Pwm1a = I
Waitms 20
End If
If S2 = 0 Then
Waitms 25
If S2 = 0 Then
Decr I
If I = 255 Then
I = 0
End If
Pwm1a = I
Waitms 20
End If
Loop
End
wyskakuje error w tym:
Compare A Pwm = Clear Down ,
Compare A Pwm = Disconnect ,
Zmieniałem kolejność tego lecz to nie pomogło. Program pochodzi z książki pana Marcina Wiązania.
