On 2014 Jun 30, at 8:34 PM, Jim Brain wrote:
Trying to help out some folks on the cbm hackers list
read the
6500/1 ROM in the 1520 plotter. It turns out, based on the data
sheet, there is a way to put the CPU in a "test" mode and send
opcode data to the CPU, and we are going to try to to use that to
read the contents of the ROM.
The test mode is engaged by placing 10V on the RESET pin.
And, you know, before tonight, I thought I was at least average on
transistor theory and application, but I'm stumped, and I'm hoping
someone can help.
To support 3 voltages on RESET (0,5,10), I placed a 2n3904 with the
collector on the RESET pin, and emitter on ground. base is biased
via 10K resistor to an IO pin on an AVR uC I am using the drive the
CPU. That works fine.
TO support putting 10V on the RESET, I built a PNP/NPN pair. PNP
has E on 10V, C on RESET, and B is biased via 10K to C on NPN. B
on NPN is biased via 100K to another IO pin, and E is at GND.
The thought was that driving the IO pin high, the NPN will pull the
PNP base to ground, thus turning on the PNP, and placing 10V on RESET.
And, it works, but it "fades". Over 2ms, RESET slow falls from 10V
to ~6V. If I turn the transistor off and then back on, the cycle
repeats.
So, I obviously am doing it wrong, but I can't seem to determine
where my theory fails me, and I thought someone on here could help
(or suggest another simple way to support 3 voltages on the RESET
pin under SW control.
The datasheets (at least those found at
http://www.commodore.ca/
commodore-manuals/mos-commodore-semiconductor-group-6500-6502-
processor-cpu-manual/) are rather poorly specced, they don't go into
just what the special characteristics or input structure of that
reset pin are - how the +10V is sensed internally.
Normally, you don't want to drive chip inputs at > Vcc because input
protection diodes or parasitic on-chip diode junctions kick into
forward conduction, drawing current from the chip Vcc, out the input,
through (your PNP transistor), to +10. That clamps the voltage on the
input at Vcc + (~ 0.6 or something greater), in the vicinity of the
+6V you mention.
This reset input is supposedly (the datasheet is contradictory) able
to tolerate excess voltage, but it may need current limiting.
If the PNP-E = +10V and PNP-C = ~ +6V, then the PNP transistor is
saturating. With the bias resistors you have the PNP CE current could
be (off-the-top-o-the-head calc) maybe 100mA (!) through the reset
input(!). Do you have any indication in your setup of what is
happening with current on the +10 supply and +5 supply?
You might try putting a current limiting resistor of say 10K in the
PNP-C to reset-pin line.
The reset input may still clamp at ~ +6V, but it will be safer for
the chip.
You could/should also add a (say) 1K R from PNP-C to +5 to give a
decent pull-up when both your reset drive transistors are off. (In
proper operation), that should speed up transitions to 'high'/+5 on
the reset input.