Universal programmer for AVR and PIC microcontrollers. Radio engineering, electronics and schemes do it yourself. ATMEGA8 programming via the LPT port of the computer

With development computer equipmentEach time it becomes less and less and less computers equipped with COM and LPT ports. This in turn causes difficulties, in particular with radio amateurs associated with the conjugation of microcontroller programming tools with a personal computer.

This article provides a description of the USB programmer for aVR microcontrollerswhich can be collected with your own hands. It is built on the ATMEGA8 microcontroller and is able to work from the USB computer connector. This programmer is compatible with STK500 V2.

Description USB programmer

USB programmer is built on a board made from one-sided foil fiberglass. On the board there are 2 jumpers: one is located under the SPI connector, the second jumper is located not far from the same connector.

After all the details are sealed, you need to flash the ATMEGA8 microcontroller with the firmware above at the end of the article. Fuses that need to be set up when programming the ATMEGA8 microcontroller should look in the following way:

  • SUT1 \u003d 0.
  • Bootsz1 \u003d 0.
  • Bootsz0 \u003d 0.
  • Ckopt \u003d 0.
  • Spien \u003d 0.

It is necessary to recall that in some programs, FUUZY is issued opposite to this. For example, in the program CodeVisionavr, you need to put ticks opposite the above-mentioned fioms, and in the PonyProg program, on the contrary.

ATMEGA8 programming via the LPT port of the computer

The fastest and cheapest way to program ATMEGA8 is to apply the LPT programmer for AVR. A similar scheme is shown below.

The meal of the microcontroller is carried out from simple stabilizer Voltage 78L05. You can use the Uniprof program as a programming shell.

When you first turn on the program and with a not connected controller, clicking the "LPTPINS" button, you must configure the LPT port conclusions as follows:

At the time of launching uniprof, it automatically defines the type of microcontroller. We download the ATMEGA8_USB_PROG.HEX firmware in memory Uniprof, reject the connection of the EEPROM file.

I put the following fuses as follows (for Uniprof) by pressing the "FUSE" button:

To memorize the settings, press all three "Write" buttons. Then clicking on the "Erase" pre-clean the memory of the microcontroller flashing. After that, we click on the "Prog" and wait for the completion of the firmware.

Setting up a USB programmer

After our microcontroller flashes, it must be installed in the USB programmer fee. Next, connect the programmer to USB port. Computer, but so far we do not apply.

Port Setup:

Terminal Setup:

Setting up ASCII:

Now after all the proceeds done, we feed the programmer to the USB. The HL1 LED must lean 6 times and then glows constantly.

To check the communication of the USB programmer with a computer, press the "Enter" key 2 times in the HyperTerminal program. If everything is in order, we should see the following picture:

If this is not so checking once again installation, especially the TXD line.

Next, enter the version of the programmer 2.10, since without this, the programmer will not work with the programs " top level" To do this, enter "2" and press "ENTER", enter "A" (English) and click "Enter".

USB programmer is able to recognize the connection of the programmable microcontroller. This is done in the form of control of the "suspender" of the RESET signal to the power source. This mode is turned on and off as follows:

  • "0", "ENTER" - mode is turned off.
  • "1", "Enter" - mode is enabled.

Change programming speed (1 MHz):

  • "0", "Enter" - the maximum speed.
  • "1", "Enter" - reduced speed.

This prepared work is completed, now you can try to flash some microcontroller.

(downloaded: 1 203)

September 22, 2011 at 20:11

Miniature USB programmer for AVR microcontrollers

  • Programming microcontrollers

As the theater begins with hangers, so programming microcontrollers begins with a choice of a good programmer. Since I start to master the microcontrollers of ATMEL, it was thoroughly acquainted with the fact that manufacturers offer. They offer a lot of interesting and tasty, only at all over conversion prices. For example, a shawl with one twenty-faded microcontroller with a pair of resistors and diodes as a strapping, stands like "plane". Therefore, the question of self-assembly programmer. After a long study of the developers of radio amateurs with experience, it was decided to collect a well-proven programmer USBASP, the brain of which is the ATMEGA8 microcontroller (there are also the firmware options under ATMEGA88 and ATMEGA48). The minimum impunity of the microcontroller allows you to collect enough miniature programmerwhich can always be taken with you as a flash drive.

