We make USBasp programmer for AVR microcontrollers ourselves. Adapter for connecting the AVR MK to the programmer Soic adapters for the avr programmer


I somehow needed to flash a couple of microcircuits in SOIC packages of different widths.

I had three options:

  • Buy a ready-made ZIF adapter.
  • Solder the wires to each leg, connect to the programmer, flash, unsolder. And so twice.
  • Make a couple of adapters for different widths of cases.

The purchase option is not suitable. There are no radio stores in my city... Bottom line: long, expensive.

I don't like the soldering option either. Taking into account the fact that the number of microcircuits can be, say, 20 pieces... The result: soldering turns into a complete nightmare.

It was definitely decided to make adapters ourselves. We will need two motherboards from old computers. On the board we find such a “crib” with a BIOS chip. We remove the microcircuit and proceed to dismantling the “crib”.

Since the terminals of the socket are located under it, it becomes extremely difficult to unsolder it with a hairdryer - the plastic case will most likely melt. We will dismantle it in a different way. We pry up the “crib” from below using a screwdriver.

The plastic case will be removed

And the contacts will remain on the board.

Now they can be unsoldered without any problems using a hot air gun.

After unsoldering, we insert the contacts back into the “bed”, but only on the top and bottom sides. We do not insert contacts on the left and right.

We bend the contacts to the outside.

Now, using a Dremel, we cut out the middle part of the “crib” and process the unevenness at the ends with a file. The result will be a “crib” of smaller width, consisting of two halves.

We separate the board, etch it, tin it, drill it, solder the “bed”. The PCB file can be downloaded at the end of the article.

The width is selected so that the microcircuit fits freely there, with the pins facing up. For a narrow SOIC package it looks like this.

And for the general public - like this.

For reliability, we fix the terminals on the thermal nozzles.

The result was two adapters.

I insert the adapter into the socket on the programmer.

Then I put the microcircuit upside down in the “crib”, lightly press it with the tip of a pencil or toothpick, and get to work.

Many radio amateurs (including myself), who have finally decided to succumb to the temptation of using microcontrollers (MCUs) in their work, are faced with the need to program these same MCUs. Someone puts his hand in his pocket, takes out banknotes, and without any remorse gives them to his “uncle”, receiving in return a black or colored box with unknown contents (or known) for a lot of money, and someone is trying to make a programmer with their own hands, with This gives you additional experience. Let's welcome these enthusiasts and try to help them at least a little in their difficult, but very interesting and noble work.

Second adapter for AVR- This is a commercial version of the adapter, so I don’t provide a seal or a detailed diagram.




I’ll tell you a secret, from this photo the circuit and signet were restored, and I even made an adapter for myself. I really like it, I even test quartz with it. There is no printed circuit board for distribution, but there is a photo and sprintlayout. Draw your own conclusions :)

Another similar adapter was found on the forums, also well made, but for MKs in SOI and TQFP packages



printed circuit board from the author plumber and one more.

Read about adapters for Pic controllers and serial memory chips in the subsequent article "PIC & SEEPROM Adapters". This will be purely my development, so I will definitely provide a signet and diagram. When writing the article, photos and other materials found on the Internet on forums were used. I do not claim any authorship; the material was used solely for educational purposes. For specific questions, write in a personal message. Best regards, Oleg63m.

Attention, there are inaccuracies in the article! One of the attentive readers reis noticed them and kindly shared them with us, for which we will thank him. The ATmega64 and ATmega128 pins MOSI And MISO not applicable for ISP. Watch the DataSheet carefully! For example, for ATmega128 signals MISO connect to leg PE1, MOSI connected to leg PE0. In the original source, the author himself indicates in the comments that 128 was not diluted correctly. By the way, in the article, the board that is in the archive has an inaccuracy. The AtMega seat is somehow crooked. And it's easy to fix everything - MOSI--> 2nd leg, MISO--> 3rd leg for 128.

In this article we will describe the manufacturing stages step by step. USBasp programmer for AVR microcontrollers. In separate articles we will provide a description of installing drivers for the Windows XP and Windows 7 (x64/x86) operating systems. At the end of the post there is a link with the necessary documentation for making a USBasp programmer with your own hands.

