BS2p 48 RS232 SPSTR Flow Control
hmlittle59
Posts: 404
in BASIC Stamp
Hello All,
Just learning (6 mths) serial comm. with PBASIC.
Over all problem: To much data for the EEPROM Scratch Pad RAM.
Is there a way to capture all the data (256 bytes) that is coming in either using (Flow Control (FC)/RTS/CTS) or saving directly to another SLOT?
I'm currently reading the first 125 bytes of the packet but its unwanted data (SPACES). Once the needed data starts to come in my Scratch RAM is FULL.
Problem: Reading more then 125 bytes with SERIN SPSTR Command.
Currently looking thru the Stamp Help Commands and examples ,need to be pointed in the right direction.
Thanks for any help.
Just learning (6 mths) serial comm. with PBASIC.
Over all problem: To much data for the EEPROM Scratch Pad RAM.
Is there a way to capture all the data (256 bytes) that is coming in either using (Flow Control (FC)/RTS/CTS) or saving directly to another SLOT?
I'm currently reading the first 125 bytes of the packet but its unwanted data (SPACES). Once the needed data starts to come in my Scratch RAM is FULL.
Problem: Reading more then 125 bytes with SERIN SPSTR Command.
Currently looking thru the Stamp Help Commands and examples ,need to be pointed in the right direction.
Thanks for any help.
Comments
Or, if you know what the first byte(s) of the real data be, you can use the WAIT (Value) formatter.
Tomcrawford the "WAIT" Command worked....Thanks. My next work around is......
The DATA PACKET is about 175 - to - 200 bytes long. The data that I need (3 locations) is at the beginning and near the end of the Packet. Can I receive the first(1st) part of the needed Data with "WAIT" Command, then send a "FLOW CONTROL" to stop, then "FLOW CONTROL" start DATA with another "WAIT" Command set up to capture the second part of the "DATA PACKET"?
It appears that ALL the Data is received after the "WAIT COMMAND".
NOTE: I did get this concept to work with 2 separate reads but that also had some flaws.
Will have to modify another working OEM PCB that has enough pins to see if this works.
Thanks for any feedback.
Can you arrange to have a more user-friendly data packet? Prob'ly not in this lifetime!
Ooops, I see you are already using separate reads.
Well, when you get it worked out, share what you've learned with us here. ;-)
Yell, on my drive to work and the radio off, I realized that this concept would not work also. WHY: because there is no way to break out of the (SERIN/WAIT) command.
Solution: If the (SERIN/WAIT) Command had an extended feature of.....(SERIN/WAIT"XXXXXX",Capture(0 -to- 6 or 12 bytes),WAIT"AGAIN",(0 -to- END OF PACKET).
Will learn more about FLOW CONTROL/CTS/RTS. Also may be able to get the Transmitting device to send the Data again without having to scan. Do not know if the data is buffered or not. Going through Amazon to get answers from the Chines Company.....WOW....That's be rough. Did get them to send me a Users Guide....(NOT a 100% match). Version is different...ho hum
Thanks again