The author of this programmer is the German Thomas Fichl, its development page with schemes, file boards and drivers.
Once it was decided to collect a miniature programmer, it redrew the scheme under the ATMEGA8 microcontroller in the TQFP32 case (the microcontroller pinout differs from the pinout in the DIP housing):

Jumper J1 is used if you need to flash the microcontroller with clock frequency below 1,5 MHz. By the way, this jumper can be excluded at all, putting 25 MK to Earth's foot. Then the programmer will always work on reduced frequency. For myself, it was personally noted that programming at low speed on the split seconds longer, and therefore now the jumper is not drong, but constantly sowing with it.
Stabilians D1 and D2 serve to harmonize the levels between the programmer and USB tire, without them will work, but not on all computers.
The BLUE LED indicates the availability of a scheme programming, Red lights up during programming. Contacts for programming are displayed on the IDC-06 connector, the pinout complies with the ATMEL standard for the 6-pin ISP connector:

This connector contains contacts for powering programmable devices, here it takes directly with USB port Computer, so you need to be attentive and prevent KZ. The same connector is also used to program the control microcontroller, it is enough to connect the RESET conclusions on the connector and on the MK (see the red dotted line in the diagram). In the author's scheme, this is done by Jumper, but I did not clutch the fee and removed it. For single firmware, there is enough simple wire jumper. The fee turned out two-way, 45x18 mm sizes.

Connector for programming and jumper to reduce the speed of the programmer are put on the end of the device, it is very convenient

Firmware control microcontroller
So, after assembling the device, the most important thing remains - to flash the control microcontroller. For these purposes, friends who stayed computers with LPT port are well suited :) The simplest programmer on five postings for AVR
The microcontroller can be flashing from the programming connector by connecting the conclusions of the microcontroller reset (29 leg) and the connector. Firmware exists for ATMEGA48, ATMEGA8 and ATMEGA88 models. It is advisable to use one of the last two stones, since the support version under ATMEGA48 is stopped and latest version Firmware dates back to 2009. And the versions under the 8th and 88th stones are constantly updated, and the author seems to be plans to add an intrahemnoy debugger to the functionality. We take the firmware on the German page. For fill control program In the microcontroller, I used the PonyProg program. When programming, it is necessary to start a crystal to work from an external clock source by 12 MHz. Screen program with FUSE settings Jumpers in PonyProg:

After the firmware, the LED connected to 23 legs of a microcontroller should be burned. It will be a sure sign that the programmer will flash well and ready to work.

Installation Driver
Installation was carried out on the car with windows system 7 And no problems arose. When you first connect to the computer, a message will be released about a new device detection, with the driver installation suggestion. Select the installation from the specified location:

A mig appears a window with a warning that the driver installed does not have digital signature In smallest:

We score for a warning and continue the installation, after a small pause, a window will appear that reports on the successful end of the driver installation operation

Everything, now the programmer is ready for work.

Khazama Avr Programmer
To work with the programmer, I chose the Khazama Avr Programmer flash driver. Wonderful program, with a minimalist interface.

It works with all AVR sketch microcontrollers, allows you to flash flash and eeprom, view the contents of the memory, erase the chip, and also change the configuration of the FUU-bits. In general, quite standard set. Configuring FUUZs is made by choosing a clock source from the drop-down list, so the probability of walking the crystal by mistake sharply decreases. Fubuses can be changed and placement in the lower field, and it is impossible to place the tank to the non-existent configuration, and this is also a big plus in terms of safety.