The USBasp programmer, due to its ease of manufacture and use of inexpensive and widely available elements, has become very popular among radio amateurs. Its operating parameters are not inferior to professional and expensive AVR microcontroller programmers.

  • Works with multiple operating systems - Linux, Mac OS X and Windows - including Windows 8!
  • Does not require external power.
  • Can program at speeds up to 5kB/s
  • There is an option (Switch 2) to reduce the programming speed - for processors with quartz less than 1.5 MHz
  • Provides programming voltage (Switch 1) 5 volts
  • Indicating the operation of the programmer using an LED

Before starting work, it is worth familiarizing yourself with the sequence of all actions performed, namely:

  1. Selecting a circuit board design/pattern
  2. Transferring the printed circuit board design onto foil fiberglass laminate
  3. Etching a printed circuit board in a ferric chloride solution
  4. Drilling holes
  5. Installation of elements (soldering)
  6. Programming Atmaga8 programmer
  7. Connecting the programmer to a computer
  8. Installing drivers – Windows XP, Windows 7
  9. Selecting a program that supports USBasp

There are many versions of the USBasp programmer, but they are all based on the main circuit created by Thomas Fischl. The programmer microcontroller firmware is also his authorship.

Original programmer circuit:

In this case, the original scheme was chosen as the basis. Since the use of jumpers in the original circuit is not entirely convenient, it was decided to use DIP switches. Some resistor values ​​were also changed.
Moreover, in the original circuit, the TxD and RxD lines are routed to the ISP connector, although this is not necessary (more precisely, they are not used in practice).

Below is a diagram with the changes made:

Construction of a USBasp programmer

There are many versions of the PCB for this programmer, some can be found on the official USBasp website. However, I made my own based on the above diagram.

Unfortunately, due to the use of DIP switches, the board design became a little more complex, which led to the use of 2 short jumpers in order to ensure that the PCB was still single-sided.

Below is the result of the PCB:

As can be seen in the figure, the programmer did not use SMD elements. The empty space on the board is “filled” with a ground field, mainly in order not to etch out a large amount of copper, and also to reduce the influence of interference on the programmer.

List of elements used in the USBasp programmer:

  • R1: 10k
  • R2: 180
  • R3: 100
  • R5, R6: 68
  • R7: 2k2
  • C1, C2: 22p
  • C3: 10μ
  • C4: 100n
  • LED1: Red LED 20mA
  • LED2: Green LED at 20mA
  • D2, D3: zener diodes at 3.6V
  • X1: USB connector type B
  • SV1: IDC-10 socket
  • Q1: Quartz 12MHz, HC49-S body
  • SW1: Dip switch three positions
  • IC1: Atmega8 (NOTE: The Atmega8 - PU microcontroller should not be used due to its maximum clock speed limitation of 8 MHz!)

The transfer of the printed circuit board design of the USBasp programmer to fiberglass was carried out using the LUT method (laser-iron technology). We will not describe how to do this, since there is a lot of this information on the Internet.

Let's briefly say that first a drawing in a 1:1 scale is printed on glossy paper, then it is applied to the cleaned and degreased copper side of the fiberglass laminate and fixed with paper tape. Next, the paper side is carefully smoothed with an iron using a 3-point iron. Afterwards, the whole thing is soaked in water and carefully cleaned of paper.

The next step is etching the board in a ferric chloride solution. During etching, it is desirable to maintain the temperature of the solution at least 40 C, so immerse the jar with the solution in hot water:


After the etching process is complete, you must remove the toner with acetone.

All that remains now is to drill the holes. After completing the board manufacturing process, you can begin soldering the USBasp programmer elements, starting with the jumpers.

A print-ready (in PDF format) PCB drawing is at the end of the article. You can also find several options on the official website of the project.

First launch of USBasp programmer

Now that all the parts are soldered, all that remains is to “flash” the Atmegę8 microcontroller of the programmer itself. For this you need a separate programmer, it could be, for example, STK 200 (LPT port), STK500, etc. The LPT programmer is connected to USBasp via the IDC-10 connector.

Please note that the distribution of pins in the connector of the original programmer (USBasp) is on the right, while in the version described in this article it is on the left:

The distribution shown in the figure on the right corresponds to those used by Atmel in its original programmers. This distribution reduces the risk of interference during programming in the case of long wires from the programmer to the controller, since each signal line is shielded with ground, except MOSI.

During programming, enable SELF mode by turning DIP switch No. 3 to the ON position. Thanks to this, it becomes possible to program Atmega8. After programming is completed, the position of the switch (3) must be set to OFF.

