Chuck wrote:
Yup. Nothing like downloading your code into a little
6-pin
cockroach of a PIC only to find it totally unresponsive. Maybe
there's a job description for "electronic psychic". "I've
channeled
your PIC and it says you forgot to set up the TRISIO register, you
stupid idiot." :)
When people I know do development for the low pin count devices, they
prototype using a part with a higher pin count, and debug using one
or more of these techniques:
1) in-circuit-debug - two port pins, plus ground and MCLR (reset) are
used with a Microchip ICD2. Limited usefulness
for debugging things that have to occur in
real time
2) serial I/O - hook up a PC acting as a dumb terminal, and spew
debug messages to it. conceptually same as "printf
debugging"
3) port flags - use one or more GPIO pins as flags to indicate on
a scope or logic analyzer that some internal event
has occurred, or that a particular place in the
code has been reached
4) scope loops - same concept as #3, but specifically used as a trigger
for a scope or logic analyzer for repetitive events,
when it is desired to watch what is happening on
external signals when the event occurs (before,
during, or after)
Although I occasionally do the "blind debugging" approach, that's
certainly not my preferred method, and there's usually no reason
why things have to be done that way.
Eric