The standard procedure for developing a simple microcontroller project used to be:
- Get the testbench ready with power supplies, scope and any required signal sources
- Grab the breadboard and the handy collection of already-stripped 22GA wire
- Straighten the micro's pins and plug it into the breadboard, along with any LEDs, buttons or other stuff needed for the project
- Start code development. The last time I was doing this, the cycle was
- Write some code
- Grab a blank device from the UV eraser
- Plug it into the programmer's ZIF socket and program it
- Put the programmed part on the breadboard, and try it out
- Notice bugs, return the chip to the UV eraser. While the device is being erased, come up with ideas for how to fix the bug
- Back to the start!
Things are simpler now: there's no need for UV erasers, for one thing. The tools are better too: rather than instrumenting the code to transmit state information over a UART, or blink LEDs at specific execution points, just single-step through the code in the IDE. Still, it's not perfect. Here's my simplest-possible project, which makes an LED throb from full bright to full dark over several seconds:
There are a few good things I can say about this method: it's simple and cheap. But mostly I don't like it: there's too much physical manipulation of wires and chips; it's too easy to accidentally destroy something; I'm always running out of the right kind of wire, the breadboard contacts wear out; hooking up scope probes is always troublesome - they seem to be carefully designed to rotate and jump off their clip point, then fall to the floor, dragging the breadboard with them - anyway, you can only probe the points which happen to be wired out to pins; creating a custom signal source which, say, mocks up some aspect of the application, for testing or analysis, probably means finding another breadboard to wire up, since the first one fills up quickly.
Of course I wouldn't be complaining about all this so much if I didn't have a solution in mind. Next: a better way.