Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/29/00 06:01
Read: times


 
#2000 - RE: serial communication
> is it possible to get binary or hex
> values directly from srail port?

What do you send at one side, appears at another. You may do something like "putch(0x41)" -- or "putch('A')", as hex code for capital A is 0x41. It is just for convenience.

So, if you send some raw binary data, it's more convenient to represent it as numbers. If you send a text string, far more easier (especially for others who want to understand your code) is to send and receive it as ASCII.

If you send mixed data to PC and just want to see it on terminal screen, of course it should be ASCII. That is, for hex numbers their ASCII representation should be sent: not one byte, such as 0x41, but four (or just two): '0', 'x', '4', '1'.
==
Tomas

List of 6 messages in thread
TopicAuthorDate
serial communication            01/01/70 00:00      
RE: serial communication            01/01/70 00:00      
RE: serial communication            01/01/70 00:00      
RE: serial communication            01/01/70 00:00      
RE: serial communication            01/01/70 00:00      
RE: serial communication            01/01/70 00:00      

Back to Subject List