Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Use a single 74595 to drive two different IC's??

Reply to topic
Author Message
  • Joined: 02 Feb 2021
  • Posts: 1
Reply with quote
Use a single 74595 to drive two different IC's??
Post Posted: Tue Feb 02, 2021 2:13 pm
I'm trying to build an audio circuit with as few parts as possible. Also, I really need to limit the number of pins used on my Arduino.

I didn't ask this in the Arduino site because I don't think this is specific to Arduino but I wanted to mention I was using it just in case.

Anyway, I have two sound chips. Each one has an 8-bit data/address bus that I have driven off a 74x595 (can't remember exactly which one at the moment).

When using either audio IC, everything is fine. But, what I want to do is possibly use the same shift register to drive BOTH music IC's.

Unfortunately, neither audio IC seem to have a way to put them in high impedance mode (SN76489 and AY-3-8912) that I can tell. Plus, they both are designed to play notes while the CPU does other things so simply resetting (or disabling somehow) one while the other received data would stop their current notes from playing.

My first thought was to use some kind of octal bus transceiver but I've never actually designed a circuit with one. But if I'm not mistaken, wouldn't I have to electrically disconnect one audio IC from the data bus while the other receives data?

Or, is there simply a better way. I'm struggling with adding that bus transceiver vs. simply pulling three more pins from the Arduino and using a second shift register. But if I did that, I would have to use the audio pins for digital logic. Which I know is technically OK. I was just trying to avoid it.

Any tips would be appreciated.

Thanks.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14732
  • Location: London
Reply with quote
Post Posted: Tue Feb 02, 2021 9:45 pm
Moved to the development forum as it's more likely to get an answer here...
  View user's profile Send private message Visit poster's website
  • Joined: 12 Apr 2005
  • Posts: 391
  • Location: London, United Kingdom
Reply with quote
Post Posted: Wed Feb 03, 2021 1:49 am
> But if I'm not mistaken, wouldn't I have to electrically disconnect one audio IC from the data bus while the other receives data?

Not normally, no, devices are all directly connected to the same data bus and they will only drive the data bus when they need to. I/O devices will normally have some sort of "chip enable" pin on them and when the chip is disabled it will leave its data lines in a high-impedance state (however it will continue to produce audio, the chip enable pin is for the purposes of addressing it, not switching its main function on or off).

Even when the chip is enabled it will only drive the data lines if you're reading data back from it.

The SN76489 is an easy one in particular as you can only write data to it anyway, you can't read back from it, so its data pins will always be high-impedance.

You _can_ read data back from the AY-3-8912, but I assume you're not planning on doing that. Unfortunately it does have a somewhat more complicated way of interfacing it to a microcontroller so you can't get away with a single chip-enable line - if you look in the datasheet you can see that if you pull BC2 high you can see that when BDIR and BC1 are low that is the chip's "inactive" state.

The datasheets for both chips mention the inactive/high-impedance state you're after and also describe the various bus control pins, I'd suggest looking at those and at the timing diagrams for the correct way to write data to the chips.

Do you have a rough circuit diagram of what you're trying to set up at the moment?
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!