ay-3-8910 chip select? (ym2149)

Hi.

So I'm currently working on a project to make a MIDI capable synth out of several ay-3-8910 chips (really ym2149, but they're exactly the same chip)

So I've already have a working prototype using one chip and now I'm trying to expand to two chips, but I'm entirely stuck on how to figure out how the chip select feature works, if it even works. The manual is very vague and I don't really understand what it's saying.

Basically I want to interface the two chips with same 8 bit data bus from an Arduino and then use the high order addressing bits to select which chip should take the commands. But currently it almost sounds like the addressing of the chip needs to be factory programmed some how, and I might not even be able to do it on my own. In essence, I cannot figure out how to make one of the chips to "listen" to a higher addressing range then what is set as default.

The manual of the chip is here: http://f.rdw.se/AY-3-8910-datasheet.pdf

The part I'm confused about is the image attached.

I was merely wondering if anyone knows, perhaps not exactly regarding this chip, but how chip selection stuff generally works (worked back in the days) and could shed some light on this. It seems to me that I somehow need to program the chip to recognize another high order address other then 0000, but the manual does not say anything about how this is achieved.

Hi,

I dimly remember doing something with one of these... really odd interface, not the usual ChipSelect, Read/Write sort of thing.

In the Pin Functions section there's a table of BDIR, BC1, BC2 pin functions
Diagram:

So you have to handle all 3 of those pins to set address, read, write etc.

When setting an address, you set the pins as per the clip you posted and then pulse BDIR/BC1 as per the timing diagram.
I think you can just hard-wire A9=0, A8=1 and BC2=1 on both chips.

With two chips you have to drive BDIR, BC1 separately for both chips, leaving one of them with
BDIR=0, BC1=0 (the INACTIVE, high impedance state) while driving the other one.

Yours,
TonyWilk

Hi, thanks.

But I know how to set the address and drive the chip, as I wrote, I already have a fully working version using only one chip. It was more the chip select thing that I was confused about. But after googling mask programming a bit now I've come to the conclusion that the chip needs to be "brunt" at manufacturing in a certain way in order to accept any other high order bit combination as address, which in turn would allow for several chips to be used in parallel with only one data bus and only one BC1/BDIR bus.

But I also now figured out that if I only change the state of either A8 or A9 on a chip to what it's not supposed to be, then the latch bus will go inactive on that chip, so if I simply connect A9 of one chip to A8 on the other, and drive that from one pin on the arduino I can effectively select which of the two chips are active so I guess that'll work for 2 chip for now. Could do the opposite as well for 4 chip.

But after googling mask programming a bit now I've come to the conclusion that the chip needs to be "brunt" at manufacturing

I assume you mean burnt.

In an Arduino system you use another pin to connect to the chip select of each of the two chips. The one you put low before all the writing to it is the chip that gets activated. In this case the chip select is the one labeled A9.

Parrin:
... allow for several chips to be used in parallel with only one data bus and only one BC1/BDIR bus.

Yes, that does make sense.

The only reason to have A8,A9 would be to differentiate this device from others in the chipset which implies that after a LATCH ADDRESS the following READ FROM PSG would leave the data lines high impedance if the address did not match.

I couldn't see that explicitly stated in the datasheet, it just says "READ FROM PSG... DA7-DA0 are in the output mode"

so if I simply connect A9 of one chip to A8 on the other, and drive that from one pin on the arduino I can effectively select which of the two chips are active

Yeh, go for it.

Yours,
TonyWilk