- Joined: 15 Dec 2017
- Posts: 2
|
Use a single 74595 to drive two different IC's?
Posted: Fri Dec 15, 2017 6:32 am
|
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.
EDIT
Another idea I had would be to use a 16-bit shift register and split the bus. I would drastically have to change my audio drivers but that might work. Unless there is a better way...
EDIT 2
OK, two shift registers chained together may NOT be a good idea.
Think about this:
The AY-3-8912 requires two 8-bit writes (address then data). The SN76489 only requires one 8-bit write.
So, if my data were:
$A5 $38 // AY
$78 // SN
Sending an $A5 then $38 would put $A5 on the SN data bus. Then things would get out of sync.
Plus, now that I think about it, the VGM data format (that I am using) also has non-IC commands like pause commands. So I could get a pause command that is three bytes long.
Keeping all of this padded/sync'd seems like a nightmare.
Ugh...
|