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
  • test code which comes in the following format:
    "10"+"01H"+"0FFH"

    No, it doesn't, because that's no format. It's gibberish. You apparently ripped a possibly useful description out of its context so thoroughly that there's nothing useful left for anybody to work with. What do you mean by '+'? What are all those "quotes" doing there, and what's the difference between values with a trailing 'H' and those without it?

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

    And what on earth would #B have to do with "10"+"01H"+"0FFH"?

Reply
  • test code which comes in the following format:
    "10"+"01H"+"0FFH"

    No, it doesn't, because that's no format. It's gibberish. You apparently ripped a possibly useful description out of its context so thoroughly that there's nothing useful left for anybody to work with. What do you mean by '+'? What are all those "quotes" doing there, and what's the difference between values with a trailing 'H' and those without it?

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

    And what on earth would #B have to do with "10"+"01H"+"0FFH"?

Children