Gast
#334466
Hallo, Ich wollte an meinem Mega 8 ein PWM signal ausgeben um es dann in eine ANalog Spannung umzuwandeln. Nach nach Aplication Note AVR130 sollte das so gehen: ldi r16,0x94 Out Tccr2 , R16 ' 8 bit PWM non-inverted (Fck/510) ldi r16,0x80 Out Ocr2 , R16 ' Set compare value/duty cycle ratio ldi r16,0xFF Out Ddrb , R16 ' Set PD7/OC2 and low nibble Port b as output Mit einem Multimeter ist die Spannung an Pin B3 aber immer 0 V. Sollte aber doch bei einem DutyCycle von 50% bei 2.5V liegen. Was stimmt nicht?