Skip to main content
Visitor II
May 28, 2006
Question

UART1

  • May 28, 2006
  • 2 replies
  • 719 views
Posted on May 28, 2006 at 22:21

UART1

    This topic has been closed for replies.

    2 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:09

    Hi Everybody,

    I am using the two UARTs in my aplication. I manage to operate UART0 and partly of UART1, I can send data from UART0 to UART1 but I can't send from UART1 to UART0. I am using timer2 for the baud rate(for both of them). I think that UART1 interrupt service routine is not working when I send data(It works with polling).

    My UART1 configuration is:

    PCON = 0x3C;

    SCON1 =0x50;

    P1SFS0 |= 0x0C;

    P1SFS1 &= 0xF3;

    IPA |= 0x10;

    IEA |= 0x10;

    Do I miss something? If anyone have good Init of UART1 I will be glad to receive it.

    Thanks

    KH

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:09

    That is because you forget to enable UART0 receive. You neeed to add the statement

    SCON0 = 0x50; to your program.

    han-way huang