Page 4 of 4

Re: Connecting a AY-3-8910 to the 6502 bus.

Posted: Sat Jul 01, 2017 9:48 pm
by GARTHWILSON
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.

Re: Connecting a AY-3-8910 to the 6502 bus.

Posted: Sat Jul 01, 2017 11:52 pm
by Martin_H
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?

Re: Connecting a AY-3-8910 to the 6502 bus.

Posted: Sun Jul 02, 2017 12:13 am
by GARTHWILSON
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:

Image

or here's a 2-input NAND gate:

Image

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.

Re: Connecting a AY-3-8910 to the 6502 bus.

Posted: Sun Jul 02, 2017 3:59 am
by BigDumbDinosaur
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?
Unused inputs on CMOS devices should be grounded or pulled up to Vcc, whichever is convenient. Do it through a 3.3K resistor and that way you'll be able to use the input later on if you decide you need it.

Re: Connecting a AY-3-8910 to the 6502 bus.

Posted: Sun Jul 02, 2017 3:58 pm
by Martin_H
@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.

Re: Connecting a AY-3-8910 to the 6502 bus.

Posted: Tue Jul 04, 2017 9:14 am
by PaulF
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.

Re: Connecting a AY-3-8910 to the 6502 bus.

Posted: Tue Jul 04, 2017 4:12 pm
by GARTHWILSON
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.

Re: Connecting a AY-3-8910 to the 6502 bus.

Posted: Tue Jul 04, 2017 9:03 pm
by BigDumbDinosaur
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.
Talk about living dangerously! :shock:

Re: Connecting a AY-3-8910 to the 6502 bus.

Posted: Thu Jul 06, 2017 9:22 am
by PaulF
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.
Talk about living dangerously! :shock:
PIC chips have heavy duty input diodes and Microchip actually suggest this in their application notes! I wouldn't like to try this with a normal CMOS chip.

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!

Re: Connecting a AY-3-8910 to the 6502 bus.

Posted: Tue Jul 11, 2017 1:08 am
by Martin_H
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

Re: Connecting a AY-3-8910 to the 6502 bus.

Posted: Fri Jul 14, 2017 3:54 am
by dwight
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