Používam 8bit č/č. Incializujem ho takto
Kód: Vybrat vše
TCCR0|=(1<<WGM01)|(1<<COM01)|(1<<CS00);
DDRB|=(1<<PB3);
OC0-PB3 mám pripojený na malý reproduktor
Moderátor: Moderátoři
Kód: Vybrat vše
TCCR0|=(1<<WGM01)|(1<<COM01)|(1<<CS00);
DDRB|=(1<<PB3);
Kód: Vybrat vše
_delay_loop_2() accepts an argument from 1 up to 65536. It will delay for (4 * argument) cycles plus register set-up time. Delays of approximately 4 up to 262144 cycles, in 4 cycle granularity, are possible using this function.