Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
3d1a1f392e |
2
timer.c
2
timer.c
@ -46,7 +46,7 @@ void timer_init(void)
|
|||||||
// ==> let timer count to 77 to get (almost) 1kHz frequency
|
// ==> let timer count to 77 to get (almost) 1kHz frequency
|
||||||
// therefore:
|
// therefore:
|
||||||
// - Set Timer/Counter0 prescaler to 256 ==> (1<<CS02)
|
// - Set Timer/Counter0 prescaler to 256 ==> (1<<CS02)
|
||||||
// - Set OCR2 to 77
|
// - Set OCR0 to 77
|
||||||
// - CTC ( i.e. clear counter, when COUNTER == OCR0A) ==> (1<<WGM01)
|
// - CTC ( i.e. clear counter, when COUNTER == OCR0A) ==> (1<<WGM01)
|
||||||
// unfortunately, due to the 20MHz and the coarse prescaler dividers
|
// unfortunately, due to the 20MHz and the coarse prescaler dividers
|
||||||
// provided, we can't get any closer to the desired frequency of
|
// provided, we can't get any closer to the desired frequency of
|
||||||
|
Loading…
Reference in New Issue
Block a user