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.
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 tindie.com. 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...
ReplyDeleteThanks 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.
ReplyDeleteAnd 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.
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: http://eositis.wordpress.com/2014/02/16/attiny-programming-jig-part-2/ I had not noticed the pattern though. I like it.
ReplyDeleteNice work on the PCB.
DeleteI prefer an ICSP-style programming cable to a programming board since I don't have to remove the chip to reprogram it.
Have you seen these? Makes programming on breadboards a lot easier. http://www.protostack.com/connectors/idc/idc-to-breadboard-cable-10-pin
ReplyDeleteHadn'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.
Delete