The latest firmware version can be downloaded from the official website. We recommend the version for Atmega8, which is in the archive: usbasp.2011-05-28.tar.gz.

Please note that before programming the Atmega8 you need to set the fuses which have the following values:

  • # for Atmega8: HFUSE=0xC9 LFUSE=0xEF
  • # for Atmega48: HFUSE=0xDD LFUSE=0xFF

If programming is successful, connect the programmer to the USB connector of the computer, the red LED should light up, and the computer should notify that new equipment has been detected.

Installing USBasp programmer drivers

The method for installing programmer drivers is described in separate articles, and the drivers themselves are also available there. Below are direct links to these articles:

  • Installing drivers for the USBasp programmer under Windows XP
  • Installing drivers for USBasp programmer Windows 7 x64/x86

Programs for operating the USBasp programmer

The most popular program that supports the USBasp programmer is the console program AVRdude. There are also many derivative programs, the use of which is much more convenient. They are presented in the article Comparison of programs to support the USBasp programmer.

Download firmware, printed circuit board drawing and USBasp programmer driver(downloads: 1,161)

Original article

9zip.ruRadio engineering, electronics and DIY circuits Universal programmer for AVR and PIC microcontrollers

There are many programmer circuits in amateur radio magazines and on the Internet. They differ in the way they connect to the computer: via LPT, COM, USB. Programmers for the LPT port are the simplest, for COM they are a little more complicated. For a programmer connected to a USB port, you need to have either a microcontroller or a specialized microcircuit, a USB-UART converter. In addition, different programmers are designed for flashing different microcontrollers: AVR or PIC, despite the fact that the programming algorithm for these two types of microcontrollers differs slightly. Therefore, the desire naturally suggests itself to assemble a universal programmer for any microcontrollers - AVR and PIC.


The programmer circuit below seemed optimal to us. It connects to the COM port of a computer and contains the well-known MAX232 chip, which works correctly with any COM port (different computers may have different port levels significantly different from the standard), protecting it from accidental installation or connection errors. The programmer has sockets for different microcontroller cases, as well as the ability for in-circuit programming ICSP, when the programmer is connected by wires to the board with the microcontroller or directly to the legs of the microcontroller without installing it in the socket. The programmer is seen by programs as JDM, so there are no problems with the software. We can recommend the IC-PROG 1.06B program.


Switching between AVR and PIC modes is done using a microswitch. The operation of the device is indicated by four LEDs. The programmer is simple and does not require adjustment; very common parts are used.

Instead of the 74LS00 microcircuit, you can install K555LA3 or KR1533LA3; the transistors, in principle, are replaceable with similar ones. This circuit has one oddity - the values ​​of the current-limiting resistors for the LEDs. Since the LEDs are connected to different parts of the circuit, the voltages in these areas are also different, which is why the LEDs glow with different brightness. In order to fix this, you can try to select resistors, in particular, reduce R4 and R7. Instead of KD523, you can use the common 1N4148.

Printed circuit board.lay (for Sprint Layout) The wiring is made for SMD resistors, the rest of the components are in the usual design.

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

Working with IC-PROG

You need to download the program from the official website:

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

The program directory should contain the following files:

icprog.exe - the program itself
icprog.sys - port access driver for XP

You need to right-click on the icprog.exe file and select “properties”. On the “compatibility” tab, you need to check the “run in compatibility mode” checkbox and select Windows 2000.

Next, you need to go to the “Settings” menu and select “Programmer”. The programmer type must be set to JDM and indicate the COM port to which the programmer is physically connected. For very fast computers, you can also set the I/O latency. In the same window, you must specify the “Direct access to ports” interface. All signal parameters must be unchecked.

Then you need to go to the “Settings” menu and select the “Options” item, the “General” tab, where you check the “Enable NT/2000/XP driver” checkbox. A driver installation confirmation window will appear and the program will restart.

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

7 like it? 3

Do you want to read more about DIY circuits? Here's what's trending this week:
Circuits and printed circuit boards of power supplies based on UC3842 and UC3843 chips
Regulated power supply from an ATX computer power supply
The practice of converting computer power supplies into regulated laboratory ones
Kolya approves.

Any questions or comments? Write:

Comments: 1 2345

Is the air conditioner 232 on the second leg correct???

AVR sews similarly.