Recording fius in memory of the MK, as you can guess, is carried out when the Write All button is pressed. The SAVE button saves the current configuration, and Load returns saved. True, I could not come up with practical application These buttons. Default button is designed to record. standard configuration FUUZS, such with what microcontrollers go from the plant (usually this is 1 MHz from the inner RC).
In general, for all the time the use of this programmer, he showed himself with best side In terms of stability and speed. He earned without problems as in an ancient stationary PC and on a new laptop.

Download file pCB in SprintLayout you can

Universal programmer for AVR and PIC microcontrollers

In amateur magazines and the Internet, there are many programmers schemers. They are distinguished by connecting to a computer: via LPT, COM, USB. Programmers for the LPT port are the simplest, for COM - a little more complicated. For a programmer connected to a USB port, you need to have either a microcontroller or a specialized chip, USB-UART converter. In addition, different programmers are intended for firmware of different microcontrollers: AVR or PIC, though the programming algorithm for these two types of microcontrollers is slightly different. Therefore, the desire to assemble a universal programmer for any microcontrollers is suggested by the desire for any microcontrollers - AVR and PIC.


Optimal, we seemed to see below the programmer scheme. It connects to the computer's COM port and contains the known MAX232 chip, which works correctly with any COM port ( different computers Port levels can differ significantly from the standard), protecting it with random installation or connection errors. The programmer has panels for different microcontroller enclosures, as well as the possibility for intrahemable ICSP programming, when the programmer is connected to the wires to the board with a microcontroller or directly to the legs of the microcontroller without installing it in the panel. The programmer sees programs like JDM, so problems with software Does not arise. You can recommend the IC-PROG 1.06B program.


Switching AVR - PIC modes is performed by a microswitch. The process of operation of the device is indicated by four LEDs. The programmer is simple and does not require setup, very common details are used.

Instead of the 74LS00 chip, you can put K555L3 or KR1533L3, transistors, in principle, replaced with similar. This scheme has one oddity - rates of current-limiting resistors for LEDs. Since the LEDs are connected to different sections of the circuit, the voltage in these areas is also different, which is why the LEDs are glowing with different brightness. In order to correct this, you can try to choose resistors, in particular, to reduce R4 and R7. Instead of KD523, you can use common 1N4148.

Printed payment .lay (for Sprint Layout.) The wiring is made under SMD resistors, the remaining components - in the usual design.

Attention! On the MOSI and MISO wiring printed circuit board, the ATMEGA8 panel is shown incorrectly, they must be transferred. Also C7 and C9 have jumpers - they need to be removed.

Work with IC-Prog

You need to download the program from the official site:

http://www.ic-prog.com/index1.htm.

The following files must be in the program directory:

icprog.exe - directly program
icprog.sys - Driver Access to Ports under XP

You must click on the right mouse button on the icprog.exe and select "Properties". On the Compatibility tab, you must put the "Run in Compatibility" checkbox and select Windows 2000.

Next, you need to go to the "Settings" menu and select the programmer item. The type of programmer needs to install JDM and specify the COM port to which the programmer is physically connected. For very fast computers You can also set an I / O delay. In the same window, you must specify the "direct access to ports" interface. All signals checkboxes must be removed.

Then you need to go to the "Settings" menu and select the option "Options", the General tab, where to install the "Enable NT / 2000 / XP driver" checkbox. At the same time, the driver installation confirmation window will appear and the program will restart.

After that, the program is ready to work with the programmer.

As the theater begins with hangers, so programming microcontrollers begins with a choice of a good programmer. As I start to master the microcontrollers of the company Atmel, I had to get acquainted thoroughly with the fact that manufacturers offer. They offer a lot of interesting and tasty, only at all over conversion prices. For example, a shawl with one twenty-faded microcontroller with a pair of resistors and diodes as a strapping, stands like "plane". Therefore, the question of an independent assembly of the programmer was acute. After a long study of the developments of radio amateurs with experience, it was decided to collect a well-proven programmerUsbasp , whose brain is a microcontrollerATmega8. (There are also firmware options under ATMEGA88 and ATMEGA48). The minimum impunity of the microcontroller allows you to collect a fairly miniature programmer, which can always be taken with you as a flash drive.

