EFX-TEK AP-8 User manual

EFX-TEK (916) 616-1658 www.efx-tek.com teamefx@efx-tek.com 1 of 8
AP-8 Audio Player
PN: 31308
Document Version: 2.0 01 JUN 2006 Copyright © 2006 EFX-TEK
DESCRIPTION
Professional prop builders know a secret: audio is more than half of the experience of a high-quality prop. Until
now, consumer-level audio boards lacked some professional features – things like quality amplification, as well as
the ability to mix a stereo signal (to mono) right on the board. The AP-8 solves this problem, providing quality
audio and amplification in a small format; a format perfect for amateur and professional prop builders alike. Need
more than eight sounds? No problem – the AP-8 is addressable allowing up to four units to be attached to the
same host (serial) connection.
PRODUCT APPLICATIONS
Props and holiday displays
Sophisticated audio annunciation for small-scale industrial control
FEATURES & BENEFITS
Plays up to 60 seconds of audio (8 kHz sample rate)
Audio memory may be divided into one to eight discrete segments
Loop switch for continuous play of selected segment
Onboard two-level amplifier directly drives 8-ohm speaker
Serial control for connection to host microcontroller
User-configured baud rate (2400 or 38.4k) for serial control
User-configured address allows up to four AP-8 boards on one serial connection
Direct control with simple N.O. switch and button input (segment, loop mode, play/record)
Compact size: 2.75” x 3” (76.2 mm x 69.9 mm)
MECHANICAL