Look at the datasheet for your MAX232, maybe you need to turn on the capacitors differently. If the LEDs are blinking, then the interface is working. Try to describe everything in detail, maybe we can come up with something. So this is a proven programmer.

Since 2011, a lot of water has passed under the bridge, and it is possible that something changed in the scheme and was forgotten. If possible, then by email: [email protected], send me a working programmer, a diagram and a photo, or something from a signet. It doesn’t want to work and that’s it!

I assembled this device and was shocked, I burned 3 max232 miniatures and there is no sense, it doesn’t read, doesn’t write, doesn’t even erase. The only thing that does well is that the LEDs blink beautifully. The 8-volt Krenka is connected to ground to 5 volts, while working on a 5-volt bus a voltage of 6.7 V appears. The signet is made like the Chinese have for sale. Does anyone have a revised working diagram? It’s a pity that the signet turned out to be so good.

Everything is working! The radio market sold 2 broken atmegas. Thanks for your participation!, also thanks to the author of the article for the proger!

I assembled the device. MAX232CPE chip, I had to resolder C3 and C5. Power is on, RXd and VPP are blinking when reading and writing, it says an error, what’s wrong? Please help!!!

One of two things: either according to the diagram or according to the datasheet. They say there are different revisions of the MAX232, hence the options with this capacitor. I don’t know how true this is, but for some it works this way, for others it works that way.

Good afternoon. This circuit with a printed circuit board was found on the Internet in 2011, the design was successfully repeated.

We make USBasp programmer for AVR microcontrollers ourselves

It works exactly in this version, without modifications, with AVR and PIC.
It is recommended to take stabilizers in powerful cases, because they heat up. The voltage difference between input and output is significant. But they do not require radiators. The diode can be replaced with a 1N4148 or similar.
Only visitors can tell you about the rest.

1. Good afternoon. There are several questions regarding the scheme.

Please tell me, in your programmer circuit, the “reset” output for the AVR should not be pulled up to “+” with a 4.7 - 10 k resistor?
2. Does it make sense to power VCC from a separate 7805 stabilizer and decouple IC1 and IC2 from the power supply?
3. One more question. In the circuits of other programmers, there is a PGM contact on the PIC connector, connected to ground through a 1k resistor. Is he needed?
4. Does it make sense to put a jumper on the VCC bus of the PIC connector in case of repeated reprogramming of the CU controllers or is the VCC power delay done by software?
5. Which housings are better for stabilizers – high-power or low-power? Will they warm up?
6. Is it possible to replace the KD523 diode with KD 521 or KD522?
7. Which program is most convenient to work with?
8. Can programs for this programmer - IC-PROG, PonyProg, WinPic work under Win7-32? What needs to be done for this?

Questions appeared after analyzing a bunch of programmer circuits. These matters are a complete mess. But he’s already pushing. Thank you very much for your attention and answer. I apologize for the large pile of questions. Your site is very convenient.

Why is “ground” 7808 connected to “+” 7805?

Comments: 1 2345

User tags: AVR programmer circuit, do-it-yourself universal programmer [ What is this? ]

Home Radio amateur Miscellaneous

Khazama AVR Programmer in Russian

The Khazama AVR Programmer is quite popular among radio electronics enthusiasts. However, among novice users who are just getting acquainted with 8-bit AVR microcontrollers, there are also those who have little command of English (after all, the program interface is only available in English and there is no Russian translation on the Internet; the program itself was last updated in July 2011 and does not support the ability to install third-party translations).

What should I do?

Alternative to Khazama AVR Programmer in Russian

The easiest way out is to find an alternative solution, that is, a programmer in Russian with the same functionality.

AVR USB PROGRAMMER

This is software like:

1.AVRDUDE_PROG (you can find a version with an interface mainly in Russian);

2.PonyProg (free software, distributed free of charge, you can find a Russified version);

3.Atmel Studio (for Russification you will need to install Visual Studio);

Translation of Khazama AVR Programmer into Russian

If alternative software does not suit you for a number of parameters, you can use Khazama AVR in English, but with Russian tips on the main menus. We will provide hints with translation below.

You can download the utility itself from the official website - http://khazama.com/project/programmer/ (2 versions are available - v1.7 and v1.6.2, the latter supports ATMega88 and ATMega8).

The first menu item “File” looks like this:

Section “AVR” - here you can find supported series of programmable microcontrollers.

The item “Load FLASH file to Buffer” is translated as “Load a Flash firmware file into the buffer.”

