Shop OBEX P1 Docs P2 Docs Learn Events
Serial data in and loading scratch ram... — Parallax Forums

Serial data in and loading scratch ram...

bmb!bmb! Posts: 26
edited 2009-12-07 19:38 in BASIC Stamp
Sorry, if this has been asked a number of times. I searched the forums a couple different ways and didn't find anything.

My question... Does anyone have any sample code using the SERIN command to receive data and pop it into the scratch ram? The would occur in a loop until an end of transmission character was sent. Basically I'd like to quickly (9600) load ~32 bytes of data via SERIN into a section of the scratch ram. Is such a thing do-able? I thought I could find some sample code online, but so far no luck.

Thanks, in advance...

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-07 17:59
    The SPSTR "formatter" specifically does this for you. Read the chapter on the SERIN statement in the BASIC Stamp Syntax and Reference Manual (page 404). You can download that by going to the main Parallax webpage and clicking on "Downloads", then "BASIC Stamp Documentation". You can also find the information in the Stamp Editor help files. Note that this is only available on the BS2p/pe/px Stamps.
  • bmb!bmb! Posts: 26
    edited 2009-12-07 19:38
    Perfect, thanks so much. I knew there had to be a way... I'm dusting off some of my old Basic stamp projects, and still rusty on the syntax. Thanks.
Sign In or Register to comment.