Thursday, February 2, 2012

Various AVR Processor Programming Technique

In this article we outline a variety of techniques to upload firmware (program) which in binary (HEX file format) to the Program Flash memory in the AVR microcontroller. There are 4 main techniques outlined are as follows:
  • ISP ( In System Programming ) also called ICSIP (In Circuit Programming System) [1] . In this technique, firmware is loaded into the microcontroller chip with serial protocol . During the uploading process, the microcontroller does not have to be removed from the circuit, hence its name "In System Programming", which means the microcontroller is programmed in its circuit.
  • HVPP ( High Voltage Parallel Programming ). In this technique the firmware is uploaded with the parallel protocol using +12 V voltage which is higher than the working voltage (+5 V).
  • HVSP ( High Voltage Serial Programming ). In this technique the firmware uploaded with the serial protocol and the working voltage of +12 V. This technique is used to replace HVPP technique in devices with limited number of pins.
  • Bootloader . In this technique on we put a small special program in the microcontroller bootloader flash area. The bootloader software can receive firmware applications from outside and then insert it into the application flash memory firmware. When we use a bootloader, flash memory is divided into bootloader flash and application program.
Below area descriptions of each technique.

AVR programmer with ISP via the Parallel Port

Parallel port on the Desktop PC
On this type of programmer, programming is inserted through the port SPI (Serial Peripheral Interface) in the AVR microcontroller. This technique is also known as ISP ( In System Programming ), which means that the microcontroller can be programmed on a system that has been soldered, without the need for removing the microcontroller from the PCB. In this technique, the pin-pin AVR ISP directly controlled by the parallel port of a PC.
There are two variants of this type of circuit, the programmer without the programmer with the buffer and buffer. Without a buffer circuit block diagram is as follows:
Avr-programmer-parallel-direct.png
Block diagram of the circuit with the buffer is as follows:
Avr-programmer-parallel-with-buffer.png
Examples of this type of programmer hardware settings are as follows:
As a pair programmer hardware, software on the PC is also required to do programming. Examples are as follows:

AVR programmer with ISP through serial port with bit banging

Simple block diagram
Avr-programmer-serial-bit-banging.png
Pin-pin serial port is controlled by the ISP from the PC. Programming does not use serial communication protocol, but uses a bit-banging method [5] . Examples of the circuit can be viewed at the following URL. http://www.lancos.com/siprogsch.html .
Software on the PC can use PonyProg [6]
Advantage of this programmer is simple and fairly robust, rarely damage the port using the PC as a parallel port. The disadvantage requires a serial port on board in a desktop PC, so can not use the serial port of the USB serial.

AVR programmer with ISP through serial port with serial protocol

Avr-programmer-serial-with-microcontroller.png
On the programmer, the PC communicates via a serial protocol with a microprocessor. This microprocessor then controls the pin-pin ISP AVR microcontroller to be programmed. The series of examples

AVR programmer with ISP through the USB port with bit-banging

At the programmer of this type, a microprocessor (microprocessor programmer) is used to receive signals directly from the PC USB without using a special chip USB. The microprocessor is then programmed the chip programmer AVR via ISP connection. Usually these techniques take advantage of such library for AVR USB V-USB [10] and USBtiny [11] .
Avr-usb-programmer-with-microcontroller.png
Example of a series of open source:
  • Doper AVR [12] "AVR-Doper is an STK500 compatible In-System Programmer (ISP) and High Voltage Serial Programmer (HVSP). It comes with a built-in USB to Serial adapter to connect directly to USB."
  • USBprog "An open source all purpose tool (AVR ISP, ARM7/ARM9, AT89, JTAG, RS232, IO)" [13]
  • USBasp [14] . "USBasp is a USB in-circuit programmer for Atmel AVR controllers. It simply consists of an ATMega88 or an ATmega8 and a couple of passive components. The programmer uses a firmware-only USB driver, no special USB controller is needed." Examples of implementation USBasp [15]
  • Tiny USB ISP [16]
Examples of finished products:
Some software that can be used:
  • Khazama software can be used as a front-end [18]

HIGH VOLTAGE PROGRAMMER (HV PROGRAMMER)

This flash programmer to access the AVR via the parallel port on the AVR, not through the port ISP At +12 V programming voltage required on a particular pin, therefore this technique is called high voltage programmer. High voltage here is not in the tens or hundreds of volts, but only +12 V. The main advantages are the programmer can be used to program the AVR chips that could be turned off SPI or Resetnya pin. The disadvantage is a fairly complex circuit programmer and a programmed microcontroller chip must be removed from the PCB.
Avr-high-voltage-programmer.png
There are several series of based-based programmer STK500 board as follows:
High voltage parallel programmer is simple:

Programmer AVR with the bootloader via serial port

At the programmer of this type, the AVR to be programmed is activated once a small program called a bootloader. PC sends the software to be programmed into this bootloader program, then program the bootloader will program the Flash memory with the desired program.
Avr-programmer-serial-with-bootloader.png
Examples of the bootloader software
Variations of this programmer is to use a USB to Serial device, so it can be used on Desktop / Laptop with a USB port but no serial port.

Images on a computer USB port

Avr-usb-programmer-with-usb2serial.png
Example:

No comments:

Post a Comment