Pulse
Width Modulated waveform using Timer/Counter0
The bits of the two control registers TCCR0 and OCR0 are manipulated
to generate the PWM. PB3 should be set as output by setting the
corresponding bit in DDRB
setReg(DDRB,
8) # set PB3 as output
WGM01=3
WGM00=6
COM01=5
setReg( TCCR0 , (1 << WGM01) | (1 << WGM00) | (1 <<
COM01) | 1)
setReg(OCR0 , 64)