Allows you to prepare a file to be flashed and load it into the PC's RAM for quick reading during subsequent writing.

The “Load EEPROM file to Buffer” item is responsible for a similar operation, but for EEPROM type memory.

The “Save FLASH Buffer as...” item allows you to save previously read Flash memory data into a buffer as a separate file on your hard drive (saving is done without any extensions, so if you are working with specific software, you can add an extension yourself, for example, .hex ).

The “Save EEPROM Buffer as...” item is a similar operation, but for data read from EEPROM memory.

Exit - exit.

The second View item (in Russian: “View”, “Review”) has the following submenus.

“View Flash Hex Data” – opens the hexadecimal Flash data editor.

“View EEPROM Hex Data” - opens a hexadecimal EEPROM data editor.

The third section Command (Russian “Teams”) looks like this.

Fuses and Lock Bits... - “Fuses (microcontroller settings flags) and locking bits.”

Opens the window for managing settings and lock bits.

Write Flash Buffer to Chip – write data for Flash memory from a buffer to the microcontroller.

Write EEPROM Buffer to Chip – similar for EEPROM memory.

Read EEPROM to Buffer – similar for EEPROM.

Verify Flash – check Flash (verification).

Verify EEPROM – check the EEPROM.

Erase Chip – erase microcontroller data.
Auto Program – automatic program (the scripts defined in the paragraph below are executed).

Program Options – program options (meaning auto program).

Well, the last item “Help” is intended for checking program updates, checking the software version and going to the official website.

For convenience, some of the listed commands are displayed in icons below the main menu; when hovered, the actions being performed are displayed (see translation above).

Date of publication: November 28, 2017

Readers' opinions
  • Serg / 05/06/2018 — 04:30
    and the stc500 doesn’t see a word for what kind of hardware I have

You can leave your comment, opinion or question on the above material:

PROGRAMMER FOR BEGINNERS

Share to:
Now we will assemble a USB programmer for beginners (beginner radio amateurs), most will say this is a complex circuit, let's start with LPT, but I want to say that the circuit is very simple, and you only need to program it once and don’t worry. Programmer circuit
As you can see from the diagram, there is no quartz resonator - this is a feature of the circuit. I made a not very compact programmer, you can make it smaller if you want, and if you have a double-sided PCB, you can put it in USB, so it will be completely unnoticeable.

The simplest programmer for ATmega8

And now a little photo session. But first the USB wiring: I forgot to say that you don’t need to program RSTDSBL first, but program CKSEL3, CKSEL2, CKSEL1 to connect to the PC; if the computer finds an unknown device, this does not mean anything, the driver must be installed. After that, you can program RSTDSBL, since the number of legs of the microcontroller is limited, by the way, you can use ATtiny45 or ATtiny85, the main thing is that there is 20su in smd or 20pu in deep - for example ATtiny45 20su in the store there was no ATtiny45, but there was ATtiny85 20su. It was programmed in the same way as the ATtiny 45 and the fuses are the same, they differ only in the flech memory. Fuses that need to be programmed are CKSEL3, CKSEL2, CKSEL1, BODLEVEL0 (1.8 V undervoltage detector), RSTDSBL. You can use any connector - there is micro USB and the like, I didn’t try to be clever, but took a USB plug, removed the skin, sawed it, soldered it, and it turned out something that looks like a regular flash drive. We cut with a stationery knife, but be careful not to cut yourself - the blade is very sharp. We take out the plastic with the contacts, also very carefully.
Let's take it and file it so that the soldering iron tip has access to the USB contacts; at the top there is already an etched board for the USB programmer. She was poisoned in hydrogen peroxide + citric acid. He poisons quickly.
Tinned the board. I haven’t gotten around to using the Rose alloy yet, so I puddled it with the tip of a soldering iron, for tinning, I threw a pebble into the rosin solvent, stirred it, the stone dissolved, put it into a syringe (I don’t remember the proportions), covered the board and it’s very convenient to tuddle. We solder our plastic, just do not confuse the contacts when soldering, otherwise the way I will resolder is incorrect in the photo below. Next, we solder the resistors and the MK, I saw an error here and resoldered the USB, the connection cut should be on the same side as the controller.
On the other hand, the zener diodes should be no more than 500 mA.
We solder the cable cable, it is desirable that the cable be shielded, I used a cable from a card reader, took shielded wires - two orange and a screen = foil thrown to ground, photo without the case, you must first check for functionality, the Torus program is connected ATtiny2313A, it was flashed soon, I I flash at a frequency of 250 kHz, and fuses at 2 kHz - it’s more reliable.

