the serial port for debugging. All variable types appear with
leading zeros to make 5 digits (ie a value 1 appears as 00001), but
that's fine. The problem occurs when a signed variable with a
negative value is transmitted. The signed value shows up as
(seemingly) random ASCII characters. As an example, a word with
value -29536 appears as ".'+-*" (quotation marks added). Positive
values of signed variables appear correctly. I can solve the problem
by creating a second variable and assigning it the value of the first
plus 32768, 128, or 8 (for word, byte, or nibble variables,
respectively), to make the second variable always have a positive
value. But then I have twice as many variables, more instructions to
execute, and I have to subtract the same values off the value on the
receiving end of the communication. Has anyone had this problem, or
know of a more elegant way to solve it?
Thank you,
Aaron
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment