The Functional Test
If everything’s gone smoothly, you now have a chip that’s programmed with your test firmware. If you’re using a circuit similar to the one at the beginning of this article, you’ve probably noticed that there’s no external power supply connection. Instead, the circuit is designed to be powered by the Bus Pirate.
It’s a really handy tool.
Since that’s what I built, all I had to do is tell the Bus Pirate to power on — but to do that, I need a serial terminal program. On the Mac, the first option is to use screen as a terminal program:
$ screen /dev/tty.usbserial-AH00MPIC 115200
This will open a screen session pointed at the serial port at 115200 bps, allowing you access to the terminal device. To exit, type CTRL-A CTRL-K and say yes when it asks you to confirm. The downside here is that screen intercepts CTRL-A, which can be annoying at times. It also prevents your terminal window’s scrollback buffer from working properly.
Fortunately, I recently discovered an alternative, which is part of the UUCP software stack:
$ sudo cu -s 115200 -l /dev/tty.usbserial-AH00MPIC
This will “call up” the host attached to the specified serial port, operating in much the same manner as screen – except that it doesn’t intercept control characters, and it doesn’t mess with your terminal window’s scrollback buffer. I find this to be eminently more workable than screen.
To exit, type “<enter>~.”. There will be a brief delay, and then the program will exit.
To activate the power regulators on the Bus Pirate, the sequence looks like this:
pegasus:tiny13demo steve$ sudo cu -s 115200 -l /dev/tty.usbserial-AH00MPIC Connected. HiZ>m9 Ready DIO>W Power supplies ON DIO>~. Disconnected. pegasus:tiny13demo steve$
And sure enough, we have blinkenlights!
Thanks for this! I’ve been using microchip’s PICs a fair amount, and wanted to start trying AVRs to see if they might be more simple. This will be a nice starting point.
Um. This is a serious cliffhanger – or did Part2 get blown with the wind^Wfuse? Is there still hope?
Thanks anyway for the nice introduction, as a late adopter I appreciate it a lot. Everyone else is using RasPis now, but AVRs are fun for someone who decades ago had to learn and write (mainframe) assembly code!