0

Universal programmer for AVR microcontrollers

Despite the appearance on the market of many modern microcontrollers, Atmel company crystals remain very popular and affordable. To program these microcontrollers enough to have a simple programmer, literally composed of several elements. Previously, programmers connected to the serial or parallel port (Centronics). Now modern PC, especially laptops, They do not have these interfaces. We are introducing an interesting ISP-programmer for AVR microcontrollers with USB interface, which can work with popular software, like AVR Studio or Bascom.Universal programmer for AVR microcontrollers

Specifications

  • programming of all AVR microcontrollers, supported AVRDUDE
  • the ability to customize programming speed (jumper) – controllers clocked below 2 MHz
  • high programming speed
  • interaction with the environment AVR Studio, Bascom, WinAVR
  • compatible with Win XP
  • emulation interface USB
  • alarm operating conditions - LEDs
  • units of USB ports

device Description

Usually, a modern computer does not have a parallel or serial port, so the programmer with USB interface has become an indispensable. Presented function USB interface is implemented by the microcontroller software Atmega8. The programmer has two LEDs, indicating the operating status, and two jumpers to configure. It works with free software titled AVRDUDE, with which you can program the microcontroller through the AVR Studio or Bascom AVR. Due to the simple design of the programming of its cost is not high. Figure. 1 shows a schematic diagram of programmer.

Universal programmer for AVR microcontrollers

rice. 1

Microcontroller ATmega8 clocked by a crystal 12 MHz. The voltage from the USB interface provides power schemes. You can also feed the programmable circuitry to the microcontroller through a programmer connected to a computer. To do this, close the jumper JP1. JP2 circuit slows down programming, that allows programming microcontrollers clocked generator enlarge 2 MHz. LEDs D1 and D2 are used to indicate the programming status. Glow D1 indicates programming, D2 indicates the Power On. ISP interface lines are connected to the connector J2 programmer. VCCI is used to power a programmed system, GND is grounded, RST reset, and the lines MOSI, MISO and SCK lines are interface connection. Software USB interface was implemented using PB0 and PB1 of the microcontroller ports. resistors R5, R6 limit current, flowing through the LEDs, while the capacitors C1, C4 filtered voltage, supply programmer.

Assembly and adjustment

The printed circuit board assembled programming is shown in Figure. 2.

Universal programmer for AVR microcontrollers

rice. 2

Its design is no SMD components, so there should not be serious problems with the assembly. Before connecting the programmer to the PC to install the drivers necessary for him. After proper installation of the driver in the system should appear USBasp device (rice. 3).

Universal programmer for AVR microcontrollers

rice. 3

The connection between the programming device and the programmable microcontroller is to be performed using a 10-wire cable. ISP interface line should be connected with the corresponding lines of the microcontroller ISP. During normal operation, the red LED lights, and during the green programming LED. If programmable circuit must be powered by the programmer, jumper JP1. If programmed microcontroller operates at a frequency below 2 MHz, it is necessary to set the jumper JP2.

Programming with AVRDUDE-GUIP program

AVRDUDE-GUI program can be downloaded from the link on the Internet: https://sourceforge.net/projects/avrdude-gui/. Programming easy, because it is carried out using a graphical interface (rice. 4).

Universal programmer for AVR microcontrollers

rice. 4

In the avrdude Location enter the path to the file avrdude.exe, and in the field of alternative File Location, enter the path to the file avrdude.conf. In «-p Device» field, enter the type of programmable microcontroller, and «-c Programmer» box, select the programming usbasp. In Flash, enter the path to the file, the contents of which will be programmed into the microcontroller. EEPROM field respectively applied to the EEPROM memory of the microcontroller programming. microcontroller programming begins when you click "Run". As seen, Using AVRDUDE program, bits can be programmed microcontroller configuration.

microcontroller programming in AVR Studio

To be able to program microcontrollers using software AVR Studio, Select Tools from the menu Tools-> Configuring. After clicking on the New icon to create a programmer, in our case AVRasp. At the command prompt, type the path to the file avrdude.exe. In the argument, specify the type of microcontroller, programmer and type the path to the program file to the programmable microcontroller. Configuration example may look as follows:: -PM8 – cusbasp – Uflash: in: demo.hex, which means, ATmega8 microcontroller that is programmed using usbasp and contents of the sample file. Figure. 5 shows the correct configuration program AVR Studio.

Universal programmer for AVR microcontrollers

rice. 5

After confirming Close button in the Tools menu programmer AVRasp, which can be used for programming AVR microcontrollers.

microcontroller programming in Bascom AVRA

Programming microcontrollers using Bascom AVR software in the menu "Options", select the "Programmer". In the programming selection, select an external programmer. Line Program enter the path to the program AVRDUDE.exe, and in the Parameter box, enter the type of microcontroller, Programmer and the file type, the contents of which must be programmed into the microcontroller from the archive to the project. Configuration example may look as follows:: –p m8 –c usbasp –U flash: in: “{FILE}”: a. Be sure to check the Use HEX file. On the picture 6 shows the correct configuration program Bascom AVR.

Universal programmer for AVR microcontrollers

rice. 6

Confirm by pressing the «kiem OK» button, the microcontroller is programmed when you select the "Program Chip".

details

Archive of the project






Leave a Reply

Your email address will not be published.