Shop OBEX P1 Docs P2 Docs Learn Events
Sound Module AppMod and BS1 — Parallax Forums

Sound Module AppMod and BS1

EugalazEugalaz Posts: 39
edited 2011-09-05 17:31 in BASIC Stamp
Hello,
Can any one tell me if the old Sound Module AppMod works with the BS1? If so can you post a code snippet to show how please.

The BS2 code that I am trying to make work on a BS1 is: SEROUT 4, 188+$8000, [!SMOP",0]

Thanking you in advance
Eugalaz

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-04 18:12
    $8000 + 188 is BS2 baudmode for open drain, true, 4800 bps.
    I think the top speed for BS1 is 2400.
    Can the Sound AppMod be configured for 2400 bps?
  • EugalazEugalaz Posts: 39
    edited 2011-09-04 18:21
    Hi PJ Allen,
    Thanks for your reply.
    Yes the documentation tells me:
    - Simple serial interface 'auto-bauds' any standard baudrate from 2400 to 38K4
    Does that help?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-04 18:41
    OK

    You asked about -
    SEROUT 4, 188+$8000, [!SMOP",0]

    I assume there should be leading quote-marks. I wonder if the 0 at the end is so. You have the manual.
    So, a BS1 equivalent for SEROUT 4, 188+$8000, ["!SMOP",0]
    The BS1 has a 5-character limitation, too.
    I guess you could probably break that up.
    SEROUT 4, OT2400, ("!SMOP")
    SEROUT 4, OT2400, (0)
  • EugalazEugalaz Posts: 39
    edited 2011-09-04 18:49
    Sorry as you point out the BS2 code should read..

    SEROUT 4, 188+$8000, ["!SMOP",0]

    This command tells the Sound Module to play recorded sound from location 0
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-04 18:51
    OK
    Try my suggestion.
    (Run it up the flagpole and see if it gets a salute.)
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-04 20:01
    I'm a little rusty with the BS1, but
    SEROUT 4, OT2400, ("!SMOP", 0)
    is probably valid.
  • EugalazEugalaz Posts: 39
    edited 2011-09-04 23:09
    Thank you very much PJ Allen. I will try that out later when I get home.
  • EugalazEugalaz Posts: 39
    edited 2011-09-05 01:40
    No salute unfortunatley.
    I have tried your suggestion and tried to improve my chances but to no avail.

    Commands tried so far:

    SEROUT 4, T2400, ("!SMOP",0)
    SEROUT 4, N2400, ("!SMOP",0)
    SEROUT 4, OT2400, ("!SMOP",0)
    SEROUT 4, ON2400, ("!SMOP",0)

    None of these work. Do you think that it could be that the BS1 just can't talk to the Sound Module? Hope not.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-05 07:35
    If it's about serial comms, there's no reason that a BS1 cannot work.

    The + $8000 in the BS2 baudmode means an open drain is required, only the BS1 OT baudmodes are equivalent.

    If you have a PDF for this sound module, please attach it.

    It could be helpful if you provide a good quality picture of your setup as well. [I don't want a picture of it, I want to be able to see what you're doing.]
  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-05 07:46
    I think your problem is that the Sound Module AppMod expects the fourth character of the string to be a zero character rather than the letter "O". You should use:

    SEROUT 4, OT2400, ("!SM0P",0)

    Look at page 2 of the documentation for the module for an explanation of the various characters in the command.
  • PublisonPublison Posts: 12,366
    edited 2011-09-05 07:49
    Per the manual for the #29111:
    4. Please note that the 0 in the SM0P command is a numeric (zero) and not an alphabet character. Care must be
    taken since the two characters look alike in many fonts. The zero has no function in this AppMod. Others
    AppMods may use this character location to specify a module number such that multiple AppMods of the same
    type may share an I/O line

    and
    7. If the sound module seems to ignore every message you send it, it is probably due to a ‘not-so-obvious’ syntax
    error: serout 4,84+$8000,[“!SMOP”,0]. Can you spot the error? The header SMOP should be
    SM0P (ess em zero pea) not SMOP (ess em oh pea). Depending on what font you use, 0s and Os can look
    exactly alike. See note 4.

    Could this be your problem?

    http://www.parallax.com/dl/docs/prod/appmod/SoundModManBv1_1.pdf

    EDIT: Mike and I where responding at the same time. Is he ALWAYS looking at these forums. :)
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-05 08:57
    I tell you, guys, the documentation, it's a beautiful thing.
    They had to call attention to the 0 being a zero and not an O.
    Amazing.
  • EugalazEugalaz Posts: 39
    edited 2011-09-05 17:31
    Thank you very much guys.
    Solved!
    Yes it was the O that was the problem. It should be a zero instead.
    The correct command as you both know is:
    SEROUT 4, OT2400, ("!SM0P",0)
    Works beautifully now.
    This forum really is amazing, the know how present here is trully phenominal.
Sign In or Register to comment.