Computer literacy, help and repair

Miniature usb programmers for avr microcontrollers. Programmers for AVR microcontrollers (USB, COM, LPT)

Previously, I used AvrUsb500 by Petka (STK500) and AVR Studio 4 to flash AVR microcontrollers. Everything was fine until the FTDI FT232RL chip failed and did not want to work. After that, I started looking for alternatives and came across Khazama AVR Programmer And . I immediately liked the program for its minimalism, it has a simple and intuitive interface. Small and remote. Since then I have been using this wonderful AVR programmer.

Khazama AVR Programmer Features

Khazama works with all mainstream AVR microcontrollers, allows you to program flash and eeprom, read the contents of flash and eeprom memory, erase the chip, and change the configuration of fuse bits (Fuses and Lock Bits). Everything you need to flash AVR microcontrollers. The fuses are configured by selecting the clock source from the drop-down list, thus, the probability of “killing” the controller by mistake is sharply reduced. Fuses can also be changed by placing checkboxes in the lower field, while you cannot checkmark a non-existent configuration, which makes the fuse configuration safer. And this is also a big plus.

Recording Fuses

The fuses are written to the microcontroller memory by pressing the Write All button. There is a Save button to save the current configuration, and Load returns the saved one. The Default button is for writing a standard fuse configuration, such as the microcontrollers come from the factory, usually 1MHz from the internal RC.
In general, for the entire time of using this programmer, it showed itself from the best side in terms of stability, security and speed. I recommend using it to anyone who wants to program AVR microcontrollers.

In my case, this is the absolute record holder in terms of delivery speed - about 5 months of careless wandering, it’s not clear where. Despite the monstrous time delay, I still received the package, which I am incredibly happy about, despite the shortcomings, which I will tell about below. Since I have a very bad memory, it was necessary to combine the useful information found somewhere in one place in the form of a memo, collecting it bit by bit in different nooks and crannies of the network turned out to be a non-trivial matter, so I will arrange all this in a separate post.
USB ISP - the cheapest AVR controller programmer that can be found on sale, was taken to broaden my horizons and study the AVR in more depth.
The review includes: a description of the programmer, how to connect it to the chip, setting it up in AvrDude Prog, Khazama, Atmel Studio 7, and more.

Of course, instead of it, you can use the Arduino UNO with the ArduinoISP sketch stitched into it, but this is not convenient, fiddling with wires, especially if there is only one UNO, discourages enthusiasm. It was easier to have such a programmer separately, or rather two. For two reasons:
1) Even before the purchase, it was already clear from the reviews that the soldering quality of these devices was suffering, and some of them also came with split zener diodes. It was decided to play it safe by ordering two.
2) One programmer can also be sewn to another by rearranging the jumper on the slave device.

Specifications

Supported OS: Windows, macOS, Linux
CPU: Atmega8A
PC connection interface: USB
Programming interface: ISP (in-circuit)
Programming voltage: 5V or 3.3V (depending on JP2 jumper position)
Programming frequency: 375kHz (default) and 8kHz (with jumper JP3 closed)
Supported controllers: all AVRs with SPI interface
Description:

List of supported microcontrollers

ATmega series

ATmega8 ATmega48 ATmega88 ATmega168 ATmega328
ATmega103 ATmega128 ATmega1280 ATmega1281 ATmega16
ATmega161 ATmega162 ATmega163 ATmega164 ATmega169
ATmega2560 ATmega2561 ATmega32 ATmega324 ATmega329
ATmega3290 ATmega640 ATmega644 ATMEGA64 ATmega649
ATmega6490 ATmega8515 ATmega8535

Tiny series

ATtiny12 ATtiny13 ATtiny15 ATtiny26 ATTINY25
ATtiny45 ATtiny85 ATtiny2313

Classic series

AT90S1200 AT90S2313 AT90S2333 AT90S2343 AT90S4414
AT90S4433 AT90S4434 AT90S8515
AT90S8535

CAN series

AT90CAN128

PWM series

AT90PWM2 AT90PWM3

Appearance

The delivery set is minimal - a programmer + a cable without an elastic band. In my case, double the amount.

The performance culture is really lame, crookedly soldered combs immediately caught my eye. Everywhere, wherever possible, there are traces of flux, and with oxides, apparently, the programmers were lying in the warehouse for a long time, and they were assembled with the speed inherent in the Chinese.















Some holes are not completely filled with solder



SMD elements are also crookedly soldered



I straightened the comb a little later, it was painfully unpleasant to look at such an oblique one, I soldered the elements, and then washed the board



The dimensions of the board are slightly larger than the USB-TTL converter on the CP2102



The train is about 30cm long, there is an opinion that the shorter the train, the better. Some make it shorter on purpose. If you order the original USBASP - there is a complete cable already 50cm.



Board controls

There are three jumpers on the board that set different operating modes of the programmer:
JP1- closes in case of updating the firmware of the programmer itself
JP2- triple jumper, here you select what voltage will be supplied to the microcontroller being flashed, or 5V (left position) and 3.3V (right position)
JP3- if it is closed, then the controller programming will occur at a reduced frequency, however, the Chinese did not solder the comb here, because on this firmware it is not required
The programmer, as you can see, is built on the basis of Atmega8 with 12 MHz quartz. The top rightmost element, signed F1, with an inverted number 4, is a resettable fuse that protects the USB port of a PC / laptop if a short circuit suddenly occurs on the board being flashed. Under the jumper JP2 there is an LDO stabilizer 662K, which lowers the voltage from 5V to 3.3V if the jumper is set to the right position.

Driver installation

To start using the programmer, you must first install drivers for it. I insert any programmer into the USB port of the PC, a signal about new equipment sounds, the LED on the device itself is on, but there is no automatic search for drivers.
note. before installing the driver, you must disable digital signature verification in Windows
1) Download, unzip to a convenient place.
2) Go to "Device Manager", for example, hover over the main button (Win10), right-click and select "Device Manager".

3) In the "Other devices" branch, you can see an unidentified USBASP device with an orange triangle -> hover over it, right-click -> "Update drivers ..."

4) Specify the path to the previously unpacked driver folder - "libusb_1.2.4.0", click "OK"

5) "Install this driver anyway"

6) Done, now the orange triangle is gone, the drivers are installed



Fellow Firmware

I already knew before that the Chinese sell these programmers with not the latest firmware. I decided to first update the firmware on one of them, and then, for the sake of interest, compare both programmers in operation. To do this, I connect both devices with a cable, on the master (which I insert into the USB port), no jumpers are touched, and on the slave programmer (on which we will update the firmware), I rearranged the jumper from JP2 on the JP1:



I go into the Khazama AVR Programmer program, select ATmega8 from the drop-down list and first read the Flash memory through the “Command” -> “Read FLASH to Buffer” menu item in order to save the Chinese factory firmware for myself. Just in case.

In this case, such an error will periodically appear, closing the window, the program will continue to work.

Reading is in progress, which ends with a pop-up window about the successful reading of the FLASH memory into the buffer

Now you need to save the contents of the buffer: "File" -> "Save FLASH Buffer As ...". Choose a convenient place where the old firmware will be saved, give a name (for example, I called it firmware_1) and add the extension * .hex - if you do not write it, then it will be saved as a simple file without an extension.


I download the firmware for the programmer from the page, archive usbasp.2011-05-28.tar.gz(in the same archive there are drivers for Windows, I unpack the contents to a convenient place.
In the meantime, in Khazama I will upload the downloaded firmware to the buffer. "File" -> "Load FLASH File to Buffer". I choose the firmware, where atmega8 is written in the name, since the programmer to be flashed is on this chip.

As you can see, there are three firmware here - for Atmega8, 48 and 88. In our case, Atmega 8 - I choose it.

I'm stitching. "Command" -> "Write FLASH File to Buffer". The error occurs again, but after that there is a process that ends in success.



Since, in the usual sense, “programming” means setting 1, then when working with fuses, everything is exactly the opposite, which causes confusion and in this case, you can inadvertently block the controller and then it will no longer be possible to flash it. The Khazama AVR Programmer is convenient for viewing fuse-bits - there you can clearly see and scheduled which ones are installed and which ones are not.

They are located along the path "Command" -> "Fuses and Lock Bits ...", a window will open:

Where, by pressing the “Read All” button, fuse and lock beats are counted, and the notorious error will have time to get out as many as 5 times in a row. Errors are pouring in on the factory Chinese firmware. But if you insert a recently flashed programmer into the USB port, with the firmware downloaded from the link above, then these errors will no longer come out, but the bugs will come out elsewhere, but about them later.

Communication with Pro Mini board (Atmega 168, 3.3V/8MHz)

In this case, the programmer pins are connected to the pins of the Pro Mini board, as illustrated in the schematic diagram below. Jumpers are not rearranged, i.e. stays at 5V.
Despite the fact that the Pro Mini board is signed as 3.3V, 5V can also be supplied to the 168th Atmega. The AMS1117 stabilizer at 3.3V, by the way, is generally soldered out of the board.



AVRDUDE PROG 3.3
The console program for flashing microcircuits does not have its own graphical interface, it works in stock from the command line, but many shells have been written by enthusiasts for it, for the convenience of working with it. One of these shells is called AVRDUDE PROG, created by Russian-speaking developers. This shell, in my opinion, is convenient just for Flash-flashing MK. After its launch, the controller is selected, in this case Atmega168 and the programmer type is USBasp. After that, you can write / read memory. Both on the factory firmware and on the new one - in both cases there were no problems with communication with the Atmega168. For the sake of interest, I flashed the Arduino standard blink sketch, exported to a binary HEX file. Everything is smooth.




Khazama AVR Programmer
Here it is enough to select the microcontroller from the drop-down list and you can already work with memory / bits.
However, if the factory firmware is installed on the programmer itself, errors will periodically appear, as already mentioned above, on the new firmware, these errors are no longer there.


Communication with ATtiny13A controller in SOIC8 package

Connection according to the diagram below. But this is where things get a little more interesting.

Since the bare chip is in the SOIC8 SMD package, in this case I placed it in the SOIC8-DIP8 adapter for easy connection to the programmer in the future. You can read an overview of this adapter.

AVRDUDE PROG 3.3
Here, the controller of the same name, the USBasp programmer, is selected from the list, and if the programmer is flashed with factory Chinese firmware, then all operations go smoothly and smoothly. However, it is worth replacing the programmer with another one with updated firmware, then an error occurs during any operation.

It appears due to the fact that neither the program nor the programmer can automatically enter the slow programming mode required for ATtiny13. But there are at least two options:
1) Iron: close the jumper JP3

2) Software: edit the file "programm.ini" in the folder with the program AVRDUDE PROG 3.3


Enter four lines of code there and save. (taken)
progisp=jtag2pdiportprog=COM1portenabled=1 progisp=Usbasp -B 3 portprog=usb portenabled=0

Note. Here the key "-B" is used, which is engaged in the transfer of the programmer to a reduced programming frequency. Value "3" - time in microseconds

After that, run AVRDUDE PROG 3.3 again and select UsbaspSpeed ​​in the drop-down list of programmers. Now work with ATtiny13 on the programmer with the new firmware will be error-free, and the JP3 jumper will no longer need to be closed in this case.

Khazama AVR Programmer
The controller is selected from the list and almost the same situation.

The programmer with factory firmware works fine with ATtiny13, except for the constantly appearing windows with an error, which I already talked about earlier.
But with the programmer on the new firmware, another error already appears with the inability to read the signature (digital signature) of the controller.

But it's worth closing the jumper JP3 and you can work safely


Or just set the operating frequency from the drop-down list along the path “Command” -> “Programm Options”, I set the frequency to 187.5 kHz.

Note. The programming frequency must be at least 4 times less than the clock frequency of the flashed microcircuit. But if you look at the fuses read from ATtiny13, then the last line is Int.Rc.Osc. 9.6 MHz is indicated.
At a minimum, a beginner will have a question - why does the same error appear on the 1.5 MHz set in KHazame? And also why, if in AtmelStudio write, for example, the code for blinking the LED at a frequency of once per second and write in the macro:
#define f_cpu 9600000 then by uploading the code to Attiny13, the LED will flash very slowly?
- look at the penultimate line, where Divide Clock by 8 Internally is the included frequency prescaler that divides this 9.6MHz by 8, and so the actual chip frequency here is 1.2MHz. Therefore, if you select a frequency of 187.5kHz or less, the errors disappear and you can work normally with the controller.

Note 2. The method with the choice of frequency in KHazame is several times faster than the method with the physical closure of the JP3 jumper, because in the latter case the frequency is reduced to 8 kHz.

Programmer integration in Atmel Studio 7

Atmel Studio is a development environment from Atmel, but it cannot work directly with USBASP, especially Chinese. However, thanks to the same AVRDUDE program, which is part of the AVRDUDE PROG 3.3 package, which will play the role of an intermediary here, you can build a “crutch”, and then add the ability to flash the MK connected via USBASP already in the environment itself.

First you need to start the environment, it is assumed that we have already written and built some code. In my example, this is a simple LED flasher - Blink.

On the top toolbar, select "Tools" - "External Tools ..."

A small window will open, click "Add"

In the top field Title: enter any convenient name, I wrote "Atmega168", because the configuration that I will give below applies specifically to this controller, and for any other controller it is configured individually.
In the large field at the top, the name of the instrument will be automatically duplicated.

Second line, field Command:- here you need to specify the path to the file "avrdude.exe", which is located in the folder with the above program

Third line, field "Arguments:" you need to enter the configuration itself

Configuration for Atmega168

P m168 -c usbasp -P usb -U flash:w:$(ProjectDir)Debug\$(TargetName).hex:a
-p - controller name
-c - which programmer
-P - port through which the firmware will be uploaded
-U - what operation will be performed with what memory (in this case, writing to Flash)
If you need to configure for another MK, then the “m168” parameter must be changed to the corresponding controller that will be flashed. For example "m8" for Atmega8 or "m328p" for Atmega328p. See the parameters for other MKs - you will also find descriptions of the AVRDUDE keys there.

Configuration for ATtiny13


After filling in the fields, click "Apply" and "OK". The window will close

Now, if you click on "Tools" again, the newly created tool will appear there. And by clicking on it, the compiled code will be automatically flashed into the controller.

But this operation takes place in two clicks, which is not very convenient. We need to bring this tool to the main toolbar so that it is always in sight.
To do this, go to "Tools" again, then click on the item "Customize ..."
The following window will open:

Go to the "Commands" tab - click the "Add Command ..." button

Another window will appear. In it - select "Tools" in the left column, and select "External Command 1" in the right column. Click "OK"

"External Command 1" will be at the top of the list, and pay attention to the toolbar itself - the item "Atmega168" has appeared in the interface.

But it seems to me that the place assigned to it is not entirely successful, it is desirable to move it to the right, for this the “Move Down” button is pressed (one click = shift one position to the right). After that, you can close the window by clicking the "Close" button and sew the chip directly from the studio in one click through the monitored programmer.


When flashing the chip using this method, the AVRDUDE console window appears for a second. But it may be necessary to somehow save this log for further viewing - then in the "External tools" window you need to check the "Use Output window".

And now the log will be displayed in the output window at the bottom of the ATmel Studio 7 program. This checkbox can be set separately for each controller added to the "External tools".

Supplement for programmer fuses

From the READMI document that comes with the drivers and firmware for USBASP, it later turned out that the developer recommends setting a certain configuration of the fuse bits that determine the operation of the external resonator.
The downside of khazam's is that the HEX values ​​of the set bits are not displayed in the fuse window. You can already see this in AVRDUDE PROG. Factory fuses set by the Chinese look like this ( be sure to put a dot "inverse" - highlighted with a blue rectangle):

It is necessary to remove two checkboxes from "BODEN" and "SUT1" (highlighted with a red oval),
put two checkboxes on "CKOPT" and "SUT0" (highlighted with a green rectangle),
in the right column, the HEX values ​​of the changed bits will be displayed (highlighted with a bold red rectangle): Lock Byte: 3F, Fuse High Byte: C9, Fuse Low Byte: EF.

If everything fits, you can press "programming"

ATTENTION. Evil fuse beat RSTDISBL- do not touch in any case, otherwise its installation will block the controller and then it will no longer be possible to flash it via USBASP.
_____________________________________

conclusions

Tested, it works. If khazam is not planned to be used, then there is no point in updating the firmware for the programmer, since it works fine anyway, and in the case of ATtiny13, no edits or jumpers are required. The latest firmware - for some reason turned out to be more capricious in this regard. The only thing, after receiving, the board must be soldered and washed.

Link List

USBASP programmer - device, pinout, connection, firmware

Today we will look at how, at no extra cost and quickly, to program any AVR microcontroller that supports serial programming mode (ISP interface) via a computer USB port. As a programmer, we will use a very simple and popular programmer USBASP, and as a program - AVRdude_Prog V3.3, which is designed for programming MK AVR.

Programmer USBASP

In order to program the microcontroller, you need to have two things:
- programmer
- appropriate software for recording data in the MK
One of the simplest, most popular and miniature AVR programmers is USBASP programmer, created by the German Thomas Fischl.
There are many different circuit solutions for this programmer, you can assemble the programmer yourself or buy it (cost - 2-3 dollars). When self-assembling, it should be borne in mind that the assembled programmer will need to be flashed with a third-party programmer.

We will consider the most "fancy" version of the programmer:


Features of the programmer:
- works with various operating systems - Linux, Mac OC, Windows (for the Windows operating system, for the programmer to work, you need to install drivers - archive at the end of the article)
- programming speed up to (programming speed can be set by yourself, for example in AVRDUDE_PROG) 375 (5) kb / s
- has a 10-pin ISP interface (complies with the ICSP standard with a 10-pin pinout)
- supports two programmer supply voltages - 5V and 3.3V (not all PC USB ports work at 5 Volts)
- powered by a computer USB port, has built-in current protection (500 mA resettable fuse)

The purpose of the jumpers:
connector JP1- designed for flashing the microcontroller of the programmer (for flashing - you need to close the contacts)
connector JP2- programmer supply voltage - 5 Volts or 3.3 Volts (by default - 5 Volts, as in the photo). A programmable microcontroller, or the design in which it is installed, at a current consumption of 300-400 mA can be powered from the programmer, for this there is a + 5V (VCC) output on the connector.
JP3 connector- determines the SCK data clock rate: open - high frequency (375 kHz), closed - low frequency (8 kHz)
Learn more about JP3 connector
Jumper JP3 is designed to reduce the speed of writing data to the microcontroller. If the microcontroller has a clock frequency of more than 1.5 MHz, the jumper can be opened, while the programming speed is high. If the clock frequency is less than 1.5 MHz, it is necessary to short-circuit the jumper outputs - reduce the programming speed, otherwise it will not work to program the microcontroller. For example, if we program the ATmega8 microcontroller (in principle, almost all AVR MKs are set to a default clock frequency of 1 MHz), which has a default clock frequency of 1 MHz, it will be necessary to close the jumper pins (as in the photo). It is probably better to keep this jumper constantly closed so that, forgetting about its existence, you do not suffer from the question - why the microcontroller is not being flashed.

If you use the one posted on the site, then you can forget about the jumper

The programmer is supported by the following software:
— AVRdude
— AVRdude_Prog
— Bascom-AVR
— Khazama AVR Prog
eXtreme Burner AVR

Working with such a programmer is very simple - connect the corresponding outputs of the programmer to the microcontroller, connect it to the USB port of the computer - the programmer is ready to work.
USBASP 10-pin programmer cable pinout :


1 - MOSI - data output for serial programming
2 - VCC - +5 (+3.3) Volt output to power the programmable microcontroller or programmable board from the computer's USB port (maximum current 200 mA - so as not to burn the USB port)
3 - NC - not used
4 - GND - common wire (power minus)
5 - RST - connected to the RESET pin of the microcontroller
6-GND
7 - SCK - data clock output
8-GND
9 - MISO - data input for serial programming
10-GND

Installing drivers for the USBASP programmer

Installing the driver for the USBASB programmer is very simple:
- connect the programmer to the USB port of the computer, and a new device "USBasp" will appear in the device manager with a yellow triangle and an exclamation mark inside, which means that no drivers are installed
- download and unzip the file "USBasp-win-driver-x86-x64-ia64-v3.0.7"
- run the "InstallDriver" file - the drivers for the programmer will be automatically installed
- check the device manager - the yellow triangle should disappear (if not, right-click on the "USBasp" device and select "Update"
— the programmer is ready to work

FUSE bits when programming USBASP AVR:

The archive "usbasp.2011-05-28" contains folders:
=BIN:
- win-driver - drivers for the programmer
- firmware - firmware for microcontrollers Mega8, Mega88, Mega48
= circuit - diagram of a simple programmer in PDF and Cadsoft Eagle

When flashing a Chinese programmer, I recommend installing the FUSE-bit CKOPT. CKOPT is related to the clock limit. By default, CKOPT is reset and stable operation of the programmer's microcontroller when using a quartz resonator is possible only up to a frequency of 8 MHz (and the programmer's microcontroller operates at a frequency of 12 MHz). Setting the FUSE bit CKOPT increases the maximum frequency to 16 MHz. The Chinese do not touch this FUSE-bit, which quite often leads to a failure of the programmer (usually the system does not detect the programmer).

Archive "USBasp-win-driver-x86-x64-ia64-v3.0.7" designed to install drivers as mentioned in the article

(518.9 KiB, 13,188 hits)

(10.9 MiB, 24,942 hits)

The USBASP programmer described in the article, flashed with the latest version of the program, tested in operation, with installed jumpers and jumpers, you can purchase in the MirMK-SHOP online store

The programmer is based on the Objective Development driver and is fully compatible with the original ATMEL AVR910 programmer. Description of the device. The fuse protects the power lines of the USB port from accidental short circuits in the power supply circuits of the programmer. Diodes VD1, VD2 are silicon rectifiers, they are designed to lower the power supply of the microcontroller to 3.6 V. According to the documentation, the controller can operate at this supply voltage up to a frequency of just over 14 MHz. LEDs VL1 (" RD"), VL2(" WR”) signal the current actions of the programmer and indicate the read and write modes. LED VL3 (" PWR”) indicates that power is being supplied to .

Jumper J1 - ( MODify) serves for the initial programming of the control MK programmer. When it is closed, an external programmer is connected to the ISP connector and the control program is loaded into the MK. After programming the control MK programmer, this jumper must be opened and the jumper J2 - NORMal closed.

Jumper J3 LOW SCK lowers the clock frequency of the SPI port of the MK programmer to ~ 20 kHz. When the jumper is open, the SPI frequency is normal, when the jumper is closed, it is reduced. You can switch the jumper on the go, since the control program of the MK programmer checks the status of the PB0 line each time the SPI port is accessed. It is not recommended to switch the jumper when the process of writing/reading the programmable MK is running, because, most likely, this will lead to distortion of the written/read data. Jumper J3 is introduced for the possibility of programming MK AVR, clocked from an internal 128 kHz generator.