EFX-TEK (916) 616-1658 www.efx-tek.com teamefx@efx-tek.com 2 of 8
Mounting the AP-8
Mount the AP-8 on a non-conductive surface using ½” (not included) stand-offs and appropriate hardware.
Mounting the AP-8 (or any other circuit board) above a conductive (metal) surface could lead to the possibility of a
hazardous condition that might damage the AP-8 or the host controller.
Connections – Power and Speaker
Connect a 12-24 volt, 1 amp DC power supply to the AP-8. Power to the AP-8 is input through a 2.1 mm, center-
positive barrel connector.
Connect a suitable 8-ohm speaker (non-amplified) to the green screw terminals.
Connections – Serial Control
For many applications the AP-8 will be connected to a host microcontroller like the Prop-1. To make the
connection between the host and the AP-8 use a 3-wire servo extender cable (#805-00002). When making the
connection it is important to note the color-coded polarity of the extender cable (W = white, R = red, B = black)
and match it to the output header on the Prop-1 or other host.
Baud Rate Selection
The AP-8 supports two baud rates: 2400 baud for the Prop-1, and 38.4k baud for other microcontrollers. Baud
rate is set with a jumper on the SEL header.
Jumper Baud Rate
Out 2400 (Prop-1)
In 38.4k (Other controllers)
Address Selection
Using a serial connection allows the host controller to connect to up to four AP-8 boards; to do this, however,
each must have a unique address. The AP-8 board address is set with jumpers on the ID0 and ID1 headers.
ID1 ID0 Address
Out Out 0 (%00)
Out In 1 (%01)
In Out 2 (%10)
In In 3 (%11)
The illustration below shows the AP-8 configured for 2400 baud, set to address 3 (%11).

EFX-TEK (916) 616-1658 www.efx-tek.com teamefx@efx-tek.com 3 of 8
AP-8 Serial Protocol
The AP-8 serial connection conforms to the Parallax AppMod bi-directional communications protocol, which
operates at TTL (0 to 5 VDC) using “open-true” baud mode to enable daisy-chaining devices. All exchanges are
initiated by the host controller. The format of host communications to the AP-8 is as follows:
"!AP8", address, command { , data }
… where “!AP8” is the preamble that allows the AP-8 to exist on the same communications line as other devices
(e.g., DC-16, RC-4), address is the board address set with jumpers on ID0 and ID1, command is a single
character command designator, and data is any value that may be required by command. The following section
details valid commands (“V”, “G”, “P”, and “X”) for the AP-8.
“V” – Get AP-8 Version number
Syntax: “!AP8”, address, “V”
Reply: 3-byte (ASCII) version string
Prop-1 Example:
SEROUT Sio, OT2400, ("!AP8", %11, "V")
SERIN Sio, OT2400, id0, id1, id2
DEBUG "AP-8 Version ", #@id0, #@id1, #@id2, CR
“G” – Get AP-8 Status
Syntax: “!AP8”, address, “G”
Reply: Single byte that indicates the AP-8 status and switch settings. See below.
Bit When 1 When 0
7 AP-8 is Playing AP-8 is Idle
6Reserved Reserved
5 Single-shot play Loop play
4 Record mode selected Play mode selected
3Reserved Reserved
2 Segment switch 2 is Open Segment switch 2 is Closed
1 Segment switch 1 is Open Segment switch 1 is Closed
0 Segment switch 0 is Open Segment switch 0 is Closed
Prop-1 Example:
Main:
SEROUT Sio, OT2400, ("!AP8", %11, "G")
SERIN Sio, OT2400, ap8Status
In this example, ap8Status will hold the current state of the AP-8. See the example program for reading and
decoding the status bits.

EFX-TEK (916) 616-1658 www.efx-tek.com teamefx@efx-tek.com 4 of 8
“P” – Play Specified Audio Segment
Syntax: “!AP8”, address, “P”, segment
– segment is the audio segment to play (0 – 7)
Reply: AP-8 status (same as “G” command) – may be ignored
Prop-1 Example:
SEROUT Sio, OT2400, ("!AP8", %11, "P", 7)
In this example, the AP-8 at address %11 will play audio segment seven.
“X” – Stop Play
Syntax: “!AP8”, address, “X”
Reply: none
Prop-1 Example:
SEROUT Sio, OT2400, ("!AP8", %11, "X")
In this example the AP-8 at address %11 is stopped.
NOTE: The AP-8 “P” and “X” commands have “all call” capability. When the address byte for these
commands is set to 255, any AP-8 on the communications line will respond to the command, but no
status byte(s) will be returned.
Connections – Parallel Input Control
In applications where the host microcontroller is not capable of generating the proper serial communications
stream the AP-8 may be controlled through the parallel interface headers 0..2 (segment selection), and P (Play).
These signal inputs are active-low and should be allowed to float to a Hi-Z (open) state when not selected. A
short-duration (~50 ms) low-going pulse on the P connection will start the selected segment. A segment cannot
be stopped when using parallel input control.
When using parallel input control the segment select dip switches 0..2 must be left in the Open position.
Connections – Direct Input Control
In applications where the goal is to manually play a segment, a normally-open switch (e.g., push-button, mat
switch, etc.) may be connected to the P control header as shown below. This connection emulates pressing the
AP-8 PLAY/REC button – the segment selected by switches 0..2 will be played.

EFX-TEK (916) 616-1658 www.efx-tek.com teamefx@efx-tek.com 5 of 8
While the serial connection provides the greatest flexibility, beginning prop-builders can use this connection
between the Prop-1 and the AP-8.
To start the AP-8 from the Prop-1 using the connection, you could use the following code segment:
Play_Sound:
HIGH 0
PAUSE 50
LOW 0
NOTE: If the Loop switch is set to the closed position the selected segment will continuously play until
the AP-8 is powered-down or receives the “X” command message on the serial input.
Transferring Sounds to the AP-8
The AP-8 uses WinBond’s ISD2560 ChipCorder®as its recording and playback element, so transferring audio
segments to the AP-8 is accomplished through an audio connection between a PC (or similar audio source, e.g.,
a CD player) and the AP-8. For most applications, the following process is used to record one or more audio
segments:
1. Connect your PC sound card output to the AP-8 with a stereo 1/8” cable (male-to-male).
2. Move the AP-8 power switch to the LO position.
3. Select the track(s) to record (left, right, or both) with the IN L and IN R jumpers.
(Default setting is both in which mixes the left and right channels to a mono track)
4. Move the PLAY/REC jumper to the REC position.
(The red REC LED will illuminate)
5. Select the segment for recording with switches 0..2; set the loop (L) switch to Open.
(Refer to the segment table below)
6. Start the audio on your computer and press the PLAY/REC button on the AP-8.
7. Hold the PLAY/REC button until the sound is finished playing, then release.
8. Repeat steps 3 through 7 as required for all segments.
9. Move the PLAY/REC jumper to the PLAY position.
Note that every sound card and PC is different, so you will probably have to experiment to get the best possible
sound. When possible, use an audio editing tool (Team EFX likes a neat freeware program called Audacity, see
audacity.sourceforge.net for details) to “normalize” all of your audio files to a consistent level. This will allow you
to set you PC volume level to a known position to get good recordings. Once you find a setting that works, make
note of it for future use. In general, if you can listen to the sound from your PC comfortably though a set of
headphones then it should record well. If the volume is too high the sound will become scratchy and distorted;
too low and you may hear unwanted hiss.
The ISD2560 addressing scheme causes the AP-8 to break the audio segments as shown in the table that
follows. Note the position of the segment select switches for each of the AP-8 audio segments.

EFX-TEK (916) 616-1658 www.efx-tek.com teamefx@efx-tek.com 6 of 8
# 2 1 0 Start Length
0 X X X 0.0 6.4
1 X X O 6.4 6.4
2 X O X 12.8 6.4
3 X O O 19.2 6.4
4 O X X 25.6 6.4
5 O X O 32.0 6.4
6 O O X 38.4 6.4
7 O O O 44.8 15.2
O = Open, X = Closed
Start and Length are in Seconds
It is okay to have sounds longer than the segments shown; if you record a sound longer than the target segment
then the next segment will be merged to extend the segment length (this does not apply to segment 7) – just
remember that if the sound requires the use of two (or more) segments then you reduce the number of sounds
you can play with the AP-8. If, for example, you have a sound effect that is 10 seconds long and you want to
place it into segment 0, this is no problem. Set the segment switches to XXX (all closed) and record the sound.
The next available segment is now #2, so set the segment switches to XOX and record the next sound. If your
second sound was 20 seconds long then segments 2, 3, 4, and 5 would be merged to hold that sound.
Once the sounds are recorded you have two options for volume: power switch position LO provides low volume
output (suitable for quiet environments) and position HI provides a 20x amplification boost that can be used for
noisy environments. Note that the volume in position HI can be quite loud; set the volume level potentiometer
accordingly.
Example Program
The following program demonstrates the AP-8 features under serial control using the Prop-1 controller. When
using the Prop-1 the serial baud rate is set to 2400 (Baud jumper removed).
' =========================================================================
'
' File....... AP-8_Test.BS1
' Purpose.... AP-8 Features Test
' Author..... EFX-TEK
' E-mail..... teamefx@efx-tek.com
' Started....
' Updated.... 01 JUN 2006
'
' {$STAMP BS1}
' {$PBASIC 1.0}
'
' =========================================================================
' -----[ Program Description ]---------------------------------------------
'
' Demonstration program for the AP-8 Audio Player Board
' -----[ I/O Definitions ]-------------------------------------------------
SYMBOL Sio = 7
' -----[ Constants ]-------------------------------------------------------

EFX-TEK (916) 616-1658 www.efx-tek.com teamefx@efx-tek.com 7 of 8
SYMBOL Baud = OT2400
SYMBOL Addr = %11
' -----[ Variables ]-------------------------------------------------------
SYMBOL id0 = B0 ' also used to status
SYMBOL id1 = B1
SYMBOL id2 = B2
SYMBOL segment = B3 ' loop control
SYMBOL switches = B4 ' board switch settings
SYMBOL ctrlChar = B5 ' used for Debug Home
' -----[ Initialization ]--------------------------------------------------
Reset:
DEBUG CLS
ctrlChar = 1 ' home
' -----[ Program Code ]----------------------------------------------------
Main:
SEROUT Sio, Baud, ("!AP8", Addr, "V") ' get version
SERIN Sio, Baud, id0, id1, id2 ' receive ID string
DEBUG "AP-8 Version ", #@id0, #@id1, #@id2 ' display it
PAUSE 2000
DEBUG CLS
FOR segment = 0 TO 7
SEROUT Sio, Baud, ("!AP8", Addr, "P", segment)
SERIN Sio, Baud, id0 ' clear auto status byte
Get_Status:
SEROUT Sio, Baud, ("!AP8", Addr, "G") ' get status
SERIN Sio, Baud, id0
IF BIT4 = 1 THEN Mode_Error ' AP-8 in record mode
switches = id0 & %00000111 ' isolate switch bits
IF switches <> %111 THEN Switch_Error ' error if any closed
Show_Status:
DEBUG #@ctrlChar ' home cursor
DEBUG "Segment #", #segment, CR ' show board status
DEBUG CR
DEBUG "Playing / Idle... ", #BIT7, CR
DEBUG "Single / Loop.... ", #BIT5, CR
DEBUG "Record / Play.... ", #BIT4, CR
DEBUG "Segment Sw2...... ", #BIT2, CR
DEBUG "Segment Sw1...... ", #BIT1, CR
DEBUG "Segment Sw0...... ", #BIT0, CR
IF BIT7 = 1 THEN Get_Status ' allow to finish
PAUSE 1000
NEXT
DEBUG CLS, "Demo complete."
END
Switch_Error:
DEBUG CLS

EFX-TEK (916) 616-1658 www.efx-tek.com teamefx@efx-tek.com 8 of 8
DEBUG "Please set AP-8 segment select", CR
DEBUG "switches to OPEN, then restart", CR
DEBUG "the program."
END
Mode_Error:
DEBUG CLS
DEBUG "AP-8 is set to Record mode; please", CR
DEBUG "move PLAY/REC jumper to PLAY."
END
Accessories
750-00007 12 VDC, 1 Amp power supply; provides ample power for the AP-8
805-00002 14-inch, 3-pin extension cable; used to connect the AP-8 to the Prop-1 controller
Additional Applications
For additional ideas and application notes for the AP-8, be sure to visit our web site at the following link:
www.efx-tek.com
ChipCorder is a registered trademark of Windbond Electronics Corporation Amercia
This manual suits for next models
1
Table of contents
Other EFX-TEK Media Player manuals