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 set Uart2 ?

Please tell me how to use Uart2 to exchange data?

I Use C51 development and ST uPSD3234A chip.

Parents
  • Here is what I would do:

    TI2=0;         //Just in case TI2 has been set..
    for (i=48; i<58; i++) 
    {
       SBUF2=i;    //Not sure if SBUF2 is the right
                   //symbol name. Could be S2BUF?
       while(!TI2) //TI2 will be set by hardware
       {           //upon completion of one byte
       }
       TI2=0;
    }
    
    
    If this works, you may want to focus on that putchar() function.

Reply
  • Here is what I would do:

    TI2=0;         //Just in case TI2 has been set..
    for (i=48; i<58; i++) 
    {
       SBUF2=i;    //Not sure if SBUF2 is the right
                   //symbol name. Could be S2BUF?
       while(!TI2) //TI2 will be set by hardware
       {           //upon completion of one byte
       }
       TI2=0;
    }
    
    
    If this works, you may want to focus on that putchar() function.

Children