Let's just get the schematic and PCB layout link out right away.
At first glance, this may appear nothing more than a breakout board for a DIP component, which is arguably somewhat pointless. But the in-system programming (ISP) connector does add a nice benefit for prototyping with ATmega48/88/168/328 microcontrollers, especially if you're using a programmer with a 10 pin connector, for example the nicely cheap and open USBasp.
Obviously I do not care for Arduino. But on the other hand, I cannot just state this and not provide an alternative. So once I wrote all about the prototyping board and its evolvement, I'll compose a second post about actually using it with basic AVR development tools, mainly avrdude.
How it started
It was one of those nights where I began a new project and built it up from scratch on a breadboard. I had still some other project ongoing by that time, which wasn't too much of a problem logistics wise as I had a spare breadboard lying around. However, what I did not had lying around was a spare ISP adapter. Cutting edge technology like my adapter is hard to come by, so I always had to share my state of the art homebrew adapter for every project.
The previous project grew over time and by the time I needed the ISP adapter, it was just one lump of wires and components. Applying some faith in one's soldering skills (and in Chinese breadboard wire quality), and one gentle pull later it was ready for new adventures. Luckily the previous project moved already to the PCB prototyping stage, so I wouldn't need to get the adapter back in that mess of wires.
Still, there had to be a better way for future endeavors. Also, ignoring anything that could be done with an ATtiny controller, the ATmega328 and its brothers are my go-to microcontroller for any 8bit AVR stuff, so I wouldn't necessarily be looking for an all-size-fits-all solution.
Finding a better way
Naturally the first idea was to just build a second ISP adapter. But this was already more of a half-assed solution, and I'm surprised this one lasted that long in the first place. Plus, come to think of it, I did have some minor stability issues with programming the flash memory every once in a while. Might have been the wiring?
It didn't take much to end up with a breakout board that comes with an ISP connector attached. And, since I always add my little decoupling capacitor, I just throw that in the design as well. Off to OSH Park with the first revision.
Revision A
I was clearly too eager to get a prototype as quick as possible, so I just started designing without really thinking about the dimensions, and definitely not thinking about the impact of the dimension when using it in a breadboard.
Considering you most likely want to connect something to the controller's pins, this is a pretty useless prototyping board. Yeah sure, it will work if you only need a single wire per port, but I wasn't going to rely on that.
Time for a redesign; squeeze the connectors closer to the controller - yes, sacrificing the pin numbering along with it - and reduce the PCB borders. And while I'm at it, add a jumper to optionally connect analog voltage AVCC to VCC, although I can't fully explain why I did that. And off to OSH Park again.
Revision B
After waiting the usual two weeks - give or take - to get my Perfect Purple PCB to Finland, I was satisfied with the result of my redesign.
Yes, I am still sacrificing a row on each side, and the actual benefit may seem marginal. After all, it's merely more than adding the ISP connector. But I do believe it's still worth the sacrifice for a tad smoother prototyping start.
Hooking it up
Time to connect a 10pin ribbon cable to the protoboard holding an ATmega328P and an USBasp programmer plugged into a USB port.
As you can see, this works even standalone without a breadboard, but it is supposed to be a prototyping board after all, so I'll most likely still want the breadboard connecting option.
So, the USB hub and USBasp programmer have some LEDs shining, that's a good start, let's see what avrdude has to say.
$ avrdude -p m328p -c usbasp
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: Fuses OK (E:F9, H:DF, L:E2)
avrdude done. Thank you.
$
And avrdude says that it was able to read the device signature and the fuses, and we didn't ask for more, so that's perfect. It's safe to ignore the warning.
But just to be sure, I'll try to flash a .hex file to it and see if it succeeds.
$ make program
avrdude -p atmega328p -c usbasp -U flash:w:4chordmidi.hex
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "4chordmidi.hex"
avrdude: input file 4chordmidi.hex auto detected as Intel Hex
avrdude: writing flash (8876 bytes):
Writing | ################################################## | 100% 7.02s
avrdude: 8876 bytes of flash written
avrdude: verifying flash memory against 4chordmidi.hex:
avrdude: load data flash data from input file 4chordmidi.hex:
avrdude: input file 4chordmidi.hex auto detected as Intel Hex
avrdude: input file 4chordmidi.hex contains 8876 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 4.56s
avrdude: verifying ...
avrdude: 8876 bytes of flash verified
avrdude: safemode: Fuses OK (E:F9, H:DF, L:E2)
avrdude done. Thank you.
$
Yes. Yes it did. The protoboard is ready for ..well, prototyping.
What's next
Next step is to actually just use it and focus on other things.
But one day I might add more boards for other controllers such as the ATtiny24/44/84 and ATtiny25/45/85. I might also add a board with USB connector and basic components to have a V-USB prototyping board.
But my main intention is to have a no frills board and keep it as simple as possible.