Sending variable data to propeller II Using PST
Bob Drury
Posts: 236
in Propeller 2
Using the fullduplex serial object with PST Is there a "standard convention" spin routine (object) for propeller II to receive variable data entered from the PST. "Convert numbers to strings" Author.... Jon McPhalen is very useful to go from Propeller II to PST is there a routine for "Convert string to numbers" and a convention for setting up variables to send from PST to propeller II.
Regards
Bob Drury (WRD)
Comments
To do this, use the STR and VAL procedures.
Thanks for response. Not sure what you mean by procedures. Using spin2.
See my 16 port serial objects. There is a RxStr for receiving strings. It’s based on jonnymacs serial so most of the calls are the same (a few have tx prefixes and there’s a txdunp too.
The PST object used in the Propeller 1 has a "DecIn" method which is commonly used for this purpose.
Here's a similar method I use with the P2.
This method doesn't limit the number of characters. I'd be happy to modify the code if you need to limit the number of characters.
I'm pretty sure there are better ways to do this. This is just one option.
Thanks Cluso99 and Duane Degn I will try out the info
Regards
Bob Drury