On 2 Aug 2007 at 23:52, Pete Edwards wrote:
I've just got to a major milestone on a 6502
based prototype (ie it
actually runs my code :) and I've got to say I felt I'd actually
achieved something special after debugging with nowt but a meter and
led+resistor probe(s).
Good job! It's surprising how far one can get without a scope or a
logic analyzer. I'd recommend, though, that you put together a
"pulse sniffer"--little more than a one-shot driving an LED to
"stretch" pulses so they're easily visible. Often, a simple LED
Another one is to used an edge-triggered flip-flop (74F74 or simiar).
Reset it buy hand, tie 'D' high, the clock input to the signal you want
to look at and an LED + resistor from Q/ to Vcc. That one leaves no doubt
that a pulse has come :-)
Be aware that such simple testers tell you nothing about the timing of
the signals, and that can be very misleading. Recently I was debugging an
HP9820 'calculator' which uses a bit-serial processor. Data is shifted
into the MSB end of various registers, out of the LSB end (that is normal
enough). Anyway, on the M register (Memory address), bits 15...12 were
changing (detected with a logic probe type of text), the other bits were
all stuck low. Since this is built up from 4 off 7495 chips (each one 4
bits), my first gueess was that the chip handlinh bits 11...8 had failed
-- the outputs of that were stuck low, then 0's were always being shifted
into the lower 2 chips, so those were low too.
So I changed it. No change to the fault _at all_. Not only did the
machine not work, sitll, but bits 11....0 of the M register were still all
stuck low. It's only after I got out a logic analyser and looked at the
timing of bits 15....12 that I realised the timing was crazy, with pulses
of half the clock period on the outputs, and the outputs were always low
when the active edge of the clock occured. That meant all the lower shift
regitster section correctly shifted in a 0 from bit 12. I replaced the
high nybble chip (actually using the one I'd taken out from bits 11...8
-- 7495s are not common!), and the machine sprang to life.
-tony