Re: Universal Sound Board?

From: Clay Cowgill <clay_at_supra.com>
Date: Fri May 02 1997 - 13:10:25 EDT

>But I hated to give up the "cheapness" of the PWM output of the PIC in
>exchange for an external D/A and all the muxing involved, so I thought
>another possibility would still be to use the PIC as the output device,
>controlled by a master CPU.

Well, I'd kinda agree except that a dedicated 10bit DAC is only $1.50 and
an op-amp for the voltage output stage is only $.50, so if you already have
a "control" CPU you could just run the DAC directly and avoid the pics, and
the control CPU could use an external EPROM...

So there's a $1 8051 with support components ($1), EPROM ($depends), DAC
($1.50), TLO-82 ($.50)... Pretty cheap. The 8051 will run at about a MIP
at 12MHz, which should be good for a few voics, and the waveforms could be
complex from the ROM...

The same could be said for an 8051 (w/out external ROM) and a pair of
POKEY's... (grand total about $3 in parts...) :-)

>The PIC could either look at a parallel port, and when I receives the data
>adjust it's PWM counter's accordingly. Or it could use one of those
>dedicated serial ports (data/clock) which can be run *really* fast, as it's
>input. Since the PIC doesn't have to convert serial to parallel in
>software, this can be just as fast. Either method would allow the PICs to
>be nothing but dedicated D/A's with the possibility of 4 channels per PIC
>and very little external hardware.

Or if you're going to use serial anyway, just use a single PIC and one of
those Max528's. About $7 with serial input and 8 voltage output 8 bit
D/A's in one package...

>If you use one of the 33 I/O (40 pin) PICs, you can dedicate 8 lines to
>inputs, and the rest (minus the PWM, and sound trigger lines) to outputs.
>You can then connect the PICs outputs to the address lines of an external
>EPROM, and the PICs inputs to the EPROMs data lines. This allows for a
>*very* tight PIC loop, you set the outputs to the EPROM address, read the
>EPROMs data, adjust the PWM timer, lather, rinse, repeat. This can be done
>faster than if the data were actually in the PIC's ROM area!

Hmmm. That's an interesting approach. I kinda like it except those 40 pin
PICs are about $11 each... :-/

>A variation of this idea would be to have four loadable counters as the
>address pointers, with the PIC controlling the enable lines of the
>tri-statable counters. This way one write of the PIC could select between
>the four addresses of the four voices, which could then be incremented
>simultaneously. You could also use a smaller PIC. Each of the counters
>could also go to different EPROMS, in which case all the EPROM's data lines
>would be run in parallel and the EPROMs enable lines would be used as the
>data selection lines.

I've done something similar before-- but I skipped the presetable counters.
Instead I sent a few I/O lines to the top address bits that let me select
8K chunks of the EPROM (each "sample"). Then a single global "clear" line
cleared the counters and a single "clock" line (at whatever rate) played
the sample. (The EPROM outputs went directly to a little resistor based
D/A and into a lm386 audio amp.) (It was a weird little "digitized sound
doorbell" I made during college.)

Atari's Nightmare board uses two sets of presettable counters to load a
start address and a length, and then free-runs the counters to load out the
samples. Works nice, but takes two 16 bit writes to set the address and
another two for the length, and a bunch of board space for the counters...

>The ones that I bought a couple of, at Radio Shack, a while back were based
>on the shift register approach, they included a schematic of their guts.
>But that doesn't mean a thing, since most of what Radio Shack sells, they
>found in someone else's garbage, there is no telling what has been on the
>shelves of the "Shack" through the years. And it seems like I remember some
>noise IC based on a leaky (zener) diode.

I don't remember the part number. I know it's in the "yellow" Forrest
Mimms "Engineers Notebook" RatShack was selling around '86...

>The shift registers are definitely lacking in low end noise. Just compare
>the rumbling explosions used in Space War where a leaky transistor was used
>as the noise source and the hollow tinny explosions of Star Castle, where
>the shift register approach was used. The Space War is much nicer.

Yeah, that Space War sit-at *really* had a nice base rumble. Not as cool
as Blasteroids with the big 8" woofer pointed at you, but then I suspect
the Blasteroids sound board probably cost more than the entire Space War
PCB's... ;-)

-Clay

Clayton N. Cowgill Engineering Manager
_______________________________________________________________________
/\ Diamond Multimedia Systems, Inc. clay@supra.com
\/ Communications Division http://www.supra.com/
Received on Fri May 2 09:09:03 1997

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:32:03 EDT