Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to switch b/w UARTS in C8051F120

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

Parents
  • 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!

Reply
  • 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!

Children