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
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"?
Mov SBUF,#B is just an example of how one can write to a serial port using assembly it has nothing to do with "10"+"01H"+"0FFH".
My difficulty lies in how to send information to serial port using C.
Can I in anyway upload the protocol pdf file for u to clearly see what i mean?
As I said to you initially, you need to start with a 'C' textbook.
There are some suggestions here: http://www.keil.com/books/ www.8052.com/books.phtml
Then you need to study the Keil manuals, and take a look at the Keil example for using printf on the 8051: http://www.keil.com/support/man/docs/uv3/uv3_ex_hello.htm
No, but you could provide a link to it.
But it certainly sounds like you should lay this aside for a while, and first spend some time learning the basics of 'C', and then then specifics of Keil C51 for the 8051.
You need to lay the foundations before you start building!
Hi Andy,
10x for advice I will have a look at the links u sent me.
Unfortunately the protocol was sent to me by the manufacturer in pdf format via email got no link for it.
If you don't understand the protocol, then you need to ask the manufacturer about that - especially as you are already in email contact with them!
If you can't clearly explain here what you need to send to the display, how are you going to be able to implement that in any programming language?!
"the protocol was sent to me by the manufacturer in pdf format via email"
What manufacturer? Don't they have a website? What is the full part number of the display you're using?
This is the model:M500N-7X80RG2. Below is a link to the user manual for PC and remote operations:
www.batteryspace.com/.../User Manual.pdf
Andy,is it possible to send u the protocol via email pls? If its a problem for u dw about it.
"Andy, is it possible to send u the protocol via email pls?"
If you want private consultancy on this, you'll have to pay for it.
Given that the protocol is not published, and has only been sent to you privately by email, are you sure that you are entitled to pass it on to any 3rd parties?
You might like to try getting something like this: www.hhdsoftware.com/.../serial-monitor-lite.html (many similar products are available - including free ones)
That will let you monitor exactly what the PC software is sending to the display. That should help you to understand the protocol...
You seem to have two problems here:
1. Learning the 'C' programming language;
2. Understanding the display protocol.
I suggest that you don't try to tackle them both at the same time - lay one aside until you've mastered the other.