I dunno how to program this timer. I have a ATMEL T89C51RD2 Microcontroller have 2 mode for internal timing (1)40Mhz for standard mode(default) (2)and 20Mhz in X2 Mode. However, I am using a 16Mhz as an exertnal frequency. Problem (1)I need to program a one second timer. How to do it???? Help!!
hi, no way. The longest possible interval is about 49ms: 1/(16000000/12/65536). Moreover, I suggested you to use the same clock mode for both the core and timers to avoid any sync. problems (read the errata). So if the core and timers use X2 mode then the longest possible interval is 1/(16000000/6/65536) ~= 25ms. Indeed, you may create ticks' counter with software and just collect defined number of timer's ticks to get 1s. intervals. Regards, Oleg
btw, T89C51RD2 is not C251 product. Regards, Oleg