CMOS
Advanced Member level 3
Hi,
In one of my 89C51RD2 programs, I am using Timer-2 to generate 100µS delay. I used the following formula to calculate values for RCAP2H and RCAP2L register. 89C51RD2 is used in 12-clock mode and Timer-2 is in mode-0 i.e 16-bit auto-reload mode.
RCAP2H,RCAP2L = 65536 - ((Fosc. * delay) / 12)
I want to confirm whether this formula is correct for Timer-2 or not since no formula for "timer" mode is given in the datasheet.
In one of my 89C51RD2 programs, I am using Timer-2 to generate 100µS delay. I used the following formula to calculate values for RCAP2H and RCAP2L register. 89C51RD2 is used in 12-clock mode and Timer-2 is in mode-0 i.e 16-bit auto-reload mode.
RCAP2H,RCAP2L = 65536 - ((Fosc. * delay) / 12)
I want to confirm whether this formula is correct for Timer-2 or not since no formula for "timer" mode is given in the datasheet.