Minimalist AVR programmer is just fab!

Whether you’re burning a new bootloader to an Arduino board, or doing away with a bootloader to flash Atmel chips directly, an in-system programmer (ISP) is an indispensable tool for working with AVR microcontrollers. If cost has held you back, it’s no longer an excuse: FabISP is a barebones USB-based AVR programmer that can be pieced together for about ten bucks.

FabISP was created by [David Mellis] as a product of MIT’s Fab Lab program, which provides schools with access to design and manufacturing tools based around a core set of fabrication capabilities, so labs around the world can share results. But the FabISP design is simple enough that you don’t need a whole fab lab. It’s a small, single-sided board with no drilling required; the parts are all surface-mounted, but not so fine-pitched as to require reflow soldering. Easy!

There’s still the bootstrap problem, of course: you need an AVR programmer to get the firmware onto the FabISP. This would be an excellent group project for a hackerspace, club or school: if one person can provide the initial programmer to flash several boards, each member could etch and assemble their own, have it programmed, then take these out into the world to help create more. We must repeat!

[Thanks Juan]

62 thoughts on “Minimalist AVR programmer is just fab!

  1. @paul: Different manufacturer has different interfacing methods driven by different requirements. At least before JTAG that was the excuse. A lot of new microcontroller design are moving toward using JTAG for programming and debugging now but manufacturer still need to support the old design that they still sell and that their existing user base still demand. Hence the need for all the different programmers.

    Making a universal programmer doable but it’s not going to be as cheap. There’s one commercial solution that I know of: http://tools.asix.net/prg_presto.htm. Closest hobbyist friendly one that I know of is to use one of the cheaper pickit2 clone and use pk2avrisp software. That will at least cover the two popular microcontrollers in the hobbyist world.

    PIC12/16/18 and etc requires 13V pull up on the programming pin for it to enter programming mode. This usually means you have to have a power source higher than 13V or you add a charge pump circuit to generate that 13V (pickit2 uses a charge pump circuit). AVR chips on the other hand uses the reset pin to signal the chip to enter programming mode. The data side is just as different. PICs uses two line: clock and data but AVRs uses three lines: clock, data in, data out (SPI essentially). Now if you want to bring in all the other microcontrollers in the market, it’ll get really complicated. MSP430 uses a form of JTAG or Spy-by-Wire. You get the picture…

    That’s not even mentioning the software side. Development environment support are all over the place. I would say if you want to learn, pick the development environment that you can be comfortable with. They all have demo version or there are free/os versions out there. Try them out and find one you can work well with (i.e. if you must have C language support, must run on linux, and etc.) When you’ve decided on the environment then get the hardware that works with it. Once you reach the point where the limitations of the particular microcontroller line are stopping you from using them on your project, you would know enough to be able to translate your skill to other type of microcontrollers. Most of them are built with similar architecture.

  2. Let’s inject some dry, boring, but applicable facts:

    This project: oh, let’s say you can build it for $5 or $10 and get LOTS of jollies out of doing so. If done properly, it sure does look nice [honestly, btw]. And, once it is built, you bootstrap ITS microcontroller SOMEHOW. And then it works just like it ought to – Yay! You can program microcontrollers of some ilk.

    By the way, I have no association with Atmel & only have barely became acquainted with maybe THREE of the products they sell. This is ‘cuz they are showing up in Anduino variants all over creation. Yeah, I’ve got some “Butterfly” cards, but I honestly didn’t pay any attention to who built them – they were just fun to play with and do some simple programming on.

    But does that (an honest, heart-felt smile on your face when you go to bed because YOU BUILT something, you MADE it yourself!) mean you should ignore a professionally produced item like the Atmel AVR Dragon (I only looked on the web because of someone else’s note somewhere in here)?

    Yeah, it will cost you about 5..10 x as much (depending on what you’ve got around…

    [note – how come no one ever says anything about the products they HAD TO BUY to get all of that surplus junk?? Yeah, it is essentially of no appreciable _value_, but the Hardware Fairy didn’t come and bop you on the head with the proper sort of USB cable did he/she? “The Universe Doth Sayest “There Is No Such Thing As A Free Lunch”.]

    … and how cheap/’elegantly minimal’ you are willing to build it. The avg. price on the Dragon from DIGI-KEY to AVNET comes out to about$50. However, it can program AT LEAST __150__ different microcontrollers using the following programming interfaces: In System Programming, High Voltage Serial Programming , Parallel Programming, and JTAG Programming. It also has the following Emulation Interfaces: (Only available for devices with 32kB Flash or less) JTAG ( JTAG ) and debugWIRE.

    Uh, that sounds almost unbelievably capable for the price – particularly to me who would have expected it to cost on the order of $150 or a lot more.

    However, if you’ve got an OCD DIY syndrome, then don’t let me stop you. I doubt that you are paying any attention to me in the first place, given that I’m such an ornery critter. But PLEASE consider buying something that really isn’t all THAT expensive, does work nicely with AVR Studio 4.12 and can do almost everything but wash the kitchen sink. Please remember, y’all – MY FIRST posting (or at least thought) was something akin to “If someone was willing to build these or sell the board plus non-SMD parts in a kit and sell them at a decent price, I’d probably buy one”.

    I’m definitely unsure about that now.

    Having posted some useful information (at least possibly), I cannot let the following self-serving fatuous statement like “if you cant assemble a kit you have no reason fooling with a microcontroller” go unanswered. How about – “if you can’t do nuclear flow-dynamic programming in assembler on a Cray-2 then you have no business fooling around with ANY computer???” It is just as stupid.

  3. course I just programed a avr using 2 bits of wire and a 232ttl converter last night using ponyprog

    I have to wonder what the fuss about these programmers are when every chip I have used has some form of self programing feature in them?

  4. @osgeld: I built my version of the usbtiny isp mostly for the speed. While the parallel programmer works well enough, they’re not that fast writing to the chips. I also wanted a more permanent programmer. I hardly use atmel chips so I never really put together a parallel isp on pcb. I “rebuild” it on a bread board every time I needed it. When I had excess supply of attiny2313 I finally build one. It’s a bit of a waste to use the 2313 for this purpose but heck I had tons at the time and I got them for 50c each.

  5. Hey, if somebody’s going to improve the design, how about a little pad that outputs something like a 50 KHz signal to revive a microcontroller with wrong fuse settings. And a tiny led for busy, I think I saw 1-2 free pins on the programmer’s uC.

  6. Fun to read all the comments. I for one love to play around building things. Keeps me off the streets at night, and the wife happy.

    As far as someone building and selling these, I’m in, mainly because I don’t like etching boards. A kit would be agreeable also.

    Since I am new to this entire family of electronics, I am willing to try different loaders, etc. I have been in electronics since tubes and just recently decided I needed to come into at least the late 20th century.

    BTW, I scrounge parts from discarded electronics, like old computers, etc., probably the only thing I don’t have in my junk box would be the Atiny device, and the pcb.
    And yes, I know what parallel ports are, and even have them on several computers, lol.

  7. @Kuhltwo: Heh, I just bought a second-hand laptop with parallel and serial ports. Ended up costing more than a new laptop, but it’s worth it, because you can’t find a new one with these ports :((
    Now I can control my CNC (parallel port) and program my AVR’s (serial port) from the same device!

  8. @Kuhltwo just a thought, I know that some times computer mice come with a uC (one that I’ve seen is the Motorola HC908) included that you could possibly use in place of a ATTiny

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s