Tony Duell wrote:
And hopefully find the
bug (or alternatively find that the microotroller is defective, which is
unlikely).
Ugh, I've had that happen. Once on a PIC that had taken a hit from a 24V
power supply, and once on a new-in-tube W65C02SP (which had a seriously
screwed up ALU).
I didn't find debugging PIC code particularly
pleasant. I was using all
the I/O lines in the system, so I couldn't (sensilhly) output a value on
some port pins when the progrma got to a particular point. In any case,
you go mad continually re-assembling the code with different points
'marked' in this way.
You know, there is a reason Microchip released the ICD2, ICD3 and
PICKit2 Debug Express. All of the three support in-circuit debugging
over the programming pins -- set a code breakpoint (or watchpoint), wait
for it to trigger, then dump the program state.
Beats the LEDs-and-switches debugging method, or the "hook a terminal
up" trick...
--
Phil.
classiccmp at philpem.me.uk
http://www.philpem.me.uk/