This application note provides the source for a 100 Hz timer tick with a 11.0592 MHz oscillator.
I understand all the code, but can't understand how to define the timer count costant.
The code is:
#define TIMER0_COUNT 0xDC11 /* 10000h - ((11,059,200 Hz / (12 * FREQ)) - 17) */
Where does those "12" and "17" comes out from?
I'm using a Winbond 8051 core micro and there is no clue on the data sheet of that constant, it just says that in mode 1 the timer is a 16 bit counter/timer increased by negative edge of the clock.
Could someone point me on the right direction? Thanks in advance.
View all questions in Keil forum