 |
Discussion Forum |
 |
|
|
How to switch b/w UARTS in C8051F120
Next Thread | Thread List | Previous Thread
Start a Thread | Settings
| Details |
Message |
|
Read-Only
Author Rajesh N
Posted 31-Jan-2007 09:11 GMT
Toolset C51
|
 How to switch b/w UARTS in C8051F120
Rajesh N
Hi frnds,
I am using C8051F120, where I want to switch between 2 UARTS, Plz
let me know how can we program to switch over two UARTS when it is
needed? can we use common Timer1 as for Baudrate
genration??
Rajesh
|
|
|
Read-Only
Author Andy Neil
Posted 31-Jan-2007 11:32 GMT
Toolset C51
|
 RE: How to switch b/w UARTS in C8051F120
Andy Neil
Each UART has its own set of SFRs - so you just pick the
appropriate set!
if( use_uart_1 )
{
// Use the SFRs for UART1
}
else
{
// Use the SFRs for UART2
}
"can we use common Timer1 as for Baudrate genration??"
The Datasheet will tell you that!
|
|
|
Read-Only
Author erik malund
Posted 31-Jan-2007 13:56 GMT
Toolset C51
|
 explanation needed
erik malund
presumably UART0 is connected to device a and UART1 is connected
to device b.
so you feed UART0 with data for device a and feed UART1 with data
for device b
whare is a switch in that picture??
Erik
|
|
Next Thread | Thread List | Previous Thread
Start a Thread | Settings
|
|
|