Stamp to Stamp Serial Communication
Lucas Harlem
Posts: 5
I have two Basic Stamps 2P40's and they are connected to pins 0\1 on the AUXIO,
I am getting erronious data when I try to view the debug screen. This is the wierd stuff that
I see on the debug screen,
Debug Screen Output
þÿþþÿþÿþþÿþÿþþÿþÿþþÿþÿþþ
Here is the code
Stamp 1
Main:
Auxio
Serout 0\1, 16468, [noparse][[/noparse]"Hello"]
Pause 1000
goto main
Stamp 2
MSG Var Byte 'Variable for Message
Main:
Auxio
Serin 0\1, 16468, [noparse][[/noparse]MSG]
pause 1000
Debug MSG
Goto Main
Debug Screen Output
þÿþþÿþÿþþÿþÿþþÿþÿþþÿþÿþþ
Its pretty easy stuff, but I keep getting artifacts on the debug screen instead of the Message Hello. Really wierd looking symbols instead of the letters HELLO. I think it may be the baud rate, I am not very knowlegeable with stamp to stamp serial communications. This is a basic program that I need to adapt to a project I am working on. If I can get the serial comminication to work properly, I can adapt it to my application that I am working on.
I am getting erronious data when I try to view the debug screen. This is the wierd stuff that
I see on the debug screen,
Debug Screen Output
þÿþþÿþÿþþÿþÿþþÿþÿþþÿþÿþþ
Here is the code
Stamp 1
Main:
Auxio
Serout 0\1, 16468, [noparse][[/noparse]"Hello"]
Pause 1000
goto main
Stamp 2
MSG Var Byte 'Variable for Message
Main:
Auxio
Serin 0\1, 16468, [noparse][[/noparse]MSG]
pause 1000
Debug MSG
Goto Main
Debug Screen Output
þÿþþÿþÿþþÿþÿþþÿþÿþþÿþÿþþ
Its pretty easy stuff, but I keep getting artifacts on the debug screen instead of the Message Hello. Really wierd looking symbols instead of the letters HELLO. I think it may be the baud rate, I am not very knowlegeable with stamp to stamp serial communications. This is a basic program that I need to adapt to a project I am working on. If I can get the serial comminication to work properly, I can adapt it to my application that I am working on.
Comments
One of the problems is that in the first program, you are transmitting 5 bytes ("Hello") and in the second program, you are only reading one byte (variable MSG defined as one byte). You may want to change the definition of MSG to the following:
MSG VAR BYTE(5)
Now when you read it, use SERIN 0\1, 16468, [noparse][[/noparse]STR MSG\5]
Then when you display it use DEBUG STR MSG\5 .
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I would like to extend my thanks on this matter I took all of your suggestions and it worked, I had to modify the code, and change the wires around, and add a VSS line between each stamp, no more artifacts Just clear Hello. Thank you so much.
Respectfully
Lucas Harlem