Serial comm differences between PC & Mac?
Dar Scott
dsc at swcp.com
Thu Dec 2 17:21:15 EST 2004
On Dec 2, 2004, at 2:06 PM, runrev at jkvaldez.com wrote:
> In XP, I first read -52! What's that? Then the trailing control chars
> are
> 12, -100, -84, etc. Strange.
The negative sign is from the MSB being set. For example the -100
would be 28 if the MSB was cleared. But, 28 is not one of the values
you expect, so I'm stumped.
A grounding problem can cause some errors with some characters and will
often set the MSB (the last bit sent), but this does not look like a
pattern I have seen. Make sure the ground pin is wired.
While tinkering, try reading until empty several times collecting the
characters and then charToNum those to dump.
My comment on syncing was simply to look for a pattern at the start of
a message if you might get garbage characters at the start.
Some systems with isolated RS-232 use RTS to power transmission back.
I would think you would get much less, if that was your problem.
Are you using "read from file" on Windows?
As you can probably tell, I'm grasping at straws.
Dar
****************************************
Dar Scott Consulting
http://www.swcp.com/dsc/
Programming Services
****************************************
More information about the use-livecode
mailing list