$regfile "ATtiny2313.dat"
$crystal = 8000000
$hwstack = 32
$swstack = 32
$framesize = 24
'************************************************* *****************************
Config Portb.3 = Output
Config Portb.4 = Output
Config Timer1 = Pwm , Pwm = 8 , Compare A Pwm = Clear Up , Compare B Pwm = Clear Up , Prescale = 1
Dim Schleife As Integer
'************************************************* *****************************
Do
For Schleife = 100 To 250 Step 5
Compare1a = Schleife
Compare1b = 350 - Schleife
Waitms 10
Next Schleife
For Schleife = 250 To 100 Step -5
Compare1a = Schleife
Compare1b = 350 - Schleife
Waitms 10
Next Schleife
Loop
End
Lesezeichen