piclist 2003\10\03\235818a >
Thread: Serin/Serout confusion
www.piclist.com/techref/index.htm?key=serinserout+confusion
flavicon
face BY : John Pearson email (remove spam text)



Below is from a mailing list for ARV Bascom.

I was hoping someone here could help me with this, using Bascom.

....................................................................

Okay, I guess I have this down to just trying to send any varibles larger than 1 byte. Strings work okay,( but how can I convert a 4 byte varible to a string and add a CR to the end? Suggestions welcome.)

So when I send a word, long, etc. the received result is equal to only the LS byte of the varible sent.

Dim X as long
X = &B110000000

Master:
Serout X, 4, B, 1, 300, 0, 8, 1

Slave:
Serin X, 4, B, 1, 300, 0, 8, 1

Print X   ( X prints out as 128, or &B10000000)

So there must be some data conversion problem I am not addressing. X seems to "point" to the LSbyte, intead of representing a long varible.

John


--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestRemoveMEspammitvma.mit.edu

<002201c38a2c$190a37c0$0f313fd1@xero> quoted-printable

See also: www.piclist.com/techref/index.htm?key=serinserout+confusion
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Serin/Serout confusion

month overview.

new search...