View previous topic :: View next topic |
Author |
Message |
bcs99
Joined: 22 Nov 2003 Posts: 32
|
different baud rates on hardware uart |
Posted: Wed Jan 14, 2004 4:17 pm |
|
|
I have a display that transmits at 19200 and has no need to receive and a GPS that receives at 4800 and has no need to transmit. Is it possible to use the hardware usart with Tx at 19200 and the Rx at 4800 at the same time?
Bob |
|
|
bcs99
Joined: 22 Nov 2003 Posts: 32
|
correction |
Posted: Wed Jan 14, 2004 4:18 pm |
|
|
That should be that - I want to transmit at 19200 to the display and receive at 4800 from the GPS.
Bob |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Wed Jan 14, 2004 4:59 pm |
|
|
You can use the function SET_UART_SPEED(baud, [stream]) to change the baud rate on the fly. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Wed Jan 14, 2004 7:19 pm |
|
|
But you cannot send and receive at the same time with different baud rates. |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Wed Jan 14, 2004 8:15 pm |
|
|
Yes. What you have to do is to set the baud rate and send, then switch the baud rate and receive. Shouldn't be difficult to manage. |
|
|
|