USB AVR programmer

I’ve already had a programmer for Atmel’s AVR microcontrollers, but I couldn’t use it in my lab, because my laptop doesn’t have a LPT port. So I decided to make a new programmer with USB connection. I’ve found an open source programmer AVR doper, and for the basis I took a modified version from the http://www.kreuzholzen.de web page. I designed a new singled sided PCB board, that I was able to make at home. The programmer is compatible with STK500v2.USB AVR programmerI used a male USB type A connector, so that I can plug the programmer directly in the laptop’s USB port or I can use a USB extension cable. The USB supply is protected with a 500mA PTC resettable fuse on positive lead. To convert the USB data lines from 5V on microcontroller, to the lower voltage used by USB, we use 3.6V zener diodes, that must be fast low current type, and 68ohm resistors. USB D- line is pulled up with 2k2 resistor. This is required for the computer to correctly recognize USB device (for more info you can read the article). For ESD protection we use double diode BAV99 from signal to GND and supply. We also have a 4.7uF electrolytic capacitor on the supply. We can use a LED diode for indication of USB supply. I used a low current LED diode with a 1k8 resistor, if you will use standard diode, you shuld use a lower value resistor.Schematic USB AVR programmer
The programmer is controlled with an ATMEGA8 microcontroller. The microcontroller is clocked with 12Mhz crystal with 22pF capacitors. We put the decoupling capacitors (100nF) on microcontroller supply pins and AREF pin. Reset pin is pulled up to 5V with a 10k resistor and protected against interference with 100nF capacitor. On pin PB7 is a LED diode, indicating the programming in progress. The signals are connected to avr as indicated in schematics.
To convert voltage levels from microcontroller from programmer to the programmed microcontroller we use 74hc126. On all signal lines is also a bav99 diode for ESD protection and beads and 10pF capacitors to USB shield against interference.
Three settings are available on avr programmer: 1. Connecting pin SLOW_SCK from microcontroller to GND sets lower programming speed. We can use this setting if our software doesn’t support it. The lower speed of programming is needed when the programmed Atmel microcontroller runs at lower frequency (such as for example 32kHz). 2. Pin ISP_TMOSI pulled to GND with 1k resistor. This settings select the type of USB device the programmer emulates. The recommended setting is the switch in connected position. This sets the type of device to HID, otherwise the device of our programmer will be a serial modem. 3. With this setting we connect the supply of programmer to the supply of programmed avr, so the programmed chip can as well be supplied from the USB port.
For more detail: USB AVR programmer


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top