Propeller to propeller serial communication demo.
Dgswaner
Posts: 795
Does anyone have demo code or a tutorial for propeller to propeller via serial. I'm trying to get 2 RF modules to talk but I don't know if has to do with the RF link or the code. I'm just using the code from Hippy here:
here[noparse]:http:[/noparse]//forums.parallax.com/forums/default.aspx?f=25&m=231500&g=231587#m231587
but there isn't code for receiving data. I can't get the RX function to work.
I'm using the fullduplex serial object.
Thanks in advance
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
here[noparse]:http:[/noparse]//forums.parallax.com/forums/default.aspx?f=25&m=231500&g=231587#m231587
but there isn't code for receiving data. I can't get the RX function to work.
I'm using the fullduplex serial object.
Thanks in advance
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
BS2.Serin_Str(8,@myString,9600,1,8)
I'd appreciate suggestions on where to go from here.
RX code
TX code
Thanks for lookin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
Post Edited (Dgswaner) : 12/22/2007 4:09:22 PM GMT
is not the best of all ideas SEROUT does not touch the DIRA!
!OUTA
is even worse! Please understand that you are seriously hurting your communication lines! Logically AND physically, as you shortcircuit the connected pins!
When you use "non-inverted mode" you should initialize the XMIT-line with High to not confuse the receiver so much.
It has turned out that the best way of establishing a stable serial communication is to pull-up the line (1k will be fine) and drive it LOW only. Which means: rather than
OUTA[noparse][[/noparse] n ] := bit
do
DIRA[noparse][[/noparse] n ] := !bit
You can use the code from SimpleSerial which is absolutely simple and serial.
Post Edited (deSilva) : 12/22/2007 10:43:54 AM GMT
I'll take a look at the simple serial code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
DIRA[noparse][[/noparse] 1 ]~~