Gast
#6885196
Hallo,
ich versuche eine Totzeit beim Attiny25
am Port OCR1B zu programmieren.
Die PWM funktioniert, aber die Totzeit ist nicht da?
Was ist falsch?
anbei Ausschnitt Quellcode
ldi temp, (1<<PLLE) ; Enable PLL
out PLLCSR, temp
waitPLL:
in temp, PLLCSR ; Wait for PLL 100ms)
sbrs temp,PLOCK
rjmp waitPLL
in temp, PLLCSR ; Set PLL as PWM clock source 64Mhz
ldi temp1,(1<<PCKE)
or temp,temp1
out PLLCSR,temp
ldi temp,(1<<CS12)|(1<<CS10); 30 kHz Takt
out TCCR1,temp
ldi temp,(1<<PWM1B)|(1<<COM1B0) ;Port B3 Comparator
out GTCCR,temp
ldi temp1,3 ;Deadtime Teiler 8x
out DTPS1,temp
ldi temp1,255 ;Deadtime B Comparator Max
out DT1B,temp