PDA

View Full Version : Serial Data format



barkerben
- 28th November 2004, 21:31
Me again...

I've been looking at the PicBasic pro manual concerning serial transmission, and it is slightly confusing. For instance, it mentions many types of modifier for received and transmitted values.

I had assumed that if I wanted to send the numerical value 123 along a serial line, I would send the binary byte:

01111011


Since all I need to do is send signals from the PC to the PIC and back again, with different numbers having different meanings, this seemed perfect. The manual seems to suggest that to send the numeric value 123, in fact we have
to send 3 bytes for the ASCII representation of the characters 1, 2, and 3 respectively. Surely this can't be correct...?


Cheers,


Ben

mister_e
- 28th November 2004, 22:09
you can send numeric value, preceding variable with # for serout or DEC for SERIN.

regards