I've used on the ATmega8 the 8 bit fast pwm feature before. It was really simple, I just had to go
OCR2 = 200;
for example and then the output port OC2 would start PWM.
I'm trying to do the same with the 16 bit PWM now, but its not working. I've been looking at this for a few hours now and have decided that I'm stuck. Please help if you can.
TCCR1A |= (1 << COM1A1) | ( 1 << COM1B1 ) ; //set both to non inverting mode TCCR1A |= (1 << WGM11); TCCR1B |= (1 << WGM13) | (1 << WGM12) ; ICR1 = 65535;
I did ICR1 = 65535; because from the data sheet it seemed that this would be necessary to make it a 16 bit PWM channel, i.e. the values would go from 0-65535.
that is how I set up my PWM
and I'm just trying to do
OCR1A = 60000; OCR1B = 60000;
OCR1AH = (60000 >> 8); OCR1AL = 60000;
but that didnt work
When I probe the OC1 A&B channels on the breadboard, I never read a voltage.