AVR programmer fix

Intro

If you work with development boards you know that they usually connect through USB which provides power, can program and debug the micro and you also get some virtual serial port. Most external programmers not so much, they only do the programming and debugging thing. Except the pickit2, and even though I don’t use PICs anymore this is still by far the best programmer I have ever used. The reasons are simple: through its 6 pins interface it can program/debug, you can choose whether to supply power and at what voltage, you can reuse the pins as serial port or even a simple logic analyzer. Of course, the next version pickit3 is totally crap, but that is another story.

 Towards the Xmega

Recently I have decided to give up on the AVR tiny and mega and use some sort of xmega for everything not requiring ARM, due to lack of time to switch between architectures. It does not make sense to lose time switching between devices while building only a single or small number of devices at hobby level. I would have jumped for the SAM D20 for everything, but its peripherals are inferior and it burns too much power while idle, even though the core is so much better. In most projects I don’t mind having at least 3 cables to the board: power, programming and serial port.

But I have recently started to develop some wireless nodes and needed to switch the programming cable and serial port and power between boards, which was making me lose a lot of time. At this stage of development I prefer to keep the debugger attached, not rely on the serial port debugging only, so a serial port based boot loader is useless. It gets quite a bit cluttered:

DSC_3852

I realized that while using XMegas I could actually squeeze all 3 cables in the original 6 wire programming cable because 2 of the 6 wires on the ISP connector are not used in the PDI connector so they can be replaced by serial TX/RX. Power can be injected at the programmer side as well. A USB hub can provide one input and two ports, one for the programmer and one for the serial port adapter. So I started the build, first modifying the hub.  Since I don’t have a short enough micro USB cable a long one was sacrificed, but rest assured, I will use the other half as well.

DSC_3854

 

DSC_3855

 

Then I built a module that can inject power and pass on the serial port instead of the MOSI and SCK ports. I have settled on using only a fixed 3.3V power supply, as I highly doubt anything else might be needed. I chose to include a separate regulator because the serial port adapter cannot provide enough current through its 3.3V output. This way about 200-300mA should be available for the development board, the rest being consumed by the hub, programmer and serial converter.  A double pole switch allows the led to signal that power is being applied without being turned on by power applied from the board. Using a bi color LED i can signal the 2 situations: green means there is power on the board while yellow means there is power on the board and it is applied from the module. Here’s the schematic and the finished module:

AVR_fix_schematic

 

DSC_3865

 

DSC_3864

 

I have put everything together and used tape to fix them to the Atmel ICE programmer, that way if I ever need to detach it and use separately, it will be a quick fix. The result is quite a monstrosity:

DSC_3870

 

Now, the small xmega header board can be used with a single cable attached:

DSC_3873

 

Of course, the board needs to have the serial TX and RX connected to the 2 available pins on the ISP connector, but this is a fix I will implement in future versions of the board

DSC_3876

 

The finished device is rather large compared to the pickit2, but maybe someone from Atmel can take care of implementing these features in future versions of the atmel ICE, or AVR-ISP 3 or some other programmer/debugger.

DSC_3875

Bookmark the permalink.

8 Comments

  1. Pingback: Ser SHOW « Electro Bob

  2. Pingback: Showing an AVR Programmer Who’s Boss | 0-HACK

  3. Pingback: Showing an AVR Programmer Who’s Boss - zeax blog (ze-ax.com)

  4. Pingback: Showing an AVR Programmer Who’s Boss | Hack The Planet

  5. Pingback: Showing an AVR Programmer Who’s Boss | Ad Pub

  6. Pingback: Showing an AVR Programmer Who’s Boss | MyWebspace

  7. Pingback: Showing an AVR Programmer Who’s Boss | The Latest IT, Electronics and Tech Facts

  8. Pingback: Showing an AVR Programmer Who’s Boss | Hackaday

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.