As the theater begins with a hanger, the programming of microcontrollers begins with the selection of a good programmer. Since I am starting to master ATMEL microcontrollers, I had to thoroughly familiarize myself with what manufacturers offer. They offer a lot of interesting and tasty, only for absolutely exorbitant prices. For example, a handkerchief with one twenty-foot microcontroller with a pair of resistors and diodes as a strapping, stands as an “airplane”. Therefore, the question of self-assembly of the programmer arose. After a long study of the experience of radio amateurs with experience, it was decided to assemble a well-proven USBASP programmer, whose brain is the Atmega8 microcontroller (there are also firmware versions for atmega88 and atmega48). The minimum binding of the microcontroller allows you to collect a fairly tiny programmer that you can always take with you, like a flash drive.
The author of this programmer is the German Thomas Fichl, a
page of its development with diagrams, files of printed circuit boards and drivers.
Once it was decided to assemble a miniature programmer, I redraw the circuit for the Atmega8 microcontroller in the TQFP32 package (the pinout of the microcontroller differs from the pinout in the DIP package):

The jumper J1 is used if it is necessary to flash a microcontroller with a clock frequency below 1.5 MHz. By the way, this jumper can be completely eliminated by placing the 25th leg of the MK on the ground. Then the programmer will always work at a lower frequency. I personally noted for myself that programming at a reduced speed for a fraction of a second longer, and so now I don’t pull the jumper, but always sew it.
Zener D1 and D2 are used to coordinate the levels between the programmer and the USB bus, they will work without them, but not on all computers.
The blue LED indicates that the circuit is ready for programming, red lights up during programming. Contacts for programming are displayed on the IDC-06 connector, the pinout conforms to the ATMEL standard for a 6-pin ISP connector:
')

Contacts are brought to this connector for powering programmable devices, here it is taken directly from the computer’s USB port, so you need to be careful not to allow short circuits. The same connector is also used for programming the control microcontroller; to do this, simply connect the Reset pins to the connector and to the microcontroller (see the red dotted line in the diagram). In the author's scheme, this is done by a jumper, but I did not clutter up the board and removed it. For a single firmware, a simple wire jumper is enough. The board turned out to be two-sided, with dimensions of 45x18 mm.

A connector for programming and a jumper to reduce the speed of the programmer at the end of the device, it is very convenient

Firmware microcontroller firmware
So, after assembling the device, the most important thing is to flash the control microcontroller. For these purposes, friends that have computers with a LPT port are well suited :)
The simplest programmer on five postings for AVRThe microcontroller can be flashed from the programming connector by connecting the microcontroller's Reset pins (29 legs) and the connector. Firmware exists for Atmega48, Atmega8 and Atmega88 models. It is advisable to use one of the last two stones, since support for the Atmega48 version has been discontinued and the latest firmware version dates back to 2009. And the versions under the 8th and 88th stones are constantly updated, and the author seems to be planning to add an in-circuit debugger to the functionality. Firmware we take on the German page. To fill the control program in the microcontroller, I used the PonyProg program. When programming it is necessary to start the crystal to work from an external clock source at 12 MHz. Screen program with fuse jumper settings in PonyProg:

After flashing, the LED connected to the 23 foot of the microcontroller should light up. This will be a sure sign that the programmer is successfully flashed and ready to go.
Driver installation
The installation was carried out on a machine with Windows 7 and there were no problems. When you first connect to the computer, a message will appear about the detection of a new device, with a suggestion to install the driver. Select the installation from the specified location:

Select the folder where the firewood lies and click Next.

Instantly a window will appear warning that the driver being installed does not have a digital signature on the small ones:

We hammer on the warning and continue the installation, after a short pause a window will appear, informing you of the successful completion of the driver installation

That's it, the programmer is now ready to go.
Khazama AVR Programmer
To work with the programmer, I chose the
Khazama AVR Programmer . Wonderful program with a minimalist interface.

It works with all AVR running microcontrollers, allows you to flash flash and eeprom, view the contents of the memory, erase the chip, and also change the configuration of fusion bits. In general, it is quite a standard set. Setting up fyuzov by selecting the source of clocking from the drop-down list, thus, the probability to lock the crystal by mistake is sharply reduced. Fyyuza can be changed and the arrangement of daws in the lower field, while it is impossible to arrange the daws on a non-existent configuration, and this is also a big plus in terms of security.

Writing fyuzov in memory of MK, as you might guess, is done when you press the Write All button. The Save button saves the current configuration, and the Load returns the saved one. True, I could not come up with the practical application of these buttons. The Default button is intended for recording standard fusion configurations, such as which microcontrollers come from the factory (usually 1 MHz from the internal RC).
In general, for all the time using this programmer, he showed himself from the best side in terms of stability and speed of work. He earned without any problems both on the old stationary PC and on the new laptop.
Download the PCB file in SprintLayout at
this link.

Well, like everything, if you have any questions, I will try to answer.