Summary of TINY USB PROGRAMMER AVR MICROCONTROLLERS AVRDUDE
The article describes a USBtiny-style AVR programmer built around an ATtiny45, detailing its components, voltage-limiting scheme, jumper usage, and enclosure. It explains programming the ATtiny45 in high-voltage mode, configuring AVR Studio and Bascom to call avrdude with appropriate parameters, and lists supported AVR microcontroller type codes for avrdude.
Parts used in the USB programmer:
- ATtiny45 microcontroller
- Zener diode D1
- Zener diode D2
- Capacitor
- Resistor R1
- Resistor R2
- Resistor R3
- Resistor R4
- Resistor R5
- Resistor R6
- USB plug (connector)
- IDC-6 plug (connector)
- JP1 jumper
- Heat-shrink sleeve (optional enclosure)
USB programmer There are few components – the ATtiny45 microcontroller, two Zener diodes, a capacitor and several resistors. Of course, there are still connectors – USB plug and IDC-6 plug. Resistor R1 informs host… Electronics Projects, Tiny USB programmer AVR microcontrollers AVRDUDE “avr project, microcontroller projects, programmer circuit, “
USB programmer There are few components – the ATtiny45 microcontroller, two Zener diodes, a capacitor and several resistors. Of course, there are still connectors – USB plug and IDC-6 plug. Resistor R1 informs host about presence of USB device transmitting data in Slow mode.
The resistors R2 and R3 in combination with D1 and D2 provide maximum voltages on the 3.6 V, not 5 V, because the +5 V voltage on the bus causes SYNC errors. R4 … R6 resistors protect the programmed circuit from damage if it is powered by a voltage lower than 5 V.
JP1 jumper should be open. It is assumed only when you want to power up the USB chip. Obviously, you need to keep in mind the limitations of the maximum permissible load current and the voltage range provided by the USB.
AVR USB PROGRAMMER SCHEMATIC DIAGRAM
The whole programmer can be placed in a heat-shrink sleeve, but beforehand the microcontroller must be programmed. Microcontrollers provided in AVT sets are already programmed, but if you are building your own programmer, you have to do it yourself.
The microcontroller should be programmed in high-voltage mode because the zero line works like typical I / O. Such programmers have so called. parallel. However, you can do otherwise. Most programs do not allow the RST line to be disabled in SPI mode, but for example, AvrDude offers this capability. Using the Burn-OMat overlay, you can switch the RST line to I / O mode, only to enable Expert mode.
Configuring AVR Studio to work with USB tiny AVR Programmer:
From the “Tools” menu, select “Customize …”.
In the newly opened “Command” window, select the “Tools” tab.
We point to the “New” icon or press the “Insert” key.
We enter the name of the programmer, eg “USBtiny”.
In the “Command” window we indicate the path to “avrdude” (eg: C: WinAVR-20100110binavrdude.exe).
The arguments window we specify the parameters: “-p m168 -c usbtinyp -P usb -U flash: w:” file. hex: a -U flash: v: “.hex file: a”, where “m168” is the type of processor.
In the “Initial directory”, enter the path to the file (note the final character “”)
We approve the changes with the “Close” button.
In order to program the microcontroller select the name of our programmer in the “Tools” menu (in this example it is “USBtiny”).
Configuring Bascom to work with USB tiny AVR Programmer:
From the menu select “Options / Programmer”.
Select “External programmer” from the drop-down list.
In the “Other” tab (at the bottom of the window) we give the path to “avrdude”.
In the parameter window, type “avrdude” -p m168 -c usbtiny -U flash: w: “{FILE}”: a -U flash: Where “m168” is the type of processor.
Programming with the F4 key or the “Program chip” icon.
SUPPORTED MICROCONTROLLERS AND THEIR CODES
|
ATmega128 |
m128 |
|
ATmega1280 |
m1280 |
|
ATmega1281 |
m1281 |
|
m16 |
|
|
ATmega162 |
m162 |
|
ATmega164 |
m164 |
|
ATmega168 |
m168 |
|
ATmega169 |
m169 |
|
ATmega2560 |
m2560 |
|
ATmega2561 |
m2561 |
|
ATmega32 |
m32 |
|
ATmega324 |
m324 |
|
ATmega328 |
m328 |
|
ATmega329 |
m329 |
|
ATmega3290 |
m3290 |
|
ATmega48 |
m48 |
|
ATmega64 |
m64 |
|
ATmega640 |
m640 |
|
ATmega644 |
m644 |
|
ATmega649 |
m649 |
|
ATmega6490 |
m6490 |
|
m8 |
|
|
ATmega8515 |
m8515 |
|
ATmega8535 |
m8535 |
|
ATmega88 |
m88 |
|
ATtiny12 |
t12 |
|
ATtiny13 |
t13 |
|
ATtiny15 |
t15 |
|
ATtiny2313 |
t2313 |
|
ATtiny25 |
t25 |
|
ATtiny26 |
t26 |
|
ATtiny45 |
t45 |
|
ATtiny85 |
t85 |
Source: TINY USB PROGRAMMER AVR MICROCONTROLLERS AVRDUDE
- What microcontroller is used in the programmer?
The programmer uses an ATtiny45 microcontroller. - Why are Zener diodes used in the circuit?
They work with resistors R2 and R3 to limit the bus voltage to about 3.6 V to avoid SYNC errors caused by 5 V. - What is the role of resistor R1?
R1 informs the host about the presence of a USB device transmitting data in Slow mode. - When should JP1 jumper be open?
JP1 should be open; it is closed only if you want to power up the USB chip from the target. - How should the microcontroller be programmed before assembly?
The microcontroller must be preprogrammed, typically in high-voltage mode, before placing the programmer in a heat-shrink sleeve. - How do R4 to R6 protect the programmed circuit?
Resistors R4 to R6 protect the target circuit from damage when it is powered by a voltage lower than 5 V. - How is AVR Studio configured to use the USBtiny programmer?
Add a new tool under Tools > Customize, point Command to avrdude executable, set arguments including -p m168 -c usbtiny -P usb and appropriate -U flash parameters, and select the programmer from the Tools menu. - How is Bascom configured to use the USBtiny programmer?
Under Options / Programmer choose External programmer, set the Other tab path to avrdude, and supply parameters such as avrdude -p m168 -c usbtiny -U flash: w: {FILE}: a -U flash:. - Which avrdude processor code corresponds to ATmega328?
The code for ATmega328 is m328. - Are microcontrollers from AVT sets preprogrammed?
Yes, microcontrollers provided in AVT sets are already programmed.


