m00dawg wrote:I put that in the simulator and it seems to work, but why would I not use a diode off the pin?
The point of the circuit above is to protect against static discharge, which can be thousands of volts in either sign. A single diode into or out of the pin would only potentially protect against one or the other charge, not both simultaneously.
Wouldn't reverse voltage from the output still end up flowing back into the pin? I thought that was basically what I was protecting against there (as well as shorts to ground and stuff). Went to Wikipedia and didn't find much I actually understood about what's going on :)
By having two diodes there, one from ground, one to +5v, we guarantee that a voltage that is too high or too low can go somewhere rather than through the NES CPU itself. The idea is "+large volts goes through resistor, through diode, to +5V; -large volts goes through resistor, through other diode, to 0V". Also "resistor guarantees that shorting out output doesn't damage NES CPU either."
The electrolytic cap was mentioned on one of the PowerPak mod sites. I can try to go hunt it down if need be. I noticed the MB-SID output (available
here) uses an electrolytic but also has a few smaller ceramic caps. That output pipeline uses a transistor (I guess similar to the original NES there) which I am guessing is some sort of op-amp type of thing?
For the SID audio stage there, the 10uF capacitor C5 and 1uF capacitor C6 are DC blockers so that the sampler and SID get a 0VDC-centered signal. But they're not protecting anything.
Super-Hampster wrote:You can't pass audio through a diode. It's a rectifier and only allows DC current to flow. And since audio signals consist of an AC current with varying frequency A diode only allows current to flow in one direction. So since AC requires the ability to flow in both directions you would get no audio output.
One, you're assuming a circuit topology different than I specified above — I never wanted the audio to go through the diodes. Two, audio can flow through a diode — how do you think a crystal radio works? The audio signal out of the NES has both a DC and AC component, it's not centered on 0VDC; while -3V doesn't** flow through a diode, both 1V and 5V flow through a diode, and a signal that's 3V+2V*sin(t) will pass just fine. (And probably come out looking like 2V+2V*sin(t))
Super-Hampster wrote:To test that I just tried it. It didn't work. Touched the wire minus the diode to the NES sound output and heard NSF playing on powerpak. Put diode in between in either direction and no audio.
Of course that didn't work, the diode wasn't forward biased.
Diodes proved to be impossible way to keep the channels separate because they wouldn't pass the audio.
But a bunch of sufficiently large resistors should have worked fine.
I haven't tried it straight from the CPU however. I've only tried it from the audio out pin.
Yes, looking at the audio path the DC component is removed by the NES audio filter — that's the point of the 10uF capacitor in the image I posted at the top. This won't work on the white jack out the back. Two, putting a diode in
series likely won't work even out of the NES CPU itself, because most diodes have a minimum forward voltage of 0.6V and the NES audio is probably less than that.
** actually, negative voltages do flow a little bit.