The Talk-Box

From: Michael Current (aa700@cleveland.Freenet.Edu)
Date: 04/21/92-07:48:08 PM Z


From: aa700@cleveland.Freenet.Edu (Michael Current)
Subject: The Talk-Box
Date: Tue Apr 21 19:48:08 1992


Reprinted from the A.C.E.C. BBS (614)-471-8559

______________________________________
Xx The Talk-Box
______________________________________
by Gene Strojny and Robert Emerick

Can we talk?  I mean... can we talk?
Better yet, can your Atari XL home
computer system talk?  What?  You mean
you don't have a speech synthesizer
for your computer?  Well, now there's
no excuse not to.  I'm going to show
you how to build one yourself for less
than $30.00.  Sounds too good to be
true, doesn't it?  Well, it is true,
using Radio Shack's SPO256-AL2 IC
speech processor chip.

The main problems with the speech
sythesizers currently on the market is
that they cost too much, or use an
excessive amount of RAM.  The
schematics for the "Do It Yourself"
kits are usually too technically
complex for all except an experienced
Electronics Technician.  Even the
schematics for the SPO256-AL2 are
obscure for someone who only knows the
very basics of electronics.  I have
tried to simplify things and have
eliminated all but the most essential
components.  I ended up with a
schematic that just about anyone
should understand.

The SPO256-AL2 Chip

The Radio Shack SPO256-AL2 chip is a
pre- programmed IC chip.  It has all
the basic speech sounds programmed
into it.  This means that no RAM is
tied up holding the speech synthesis
routines.  I won't elaborate too much
on how the words are formed from the
basic sounds, since the SPO256-AL2
comes with a small user's manual. This
manual contains a lesson on basic
speech production, a list of the basic
speech sounds programmed into the chip
and their decimal POKE equivalents, a
small dictionary of words and their
decimal equivalents, as well as the
technical data for interfacing.

The Circuit

There is nothing critical about the
circuit.  You may assemble it on a
perf board using wire wrapping, or if
you like, you may make your own
printed circuit board.  The parts list
is given in Table One.  The wiring
diagram is given in Figure One, and
the pin out configuration for the joy
stick ports is shown in Figure Two.

When building the circuit, install the
28-pin DIP socket first.  The use of
the socket is strongly recommended so
that you don't have to apply the
soldering iron directly to the chip
and risk burning it out.  Next,
install the resistors, capacitors and
cables.  The wires in the joystick are
color-coded, but as far as I know,
there is no correlation between the
color of the wire and the pin numbers.
Check each wire to be sure which pin
it corresponds to.

Table One:  Parts List

Qnty.
and ID   Description        Part #
======================================
C1-C4    1 4.47pF           272-121
C5       1 0.1uF 50v        272-1069
C6       1 1.0uF 16v        272-1434
R1       1 100K 1/4 watt    271-1347
R2       1  10K 1/4 watt    271-1335
IC1      1 SPO256-AL2       276-1784
Xtal     1 3.579 MHz        272-1310
         1 28 pin socket    276-1997
         2 Joystick Cables  276-1978
         1 Phone Jack       274-251
         1 Plastic Case     270-222
         1 Amplifier        277-1008

Attach the wires corresponding to the
joystick port's pins to the
corresponding pads on the circuit
board.  These are labelled in the
schematic diagram.  Install the
SPO256-AL2 chip last, after everything
else is in place.  Leave the chip in
its package until you're ready to
install it.  While this kind of chip
is very forgiving when it comes to
miswiring, it will give out quite fast
when faced with static electricity.
This means that you must make certain
that you are grounded and aren't
charged with static electricity
whenever you touch the chip.

There are two ways to hook up the
audio.  You may use a small battery
powered audio amplifier like the
#277-1008 that Radio Shack sells, or
you may take your RS-232 cable end
apart and solder a lead corresponding
to pin #11 of the CIO port, as shown
in Figure Three, to the center pin of
a miniature phono jack (Pin #11 is the
Cassette Audio pin.).  The sound will
be channeled through your monitor.  If
you do use this method, all other
computer generated sound will be cut
off until the connection is unplugged
from the Talk-Box.  If you plan to use
the speech synthesizer in conjunction
with programs that have sound effects,
use the first method.

Whichever method you choose, don't (I
repeat, DON'T) connect your computer
to an external, unregulated line
powered amplifier.  If you do, you
will most assuredly fry your computer
into Silicon Heaven.

Using the Talk-Box

All that has to be done to make the
chip pronounce a word is to POKE the
chip's decimal addresses (via the
joystick ports) with the numbers which
correspond with the group of sounds
which make up that word.  For example,
the word HELLO consists of four
sounds:  H/E/LL/O.  After you
determine the word's individual
sounds, look up the appropriate
decimal values in the data manual
supplied with the chip.  The word
HELLO would therefore be represented
by the numbers 27, 7, 45, and 53.

The joystick port must be configured
for output before you can POKE data to
it.  This is done by PEEKing location
54018, subtracting 4 from the value
found there, and POKEing the result
back into 54018.  Then you must POKE a
127 into 54016 and then returning
54018 to its original value.

Your program must check to see if the
SPO256-AL2 chip is busy before sending
any data to it through the ports. This
is done by checking bit 8 to see
whether it's high or low (viz. 1 or
0).  the chip sets this bit low when
it's not busy, and high when it is
busy.  When bit 8 goes low, you must
first POKE 54016 with (64 + the
decimal value of the sound you wish
produced).  Next, strobe bit 7 by
POKEing 54016 again with only the
decimal value of your sound.  This
lets the chip know there is data on
line, ready for it to accept.  The
chip will then accept the data and
simultaneously set bit 8 high again
until it is done making the sound.

Listing One is a small program to test
your Talk-Box.  Just type in the
listing and RUN it after you have
plugged the Tis up.
When the program is RUN, you should
hear it say, "Hello.  How are you?" 
If it doesn't, check to make sure you
plugged all the cables into the
correct ports -- the Talk-Box won't
work if they are reversed.  If it
still doesn't work, re-check your
wiring.

If at this time you're all confused,
don't worry about it.  You really
don't need to understand how the
process works to use your Talk-Box.
Just copy lines 100, 130 and 140 into
your own program.

Listing Two is a small word
development program.  It allows you to
quickly enter words so that you can
preview their sound.  This is
especially handy when you're not sure
which of several similar sounds will
produce the desired results.

When you RUN Listing Two, it will
prompt you to enter the decimal
equivalent of the first sound in your
word.  Type in the number and then
press RETURN.  Continue until all the
sounds of your word have been entered.
Then press RETURN again.  The program
will pronounce your word, and will ask
if you would like it repeated.  If
not, just press RETURN to continue.

There are many uses for a speech
synthesizer.  Use your imagination.
You might use it to give verbal error
messages, prompts, or any other
message that would normally be printed
to the screen.  I hope you enjoy the
project as much as I did.  If the
response is good, I'll see if I can
come up with some more easy projects. 
Did I hear someone mention a Do It
Yourself printer buffer?  Well, I just
happen to....

-- 
 Michael Current, Cleveland Free-Net 8-bit Atari SIGOp   -->>  go atari8  <<--
   The Cleveland Free-Net Atari SIG is the Central Atari Information Network
      Internet: currentm@carleton.edu / UUCP: ...!umn-cs!ccnfld!currentm
     BITNET: currentm%carleton.edu@{interbit} / Cleveland Free-Net: aa700


-----------------------------------------
Return to message index