Monday, February 17, 2014

Breadboard programming cable for ATtiny85, ATtiny88, ATmega328, ATtiny2313, and other AVR MCUs

For programming AVR MCUs, I use a USBasp.  Initially, I would connect the USBasp header pins to header pins on the breadboard with individual jumper wires, then jumper the appropriate pins on the MCU.  Then I noticed a repeating pattern in the pinout of many AVRs.  Here's an example:
Notice the pattern?  MOSI, MISO, SCK, & VCC are all in the same order.  Then I found this page with instructions on building a programming cable for an Arduino mini.  I decided to build a simpler programming cable that would work on a number of AVR MCUs and Pro Minis with a minimum of jumper wires.  Here's the pin arrangement I decided on:

  • GND
  • RST
  • VCC
  • SCK
  • MISO
  • MOSI
The connector works on the ATtiny85 and ATtiny2313 with 2 jumpers (GND & RST).  It needs 3 on the pro mini (GND, RST, & VCC), and with the ATtiny88 and ATmega328, just 2 jumpers are needed - RST and one connecting AVCC to VCC.
Here's the finished result, and the 10-pin ribbon cable with a wire I used to key the connector so I won't plug it in the wrong way.


  1. Cool and clever. I got tired of remembering pinouts when breadboarding ATtiny projects so I ended up building some target / breakout boards with the AVRISP header built in. Then I thought hey maybe some folks actually want these so I ended up selling them on ebay and Shockingly, folks do want them :D Interestingly I've sold a lot more ATtiny85 boards than Tiny2313. Tiny84's fall in between. I really thought the Tiny2313's were more popular. :) But I digress...

  2. Thanks for the feedback. Kudos to you for making some nice breakout boards. I haven't made it to the modern era of PCB design yet - the last board I made many years ago was hand-drawn with a pcb marker and stencils, UV exposure and hand etch. I don't see why people would pay $9 for a breakout board when they can buy a Pro Mini $3.28. But it is nice when people like the fruits of your labor enough to buy them.
    And I'm glad to have the info on what parts are more/less popular. I'm writing a 64-byte bootloader and the tx8, tx5, & tx4 are the first three AVRs I'll be supporting, with the tx313 to follow.

  3. Ran into the same problem with my projects. Something always wrong with my code - have to upload a new change. My solution was to build an arduino shield. Use the arduino as the ISP. The board design and schematic are here if anybody is interested: I had not noticed the pattern though. I like it.

    1. Nice work on the PCB.
      I prefer an ICSP-style programming cable to a programming board since I don't have to remove the chip to reprogram it.

  4. Have you seen these? Makes programming on breadboards a lot easier.

    1. Hadn't seen that particular combination before. Rather expensive though. I get 40-pin headers for ~10c ea, so the 12 pins cost < 5c, and 10cm ethernet cable is <5c.