cancel
Showing results for 
Search instead for 
Did you mean: 

Using Timer's with UART's

bbbodekar
Associate II
Posted on December 09, 2003 at 08:52

Using Timer's with UART's

4 REPLIES 4
bbbodekar
Associate II
Posted on May 17, 2011 at 11:56

Hello All,

I am using DK3200 dev. kit with 3234A chip on it. The platform has 2 serial ports, the baud rates of which are controlled by the timer values.

I want to know wether it is possible to use both the serial UART's with different baud rates? If yes then how does the controller come to know which timer is for which UART.

E.g. there are 2 timers which can be used to generate baud rates, time1 and timer2. So can i use Timer1 to generate a baud rate of 2400baud for UART0 and timer2 to generate 9600 for UART2 ?

Or is it possible in some other configuration like timer1 with UART1 and timer2 with UART0?

Kindly let me your comments.

Bhushan.

jdaniel
Associate II
Posted on May 17, 2011 at 11:56

Bhushan,

Yes... it's possible to do exactly what you're saying... using T1 for one baud rate and T2 for the other. Additionally, you can switch them on the fly in software if you like. Take a look at the definition of bits TCLK and RCLK in the T2CON register. These set the source for the baud rate of UART1. If TCLK and RCLK = 1, UART1 gets its baud rate from T2 rollovers. If they are 0, UART1 gets its baud rate from T1 rollovers.

For UART2, the equivalent bits are RCLK1 and TCLK1 in the PCON register. These behave the same for UART2 as the above bits for UART1.

Hope that helps.

Best Regards,

pHaze426
bbbodekar
Associate II
Posted on May 17, 2011 at 11:56

Hello phaze426,

Thanks for the reply. It should solve the problem I was facing. I will let you know if I still have problem with that.

Regards,

Bhushan.

florent_brunel
Associate II
Posted on May 17, 2011 at 11:56

hello! i have to realise a connection between a pc and dk3200 kit.the project is:

when you touch the button on the kit, we have to see it on the computer and when we command from the pc, a LED should have to shine.

someone can help me to realise the program because i don't know how to do?

thank you very much