I didn’t have anything to make the case out of, I didn’t have any extra flash drives or broken modems... the answer came by itself - a lighter, we release gas if there is any, we spray it, a lighter of this type is initially different, the photo of the lighter is because I already sawed the first one, but forgot to take a photo.
We break out the middle wall, push in our programmer, secure it with hot glue, and before final fastening, adjust the position of the board.
And this is what happened.
Good luck to everyone in the repeated designs, and the avrdude USBtiny programmer, also in the archive you will find drivers, firmware, various printed circuit boards, abbreviated PP, on the boards there is the inscription KALYAN datasheet or abbreviated K.d - this is due to lack of space, on a state of emergency you can be sure of the quality of the printed circuit layout fees, good luck everyone. KALAYN.SUPER.BOS was with you ARCHIVE:Download

Section: [Schemes]
Save the article to:
Leave your comment or question:

Our community is on VK, are you with us? Join us!!!

Thousands of schemes in categories:
-> Other
-> Measuring technology
-> Devices
-> Electrical circuit diagrams
-> Power supplies (other useful designs)
-> Theoretical materials
-> Reference materials
-> Microcontroller devices
-> Chargers (for batteries)
-> Chargers (for cars)
-> Voltage converters (inverters)
-> Everything for the cooler (Fan)
-> Radio microphones, bugs
-> Metal detectors
-> Power regulators
-> Security (Alarm)
-> Lighting control
-> Timers (humidity, pressure)
-> Transceivers and radios
-> Constructions for home
-> Constructions of simple complexity
-> Competition for the best microcontroller design
-> Constructions of medium complexity
-> Stabilizers
-> Low frequency power amplifiers (transistors)
-> Power supplies (switching)
-> High Frequency Power Amplifiers
-> Tools for soldering and board design
-> Thermometers
-> Board. net
-> Measuring instruments (tachometer, voltmeter, etc.)
-> Iron
-> Soldering irons and soldering stations
-> Radio transmitters
-> Assistive devices
-> Television equipment
-> Tone and volume controls
-> Power supplies (laboratory)
-> Low frequency power amplifiers (on chips)
-> Other amplifier devices
-> Lighting design for the New Year tree or party hall
-> Jammers
-> Phone bugs
-> Infrared technology
-> Medical equipment
-> Telephony
-> For the animal world
-> We design amplifiers
-> Antennas and amplifiers for them
-> Calls
-> Electronic toys
-> Low frequency power amplifiers (tube)
-> Motor control (single-phase power supply)
-> Microcontroller programmers
-> Drills
-> Studying microcontrollers
-> Radios
-> Alarms
-> cellular
-> USB devices
-> Power supplies (transformer)
-> Radio stations are easy to make
-> Power supplies (for amplifiers)
-> Other
-> short circuit protection (electronic fuses)
-> Chargers (for radios)
-> Flashing lights
-> Welding equipment
-> Coded electronic locks
-> Power supplies (transformerless)
-> Watch
-> Turn signal control
-> Ignition
-> Water management (pumps for wells or wells, watering plants)
-> Modeling
-> Windshield wiper control units
-> Preamplifiers
-> Overload and overheat protection
-> Speakers
-> Repair of household appliances
-> Remote computer control
-> Acoustic microphones and transducers
-> Satellite TV
-> Gsm antennas, gadgets, amplifiers, repeaters.
-> Tweeters
-> Robots
-> Repeaters
-> Soldering irons and soldering stations
-> Sound alarms
-> Steering wheels and joysticks
-> Electrical circuit diagrams
-> Everything for the "cooler" (Fan)
-> Working with BGA chips
-> Filters
-> Subwoofers

Hi all! In this article I will tell you how to assemble a simple adapter for connecting avr microcontrollers to a programmer. If you have assembled something on a microcontroller, you have probably encountered the problem of connecting the microcircuit to the programmer. I also encountered this problem when I decided to assemble my first device on the MK - the Tracker PI-2 metal detector. The first thing that comes to mind is to simply solder the wires to the controller socket and to the programmer connector. So I did. But as it turned out, not everything is so simple. To flash the microcircuit, it was necessary to solder the quartz with two capacitors and this was not very convenient, but I was too lazy to make a printed circuit board - but in vain. As practice has shown, hanging installation is not very suitable here - it is not very reliable. Therefore, when assembling my second metal detector, I still made a board for connecting microcontrollers to the programmer.

