Connecting a AY-3-8910 to the 6502 bus.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Connecting a AY-3-8910 to the 6502 bus.
On DC, CMOS inputs don't conduct except maybe a few picoamps or femptoamps of leakage; so you don't have to think about current-limiting the inputs. Don't leave any inputs floating though.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Connecting a AY-3-8910 to the 6502 bus.
Thanks, good to know.
Given that I pulled the /ena high, I left the two inputs floating because according to the datasheet their values don't matter to the output in that situation. Should I still pull them high anyway?
I thought the idea of pulling unused inputs high or low was to prevent the output from fluctuating and causing excessive current draw. But in this case the outputs are fixed. Or is this to prevent gates internal to the IC from alternating between states?
Given that I pulled the /ena high, I left the two inputs floating because according to the datasheet their values don't matter to the output in that situation. Should I still pull them high anyway?
I thought the idea of pulling unused inputs high or low was to prevent the output from fluctuating and causing excessive current draw. But in this case the outputs are fixed. Or is this to prevent gates internal to the IC from alternating between states?
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Connecting a AY-3-8910 to the 6502 bus.
If you leave them floating, the tiny amount of capacitive coupling to other toggling lines (or any electrical noise pickup) can cause them to toggle also, quickly flipping the state of circuits inside and charging and discharging parasitic capacitance and thus increasing power draw.
The greater problem however is that if an input is not pulled one way or the other, it could remain in a zone where neither of the transistors it is connected to in a totem pole configuration in the IC is totally turned off, so both are conducting a little, so it wastes power. Consider this inverter diagram from Wikipedia:

or here's a 2-input NAND gate:

If input B is high so it's trying to pull the output down, and input A is in the middle so both A transistors are conducting a little, there's power waste. Ideally things are either on or off so that if there's no load, there's no current either.
The current shouldn't cause enough heating to damage anything, but why waste it.
The greater problem however is that if an input is not pulled one way or the other, it could remain in a zone where neither of the transistors it is connected to in a totem pole configuration in the IC is totally turned off, so both are conducting a little, so it wastes power. Consider this inverter diagram from Wikipedia:

or here's a 2-input NAND gate:

If input B is high so it's trying to pull the output down, and input A is in the middle so both A transistors are conducting a little, there's power waste. Ideally things are either on or off so that if there's no load, there's no current either.
The current shouldn't cause enough heating to damage anything, but why waste it.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Connecting a AY-3-8910 to the 6502 bus.
Martin_H wrote:
My 79HC139 arrived from Digikey and I have wired it up. But before I apply power I want to check one thing. I am only using half of it, so I assume the second decoder should be disabled by tying its enable line to 5 volts?
But should I use a pull up resistor to avoid too much current into the input, or is it current limited?
But should I use a pull up resistor to avoid too much current into the input, or is it current limited?
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Connecting a AY-3-8910 to the 6502 bus.
@All, thanks for the help. I made the required changes, and I was able to set the digital outputs low and high using my sample. I then switched to my BASIC program and was able to get a sound out of the AY-3-8910. Now I need to learn how to program the AY-3-8910 to get a pleasant sound out of it.
Because of shipping costs I always order parts for current and future project. But it seems like every Digikey order I order one incorrect part. In this case I accidentally mixed up the part numbers and ordered 74HC30 instead of a 74HC02. Needless to say that didn't work, but that order also included a 74LS02 for another project, and that seems to work. Next order I will correct that.
But I am slowly building up an inventory of wrong parts. With luck they'll eventually be useful for something.
Because of shipping costs I always order parts for current and future project. But it seems like every Digikey order I order one incorrect part. In this case I accidentally mixed up the part numbers and ordered 74HC30 instead of a 74HC02. Needless to say that didn't work, but that order also included a 74LS02 for another project, and that seems to work. Next order I will correct that.
But I am slowly building up an inventory of wrong parts. With luck they'll eventually be useful for something.
Re: Connecting a AY-3-8910 to the 6502 bus.
There is another reason why you must always connect all the inputs of a CMOS logic IC.
With their very high input impedance, it doesn't take much charge to build up sufficient voltage to overcome the insulating layer between the MOSFET gates and the channels. Stray static is sufficient. When this happens, the accumulated charge blows a hole in the insulating layer, destroying that transistor. This is why MOS devices are static sensitive and should always be handled with care.
Congratulations on getting your AY-3-8910 to make sound Martin. Glad I was able to help.
With their very high input impedance, it doesn't take much charge to build up sufficient voltage to overcome the insulating layer between the MOSFET gates and the channels. Stray static is sufficient. When this happens, the accumulated charge blows a hole in the insulating layer, destroying that transistor. This is why MOS devices are static sensitive and should always be handled with care.
Congratulations on getting your AY-3-8910 to make sound Martin. Glad I was able to help.
Shift to the left,
Shift to the right,
Mask in, Mask Out,
BYTE! BYTE! BYTE!
Shift to the right,
Mask in, Mask Out,
BYTE! BYTE! BYTE!
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Connecting a AY-3-8910 to the 6502 bus.
Most CMOS logic devices have static protection diodes at their inputs; but they're tiny (to hold the input capacitance down) and a good zap will blow the diodes too. At a seminar I went to, they mentioned that someone was using the line voltage (120VAC) as a 60Hz reference for a PIC16 microcontroller, using a huge resistance in series (maybe 10M or 22M—I can't remember) to hold the current down to something that the input protection diodes could handle continually with no damage.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Connecting a AY-3-8910 to the 6502 bus.
GARTHWILSON wrote:
...someone was using the line voltage (120VAC) as a 60Hz reference for a PIC16 microcontroller, using a huge resistance in series (maybe 10M or 22M—I can't remember) to hold the current down to something that the input protection diodes could handle continually with no damage.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Connecting a AY-3-8910 to the 6502 bus.
BigDumbDinosaur wrote:
GARTHWILSON wrote:
...someone was using the line voltage (120VAC) as a 60Hz reference for a PIC16 microcontroller, using a huge resistance in series (maybe 10M or 22M—I can't remember) to hold the current down to something that the input protection diodes could handle continually with no damage.
I once saw a scanning electron microscope image of a CMOS chip that had been blown by static. There was a crater in the silicon with debris around it. It looked like the chip had been hit by a bomb!
Shift to the left,
Shift to the right,
Mask in, Mask Out,
BYTE! BYTE! BYTE!
Shift to the right,
Mask in, Mask Out,
BYTE! BYTE! BYTE!
Re: Connecting a AY-3-8910 to the 6502 bus.
This has now moved from a hardware to a software project. This thread has a video of my using the sounds chip from Forth:
viewtopic.php?f=9&t=4610
viewtopic.php?f=9&t=4610
Re: Connecting a AY-3-8910 to the 6502 bus.
There are several commonly used CMOS parts that are easily
damage.
The 4051, 4052 and 4053 can be easily damaged when not in
a circuit. The mux data pins have no protection.
Most can handle a reasonable amount of discharge but damage
may not show for some time.
If you live in an area when getting up from a chair creates a
painful shock, consider always working with a grounding strap
when working with solid state electronics.
Dwight
damage.
The 4051, 4052 and 4053 can be easily damaged when not in
a circuit. The mux data pins have no protection.
Most can handle a reasonable amount of discharge but damage
may not show for some time.
If you live in an area when getting up from a chair creates a
painful shock, consider always working with a grounding strap
when working with solid state electronics.
Dwight