[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Noisemaker": Need G.I. AY-3-8910 sound chip app note



I wrote:

: Does anyone have the application note that engineers at General
: Instruments (now Microchip), possibly on an unofficial basis, issued on
: the AY-3-8910 sound chip?  They also produced a 28-pin '8912 which didn't

: I just received, from Michael MacKenzie, photocopies from a 64 page
: booklet entitled: AY-3-8910/8912 Programmable Sound Generator Data Manual.

I talked to my engineer, gave him the table of contents, and he says
that's the book.  (Apparently it's been typeset since he first saw it as a
typescript.)  He's still convinced it's got "bell" sound instructions, 
but no matter.

I have discovered, by fiddling with the envelope controls, that it's got 
the capability to simulate something closely approximating what I want; 
or at least it sounds better than what I've got.  It's a decay envelope...
It even keeps repeating... The wave form looks something like this
\__\__\__\__\__\__   so it goes Pinggggg Pinggggg Pinggggg Pinggggg...


A couple of people have written saying they've got a card or something 
using the chips and don't know how to use it.
Well I know a little bit about it... And if you're struggling to 
interface the card at all, here's a couple of tips.

First of all the PSG (that's the name of the chip, Programmable Sound 
Generator) has 16 registers.  (0-15 decimal/0-F hex/0-17 octal.)  
The last two are i/o ports, if we're just making noises then we just 
worry about $0-$D.  The first 6 are frequency controls; $0-$1 is a LSB 
word, $2-$3 is another, $4-$5 is another.  Valid values are $00-$FF for 
the low bytes, $00-$0F for the high bytes. (12-bit control of frequency.)
The other registers do other things, I'll go into them later, but let me 
tell you of a byte value you can write to all 14 registers and have it go 
pinggg-pinggg-pinggg for you to: $36. (That's 070 octal, 56 decimal.) 

If you're trying to interface to an old Apple II board, you might have a 
situation where the 16 ports $0-$F are wired directly into a set of 
addresses $XXX0-$XXXF.  Or, they could be latched, where you'd write a 
value of $0-$F to one location $XXXX and write the data byte to another 
location such as $XXXY.  (It turns out that's how my game board works, I 
have to write to $0002 with the register number and to $0004 with the value.)

So, if you go ahead and write that data byte I gave you, $36, to the 
first 14 registers, you should get an analog signal coming out of the 
appropriate pin that makes a Pinggg-Pinggg-Pingg sound.  And you don't 
have to keep toggling it, either; once you set up the sound, it repeats 
until you kill it.  ($00 to all ports will kill it.  So will a reset.)


That's where I'm at so far.  When I get something that's bell-like enough 
for my uses, I'll let you know how it all turns out...



--
hazel-chaz@netcom.com - Home of Margarita Jell-O, an alcoholic use for lime
jello.  Email me w/  "request margarita"  in subject or as 1st line of message
and a robot will send you the recipe. More recipes, ftp.netcom.com:/pub/hazel

* L.A.con III * Aug29-Sep02 '96, Anaheim CA * Infobot: lacon3-info@netcom.com
* '96 WorldCon * Join for $90 * L.A.con III, P.O. Box 8442, Van Nuys CA 91409