28825 Parallax Inc, 28825 Datasheet - Page 3

MINI SOUND PLAYER SOUNDPAL

28825

Manufacturer Part Number
28825
Description
MINI SOUND PLAYER SOUNDPAL
Manufacturer
Parallax Inc
Datasheet

Specifications of 28825

Accessory Type
Sound Player
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
BASIC Stamp®
For Use With
28824 - SERVOPAL SERVO PULSER TIMER
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
By installing a 3-pin header (included with the BOE-Bot Full Kit, p/n 28132) in one of the SoundPAL’s
connectors, you can also use it with a wireless breadboard, as the following diagram illustrates:
In lieu of the three-pin header, you can also use three jumper wires or Parallax’s 14-inch LCD Extension
Cable and 3-Pin Header (p/n 805-00012).
Hardware Interface and Initialization
Interface to the SoundPAL takes place through either one of its I/O pins. When the SoundPAL powers
up, both pins are configured as normally-high inputs, pulled up to a nominal +5V through internal 20K to
50K resistances. The BASIC Stamp can thus tell when the SoundPAL has powered up by monitoring the
ungrounded I/O pin for a high value. This is an important feature when the SoundPAL is plugged into
one of the BOE’s servo headers, since the BOE’s three-way power switch powers up the servos after the
BASIC Stamp’s program starts to run.
Communication with the SoundPAL takes place using the BASIC Stamp’s SEROUT and SERIN
commands at any baud rate between 9600 and 19200, positive logic, 8-bit, no-parity. The SoundPAL’s
I/O pin should always be configured as an input by the BASIC Stamp, except when it’s being pulled low.
It should never be driven high. Therefore, when configuring the baud rate, be sure to set the high bit of
the Baudmode to a “one” (i.e. add 32768, or $8000 to the normal Baudmode value). This will configure
the pin as an open collector output.
The SoundPAL runs autonomously on power obtained from the servo headers or from another 5V supply.
Therefore, it does not reset when the BASIC Stamp resets, and may continue to produce sound during
and after reset if it was producing sound before. But it can be reset, nonetheless, by outputting a low
pulse of 2ms or more to its I/O pin. This can be a little tricky with the BASIC Stamp, since the Stamp’s
PULSOUT command always leaves the pin in an output state, which we don’t want to do. But there’s a
simple workaround. Just send a zero byte with SEROUT to the SoundPAL at a low baud rate, using the
same open-collector protocol used for normal communication.
When the SoundPAL resets, all output ceases immediately, and it returns to its initial state. Resetting is
the only way to halt infinite sound sequences, such as the siren effect included in the SoundPAL’s internal
repertoire.
The following code snippet illustrates baud rate settings both for communication and for resetting the
SoundPAL. It also includes a reset subroutine.
© Parallax, Inc. • SoundPAL (2007.10.29)
P15
P14
P13
P12
P11
P10
P9
P8
P7
P6
P5
P4
P3
P2
P1
P0
Vdd
Vin
Vss
Page 3 of 12

Related parts for 28825