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

sending data to serial port

I am interfacing an led with via serial port. I have set up the serial port already.

I have a display with these specification parameters: baudrate:2400 data:8 bits end code:1bit

I am trying to display the test code which comes in the following format:
"10"+"01H"+"0FFH"

I tried printf but didn't work:
printf("10"+"0x01"+"0x0FF");
Any suggestions??

10x

Parents
  • sorry for that missed some details in my prev post:

    I am interfacing 8051 to an LED display module.

    "I am trying to display the test code which comes in the following format:
    "10"+"01H"+"0FFH"

    What i mean is that according to the display's protocol the format to display its test code is:
    "10"+"01H"+"0FFH"

    "10":Leading code
    "01H":testing code
    "0FFH":end code

    if i were using assembly to write to serial port i would use MOV SBUF,#B;

    to write to serial port using C u use putchar() but thats for a single character only right? My question is what do i do for the test code format above??

Reply
  • sorry for that missed some details in my prev post:

    I am interfacing 8051 to an LED display module.

    "I am trying to display the test code which comes in the following format:
    "10"+"01H"+"0FFH"

    What i mean is that according to the display's protocol the format to display its test code is:
    "10"+"01H"+"0FFH"

    "10":Leading code
    "01H":testing code
    "0FFH":end code

    if i were using assembly to write to serial port i would use MOV SBUF,#B;

    to write to serial port using C u use putchar() but thats for a single character only right? My question is what do i do for the test code format above??

Children