Shop OBEX P1 Docs P2 Docs Learn Events
Capturing Serial data with BS2 Function Object. — Parallax Forums

Capturing Serial data with BS2 Function Object.

SiriSiri Posts: 220
edited 2008-02-15 21:55 in Propeller 1
I used BS2 to capture 3 Bytes of serial data - using SERIN :

·····" SERIN 16,Baud9600,[noparse][[/noparse]sData1,sData2,sData3]" with BS2 stamp
······························· First Byte ---> variable sDta1
······························· Second Byte ---> variable sData2· etc.

Please can someone show me how to do this using "BS2_Functions" in spin. for the propeller.
OR any other way to cature tyhe data into separate variables.

Thank you.

Siri

I

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-15 21:55
    Look at the comments for SERIN_CHAR in BS2_Functions. This is a function that will return the next byte from a serial port. You can also use DEBUGIN_CHAR which calls SERIN_CHAR and supplies the information needed to use the programming port on the Propeller at 9600 Baud.

    You could just do "sData1 := Debug_Char", then "sData2 := Debug_Char", etc.

    There are a variety of other serial input and output routines in BS2_Functions. Read the comments and try them out.
Sign In or Register to comment.