Friday, May 9, 2014

Starting Atmel-Avr Programming
ratmcu,5/10/2014 11:42:05 AM

You might already have experiences of microcontroller programming with Microchip PIC. But as a more convenient industrial approach you may look forward to Atmel microcontrollers. So this article will guide you through the process of starting to programming Atmel AVRs with a self-made ISCP programmer. This programmer is made up with a Atmel uC itself so prior to everything we should flash our programmer uC with the firmware.

STEP 1: Building a Serial programmer to flash the firmware.
·         SI-prog: http://www.lancos.com/siprogsch.html
Fig 1: SI programmer.
STEP 2: flash the firmware and fuses to the Attiny uC using avrdude.
·         Install Avrdude on your PC.
Ø  Using the “WinAVR-20100110-install.exe-WinAVR”.
·         Open cmd and type avrdude.
·         You should see
Fig 2: avrdude console.
·         Type “avrdude –c ? “  this will give you the available list of programmers somewhere you’ll see si-prog mentioned.
·         Change thedirectory to the folder containing vusbtiny.hex file and execute following 2 commands
1.      avrdude -c usbtiny -p t45 -U flash:w:usbtiny.hex
2.      avrdude -c usbtiny -p t45 -V -U lfuse:w:0xe1:m -U hfuse:w:0x5d:m -U efuse:w:0xff:m
·         If your setup is good and you’re lucky enough you’ll see something like below.




STEP 3: building the usb programmer.

Fig 3: schematic.


Fig4: PCB layout_positions.
Fig5: PCB layout.