Adapter circuit

Click on the diagram to enlarge

So, we need:

  1. A small piece of textolite - 50 x 80 mm
  2. Sockets for microcircuits
  3. Several capacitors and a resistor (see the diagram for values)
  4. Connector for connecting a programmer

Well, that’s basically it. If you have all this, you can start assembling. First you need to make a printed circuit board. I didn’t do it very carefully, because I wanted to do everything as quickly as possible, and when you’re in a hurry, you know what happens)

When the board is ready, you can begin assembly. I don’t know about you, but I find it convenient when all the parts are at hand and I immediately know where each part goes. To do this, I make a board out of cardboard and stick all the parts there, and then transfer one piece at a time onto the board itself. This is especially convenient when there are a lot of resistors, because measuring them with a soldering iron in your hands is not entirely easy. This is what it looks like:

We tin the board and solder the parts.

Before soldering the sockets, you need to remove the excess leads; I pulled them out using pliers. If you do not use the connector for external power, you do not need to solder the stabilizer and electrolytic capacitors. I didn't solder them. Here is the board itself with soldered parts:

I also made a wire that goes from the programmer to the board.

The programmer I use is

The main thing is not to mix up the wires from the programmer, otherwise you can burn the microcontroller or even the programmer itself. Here's what we ended up with:

The internet says that USBasp- one of the easiest to repeat AVR USB programmers. + requires a minimum of external components, has several ready-made PCB layout options and programming shells, and can also run under Linux and MacOS.

Exactly what is needed! Let's do it)))

Manufacturing process

1. I found a programmer circuit for the Mega8 controller. Requires a minimum of accessible elements

2. Modified the printed circuit board to fit my case. I had to work a little to fit the MK, USB connector and IDC-10 into the case from the splitter into one line. The result exceeded my expectations)

3. Transfer the drawing from the miracle paper to the board. The paths are a little blurry - no problem. Let's fix this with a needle (pin, or something sharp).

4. The etching process is already over. The board is washed and dried.

5. We erase the toner with a solvent - we get ready-made tracks for the future device

7. The result is a compact board, still without elements.

8. We stuff the board with the necessary elements. No LEDs yet and the IDC-10 connector is too long (sticks out from the case)

9. Solder the L-shaped IDC-10 connector. Instead of braiding for tinning (and other tricks), I used ordinary stranded wire. It turned out neatly and quickly)))

10. Solder the SMD components. View from the paths. Everything was done with a 60W soldering iron with a tip 5mm in diameter. You still need to get the hang of this...

11. Not all resistors were converted to SMD. View from the components.
As you can see, the controller - USB - IDC-10 are tightly located... I took the usual quartz, since the height of the case allows it.

12. And here is the case where the programmer will be placed. Very useful thing)

13. The device is successfully integrated into the splitter skin. It came out compact.

14. The size of the fee compared to 5 chopped “coins”

Programming the Mega8 microcontroller

1. Flash the microcontroller using this programmer:
Simple LPT programmer for AVR microcontrollers (5 wires)
We upload the firmware file called “usbasp.atmega8.2007-10-23.hex” from the archive at the end of the article...

We connect an adapter for programming microcontrollers to the programmer.

Data for self-production can be found here...

When USB is connected, the green (red) LED will be constantly lit

Installing the driver for USBasp

1. It was possible to program it in the USBasp programmer itself by connecting a simple programmer to it according to the pinout. If everything is assembled and programmed correctly, the device will be detected when connected to a PC and “ask” to install the driver.

2. To which we will politely answer him by selecting the folder with downloaded and unzipped drivers.

3. The drivers will be installed successfully if the circuit is assembled correctly and the MK is also flashed correctly.

4. In the device manager, the programmer will be detected as: LibUSB-Win32 Device.
We rejoice and test)

Checking the functionality of the programmer

1. I used it as a program avrdude in a shell Sinaprog1.5.5.10.
You can also use the shell attached to the archive USBASP_AVRDUDE_PROG
To check access to Attiny13A, I provide the following step-by-step instructions. The controller has been identified, you can upload the firmware to Attiny13A.

The necessary data to replicate the device is in this archive.