da niemand antwortet geb ioch mir halt selbst antwort
hier ne lösung
Code:'///////////////////////////////////////////////////////// '/// Bascom ISP Programmer TEST timer1 /// '/// toggle portb.3 '///////////////////////////////////////////////////////// $regfile = "AT26def.dat" ' used device $crystal = 8000000 $hwstack = 32 ' default use 32 $swstack = 10 'default use 10 for $framesize = 40 'default use 40 for Config Portb = Output Led Alias Portb.0 Tccr1a = 17 'toggle ocr1b in pwm mode Tccr1b = 135 'clock PRESCALE 64 ctc1 an relod nach compare b/c Ocr1b = 125 'vorlasen servo mitte Ocr1c = 255 'compare zahl Enable Interrupts Do Wait 2 '' ' ' ' ' ' ' ' ' ' Toggle Led Ocr1b = 192 '0,5ms servo links Wait 2 Toggle Led Ocr1b = 63 '1,5ms servo rechts Loop End 'pulsbreite 2ms





Zitieren
Lesezeichen