Once it was decided to collect a miniature programmer, then redrawing the scheme under the ATMeGa8 microcontroller in the case TQFP32. (The microcontroller pinout differs from the pinout in the DIP housing):

Jumper J1 is used, if you need to flash the microcontroller with a clock frequency below 1,5 MHz. By the way, this jumper can be excluded at all, putting 25 MK to Earth's foot. Then the programmer will always work at a reduced frequency. For myself, it was personally noted that programming at low speed on the split seconds longer, and therefore now the jumper is not drong, but constantly sowing with it.
Stabilians D1 and D2 serve to match the levels between the programmer and the USB bus, it will work without them, but not on all computers.
The BLUE LED indicates the availability of a scheme programming, Red lights up during programming. Contacts for programming are displayed on the IDC-06 connector, the pinout complies with the ATMEL standard for the 6-pin ISP connector:


This connector contains contacts to power the programmable devices, here it is taken directly from the USB port of the computer, so you need to be attentive and not allow the KZ. The same connector is also used to program the control microcontroller, it is enough to connect the RESET conclusions on the connector and on the MK (see the red dotted line in the diagram). In the author's scheme, this is done by Jumper, but I did not clutch the fee and removed it. For single firmware, there is enough simple wire jumper. The fee turned out two-way, 45x18 mm sizes.


Connector for programming and jumper to reduce the speed of the programmer are put on the end of the device, it is very convenient


Firmware control microcontroller

So, after assembling the device, the most important thing remains - to flash the control microcontroller. For these purposes, friends are well suited for which computers left with LPT port :)The simplest programmer on five postings for AVR
The microcontroller can be flashing from the programming connector by connecting the conclusions of the microcontroller reset (29 leg) and the connector. Firmware exists for ATMEGA48, ATMEGA8 and ATMEGA88 models. It is advisable to use one of the last two stones, as the support version under ATMEGA48 is stopped and the latest version of the firmware dates back to 2009. And the versions under the 8th and 88th stones are constantly updated, and the author seems to be plans to add an intrahemnoy debugger to the functionality. We take the firmware on the German page. To fill the control program in a microcontroller, I used the PonyProg program. When programming, it is necessary to start a crystal to work from an external clock source by 12 MHz. Screen program with FUSE settings Jumpers in PonyProg:


After the firmware, the LED connected to 23 legs of a microcontroller should be burned. It will be a sure sign that the programmer will flash well and ready to work.

Installation Driver

Installation was carried out on the machine with the Windows 7 system and no problems arose. When you first connect to the computer, a message will be released about a new device detection, with the driver installation suggestion. Select the installation from the specified location:


Select the folder where the firewood is lying and click on


A mig appears a window with a warning that the driver installed does not have a digital signature in smallest:


We score for a warning and continue the installation, after a small pause, a window will appear that reports on the successful end of the driver installation operation


Everything, now the programmer is ready for work.

Khazama Avr Programmer

To work with the programmer, I chose the Khazama Avr Programmer flash driver. Wonderful program, with a minimalist interface.


It works with all AVR sketch microcontrollers, allows you to flash flash and eeprom, view the contents of the memory, erase the chip, and also change the configuration of the FUU-bits. In general, a completely standard set. Configuring FUUZs is made by choosing a clock source from the drop-down list, so the probability of walking the crystal by mistake sharply decreases. Fubuses can be changed and placement in the lower field, and it is impossible to place the tank to the non-existent configuration, and this is also a big plus in terms of safety.


Recording fius in memory of the MK, as you can guess, is carried out when the Write All button is pressed. The SAVE button saves the current configuration, and Load returns saved. True, I could not think of the practical application of these buttons. The Default button is designed to record the standard configuration of fuys, such with which microcontrollers go from the factory (usually it is 1 MHz from the internal RC).
In general, for all the time the use of this programmer, he showed himself from the best side in terms of stability and speed. He earned without problems as in an ancient stationary PC and on a new laptop.

Download file printed fees In SprintLayout, you can on this link