
Zitat von
magic33
scheint keiner da zusein der helfen kann
bin in anderem forum fündig geworden
also das mit den ports ist HARDWAREMÄSSIG gerefelt
siehe pinconfig im datenblatt des µC
port b3 ist oc1b
mal weiterprobieren
ICH HABS ISR ises zwar nicht aber es läuft autonom auf ocr1b
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
Lesezeichen