Resistors R10 - R14 are designed to match the signal levels of the microcontroller of the programmer and external circuits (programmable MK or other programmer). The clock frequency of the SPI port of the MK programmer with the open jumper J3 is 187.5 kHz. This allows controllers to be programmed at approximately 570 kHz for the ATtiny/ATmega, 750 kHz for the 90S, and 7.5 MHz for the 89S. Controllers are programmed from 10 to 30 seconds (using the AVRProg v.1.4 utility from the AVR Studio package) along with verification, depending on the amount of FLASH memory and clock frequency.

A square wave with a frequency of 1 MHz is output to the LED output of the ISP connector to "revive" the MK, which had erroneously programmed fuse bits responsible for clocking. The signal is generated constantly and does not depend on the operating mode of the programmer. The programmer was tested with the programs AVRProg v.1.4 (included in the AVRStudio package), ChipBlasterAVR v.1.07 Evaluation, CodeVisionAVR, AVROSP (ATMEL AVR Open Source Programmer). For the normal functioning of the controller in the circuit, it is necessary that the bits be programmed (set to "0"). SPIEN, CKOPT, SUT0 And BODEN. Usually microcontrollers coming from the factory, i.e. new, have already programmed bit SPIEN. The remaining bits must be unprogrammed (set to "1").

Instructions for installation and operation. Flash the controller. Connect the freshly baked programmer to the computer via USB. The operating system will find a new device - AVR910 USB Programmer, when prompted to automatically find the driver, refuse, and specify the path to the inf file, depending on the operating system installed on your computer.

The forum contains all the files, as well as the printed circuit board for our avr programmer. Here I will show the technology of assembling the AVR USB programmer and packing it into the case. First, download the archive and make a printed circuit board.

Then we solder all the details on it. I could not find a small quartz, so I soldered a large one, but on long legs, so that later I could bend it so that it would not interfere when installing the board into the case. Next, we select a suitable case, I had it ready.

We adjust the board to the case, make all the measurements, drill holes and here is the finished device for you, with a universal board.

If there is no special measuring equipment, you can check using the LED. The LED is connected anode to the LED pin, cathode to any GND pin of the ISP connector. When power is applied, the LED should glow in the “half-light”. When the legs of the quartz oscillator are closed with tweezers, the LED should either light up in “full heat”, or there should be no glow.

An assembled programmer with a correctly programmed microcontroller does not need to be configured without errors. But if the RESET input of the programmable MK is pulled up to the supply voltage by a resistor, then the resistor value should not be lower than 10 kOhm - this is due to the reduced supply voltage of the control controller in the programmer circuit and the introduction of limiting resistors on the ISP connector bus.

Discuss the article PROGRAMMER AVR USB

Khazama AVR Programmer - a graphical shell of the avrdude console program, developed by an Arabic programmer, supported by Windows XP / Vista / 7 systems. The program is intended for flashing Atmel microcontrollers of the AT90/ATtiny/ATmega/ATXmega family.

Khazama can read and write program code, clear memory and program FUSE bits, it also has an auto-programming function and an adjustable programming clock. The program supports work with the programmer.

Setup and firmware

We start the program

To set up the program go to Command -> Program Options

Here are the program settings, the vast majority of which are settings Auto program(automatic programming) highlighted in red in the list. Using the automatic programming function, the operations such as reading, erasing, writing and checking are performed automatically in turn, which is very convenient. Just press the button Auto program and all items marked with checkmarks in the program settings will be executed.

1. Position the program window on top of other windows
2. Load the last closed file into the program buffer
3. Read the FLASH memory of the microcontroller into the program buffer
4. Read EEPROM memory of the microcontroller into the program buffer
5. Clear microcontroller memory
6. Write the firmware to the FLASH memory of the microcontroller
7. Write firmware to EEPROM memory of the microcontroller
8. Verify the bytes of the FLASH memory of the microcontroller after writing
9. Verify bytes of EEPROM memory of the microcontroller after writing
10. Write Fuse bits to microcontroller
11. Check the correct choice of the microcontroller model
12. Programming clock setting

Select the microcontroller through the drop-down list

or through the menu File -> AVR -> ...


Loading the firmware file into the program File -> Load FLASH file to Buffer, select the file and click Open

Similar posts