AVR programmer modelled after the MkII – uses LUFA

Here’s a new option for building your own AVR programmer. It’s called the MkII Slim and the diminutive size makes it live up to its name. The design is rather spartan, using just three chips; a voltage regulator, a MAX3002 level converter, and an Atmel AT90USB162 as the main microcontroller. This chip has a built-in USB module, foregoing the need for a separate FTDI chip.

The firmware is built on the Lightweight USB Framework for AVRs (LUFA). This is a USB stack implementation originally called MyUSB that was developed by [Dean Camera]. Regular lurkers over at the AVRfreaks forums will recognize [Dean's] name, or his handle [abcminiuser] as a source for many of the high quality AVR tutorials found there. But we digress.

The programmer offers all the features you’d want in an In-System Programmer. It can easily be reflashed with future updates thanks to the bootloader running on the chip. There’s jumper-selectable power options, and it can program targets running at 3.3V or 5v. The full development package including code and¬†artwork¬†is available for download at the site linked above. For your convenience we’ve embedded the schematic after the break.

16 thoughts on “AVR programmer modelled after the MkII – uses LUFA

  1. So how does this compare to adafruit’s usbtinyisp?
    Is this also a stk500 programmer?(Compatible with avr studio)

    1. Two notable differences:

      1) The USBtinyISP implements its USB interface by bit-banging i/o pins on a non-USB AVR. This is generally reputed to work, but could theoretically be unreliable under certain conditions. The AT90USB162 in the MkII Slim has a real hardware USB interface.

      2) The USBtinyISP is a product that you can buy in kit form. If you want a MkII Slim, it looks like you’ll need to build it yourself!

      For your second question, the MKii Slim is a clone of Atmel’s AVRISP mkII programmer:

      http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3808

      As noted, it is compatible with AVR Studio.

  2. Off topic, but sorta related,

    For those looking for a cheap and easy programmer that works well with AVR Studio, I swear by this guy for all my needs. Cheaper then adafruit’s usbtinyisp, smaller and no assembly required. I buy enough to just embed them into my projects and connect USB whenever I want to upload a new flash.

    But this post is a cool choice for build-your-own.

      1. Thanks for the linkage. I really like the SLO-scope functionality designed into the device, and especially the fact the maker has made all of the source code publicly available. I tallied about $12-15 for the programmer outlined in this article, but $20 for a slightly-better, ready-made product really ain’t bad!

  3. Great project, but on the other hand, the original is only 34$ with a nice enclosure, and no stress about SMD soldering.

    Not sure it’s so interesting.

    I used to like this kind of projects but I finally prefer to trust my tools and focus on my developments

    1. Unfortunately not, because Atmel’s DebugWire protocol is proprietary and undisclosed. And while the Dragon is only $50, you get what you pay for: combined with avrdude and avarice it’s unreliable and irritating to develop with – single stepping alone can take 3 seconds per instruction. I usually have to unplug and re-plug my Dragon more than 10 times a day when developing for AVR, just to reboot it :-(

      If you want real debugging, use an ARM Cortex-M0/M3 – ARM publishes all the debugging specifications and both SWD hardware interfaces and software debuggers are widely available.

      As for this build, including ISP, PDI /and/ TPI is excellent! It wasn’t that long ago that I had to bit-bang TPI myself to program an (unsupported) ‘tiny10 chip.

  4. If you want to debug, you need a JTAG capable device. Save your pennies and get a JTAGICEmkii-CN from MCUZone in China (I have one and it’s under US$100 delivered and nifty as hell) or a cheaper AVR-JTAG-USB from Olimex – either will work well in AVRStudio4. Programmers like this are simply for reading or writing the flash memory and EEPROM. That’s great if you’re into large production of Atmel based boards or need to do in-field reprogramming but of dubious value to the solo hacker and developer.

  5. No, rather save your pennies and begin using the MSP430. The “Launchpad” is only $4,30, INCLUSIVE WORKING in-system debugging with breakpoints and everything you dream for :-)

    The TI tools are quite good (though there is a code size limit for the free edition of around 16KB, and it is not available for linux).

    In Linux you can use “mspdebug” and “mspgcc”, though they are still in development and not 100% stable (but they are getting better every day)

  6. Great
    I have good background in FPGA ,but i’m new to avr. so i decide to create my own programmer. i want to build the best programmer. I think your case is super great.
    but my question: why there is no code for micro controllers?how you program it? could you explain it?

    1. I think it’s the LUFA firmware that he referred to… but I tried, I can’t figure out where exactly the code for the AT90USB162 mcu. The instructions are so wierd and indirect.

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