BS2p serial out
darnit
Posts: 25
I am trying to interface to a serial CrystalFonts 635 LCD to a BS2p.· I believe I have the CRC probem handled, but the thing i am really having trouble with is the·\ character.· For example if i try to send out this
SEROUT SO, Baud,[noparse][[/noparse]31,7,\000\001hello,$85,$05]
the stamp editor complains about the \ character.·
31 = send data to lcd (row,col)
7 = data length
\000 = row address
\001 = col address
hello = text to display
$85,$05 = CRC
Does anyone have any ideas on how to send out this command ?
SEROUT SO, Baud,[noparse][[/noparse]31,7,\000\001hello,$85,$05]
the stamp editor complains about the \ character.·
31 = send data to lcd (row,col)
7 = data length
\000 = row address
\001 = col address
hello = text to display
$85,$05 = CRC
Does anyone have any ideas on how to send out this command ?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Try changing your SEROUT to something like [noparse][[/noparse]31,7,0,1,"hello",$85,$05]...or better yet, assigning constants (command) and variables (data_length, xpos, ypos, chksum1, chksum2) and see if that works.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...
http://www.crystalfontz.com/products/635/635_data_sheet.html
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
SEROUT SO, Baud,[noparse][[/noparse]31,7,"\000\001hello",$85,$05]
When it is not in quotes, the Stamp thinks the "\" is a dangling modifier.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
·· I'm not sure if the codes are formatted properly.· I mentioned the quotes in my first reply and he didn't mention that working, so I am trying to determine if it needs a backslash or if that is something from the C formatting.· Any ideas?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
http://www.crystalfontz.com/software/index.html
Thanks again everyone.
This is a great forum!!!
Have fun!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...