Shop OBEX P1 Docs P2 Docs Learn Events
just got my board, not working right — Parallax Forums

just got my board, not working right

ArchiverArchiver Posts: 46,084
edited 2004-02-15 00:53 in General Discussion
My BS2p40 Professional Starter kit just arrived. I also purchased
the Audio Amplifier Appmod kit for it.

After trying the "hello world" program listed in the manual, and then
a couple other simple programs, I plugged in the Audio Amp board and
loaded the StampSounds.bsp program.

It runs, but it doesn't sound right at all; I only hear a bunch of
clicking. The DTMF sounds, the phone ringing and busy sounds, the
astro droid: all of them are just clicking noises. The roulette
wheel sounds right, because I guess it's just supposed to be clicking
anyway. The Howler and Space Transporter actually make a slight
squealing sound, but they still don't sound like they should.

Is there some trick to getting this thing to work right? I also
connected a separate audio amp/speaker to the external speaker jack
on the audio board and I get the same results.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-02-15 00:53
    Hi Andy,

    The BS2P operates at a different frequency than the BS2 so the DTMF
    and FREQOUT commands require different values.

    Add this to the top of your program (below the stamp identifier):

    {$PBASIC 2.5}

    #SELECT $STAMP
    #CASE BS2, BS2E
    PER CON $0100
    FREQ CON $0100
    #CASE BS2SX
    PER CON $0266
    FREQ CON $0066
    #CASE BS2P
    PER CON $0343
    FREQ CON $0043
    #ENDSELECT

    and then change every FREQOUT command so that they use the following
    syntax:

    FREQOUT Pin, Duration */ PER, Freq1 */ FREQ {, Freq2 */ FREQ}

    Example:

    From:

    Dial_Tone:
    DEBUG "Dial tone", CR
    FREQOUT Speaker, 35, 35
    PAUSE 100
    FREQOUT Speaker, 2000, 350, 440

    To:

    Dial_Tone:
    DEBUG "Dial tone", CR
    FREQOUT Speaker, 35 */ PER, 35 */ FREQ
    PAUSE 100
    FREQOUT Speaker, 2000 */ PER, 350 */ FREQ, 440 */ FREQ

    Just go through the code and add the "*/ PER" and "*/ FREQ" to the
    Duration and Frequency parameters of each of the FREQOUT commands.

    The DTMF commands also need to be changed, but I don't have the
    modifiers handy at the moment.

    HTH,

    Kenny
Sign In or Register to comment.