Shop OBEX P1 Docs P2 Docs Learn Events
Another Serout help question — Parallax Forums

Another Serout help question

alnajjar1alnajjar1 Posts: 110
edited 2011-02-25 12:43 in BASIC Stamp
Ok, so I found another player that doesn't need the "handshaking" thing in my earlier post (serin Serout with handshacking". From hyperTerminal, I send the following command:
CtrA p + 01 CtrlC

and this work. I followed the exact syntax in the manual which is shown below. Now I am trying from the BS2 and not clear how to send the command above, specifically how to deal with start and end of header characters. can you help please????

many thanks, Al

here is the syntax straight from the manual:


<SOH> p <+/-/&/~/!> XX <ETX>

where:


<SOH> ASCII Start of Header character 0116 (Ctrl-A)
p ASCII lower case letter p
<+/-> ASCII plus character + to start a sound, minus character - to stop a sound
<&/~/!> ASCII ampersand character & to queue a sound, tilde character ~ to flush the queued sounds, exclamation character ! to stop the current playing sound and flush the queued sounds
XX ASCII two digit hexadecimal number XX16 of the sound (01, 02, . . . , 7E, 7F)
<ETX> ASCII End of Text character 0316 (Ctrl-C)

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-25 09:27
    The <SOH> is just a 1 and the <ETX> is just a 3, so one example might be: SEROUT pin,Baud,[1,"p+01",3]
  • stamptrolstamptrol Posts: 1,731
    edited 2011-02-25 09:29
    One issue is that <SOH> is 01h or 001 dec and <ETX> is 03h or 003 dec.

    Have a look at the Helpfile under SEROUT to make sure you're sending the character you think you are.

    If you're using any pin other than p16, you'll probably have to use the "inverted" form of the command. Its described in the Helpfile as well.

    Cheers,
  • alnajjar1alnajjar1 Posts: 110
    edited 2011-02-25 12:43
    Thanks Mike, it worked. Your are a great help as always.
Sign In or Register to comment.