Sep 29, 2006 #1 S saurav_sdpl Full Member level 3 Joined Sep 29, 2006 Messages 185 Helped 4 Reputation 8 Reaction score 2 Trophy points 1,298 Activity points 2,522 I want to achieve serial comm using at89c52, timer 2, and use timer0 & i for frequency counting. Plz help me with sample code urgently saurav[/code]
I want to achieve serial comm using at89c52, timer 2, and use timer0 & i for frequency counting. Plz help me with sample code urgently saurav[/code]
Sep 29, 2006 #2 C CMOS Advanced Member level 3 Joined Jan 6, 2004 Messages 862 Helped 94 Reputation 186 Reaction score 50 Trophy points 1,308 Location USA Activity points 5,673 Re: at89c52 Everything is given in the datasheet. Read it carefully especially Timer-2 section. Anyways this is what you need to do Load RCAP2H and RCAP2L with proper count Set RCLK+TCLK = 1 and TR2 = 1 in T2CON Read Page 10 of datasheet if you have any problem.
Re: at89c52 Everything is given in the datasheet. Read it carefully especially Timer-2 section. Anyways this is what you need to do Load RCAP2H and RCAP2L with proper count Set RCLK+TCLK = 1 and TR2 = 1 in T2CON Read Page 10 of datasheet if you have any problem.
Sep 29, 2006 #3 dipal_z Full Member level 5 Joined Apr 21, 2005 Messages 278 Helped 37 Reputation 74 Reaction score 7 Trophy points 1,298 Location India Activity points 3,008 at89c52 You can find the example source code @ http://www.atmel.com/dyn/products/tools.asp?family_id=604 Check out "C51 UART Mode1 Timer2" on this page.
at89c52 You can find the example source code @ http://www.atmel.com/dyn/products/tools.asp?family_id=604 Check out "C51 UART Mode1 Timer2" on this page.