Computers and modern gadgets

The Internet says that USBasp is one of the easiest AVR USB programmers to replicate. + 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


6. Next, plumbing and installation work - sawing, drilling, sharpening, tinning (choose the sequence yourself)


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”


16. The final result...


Modified USBasp programmer circuit board: (downloads: 343)
Programming the Mega8 microcontroller
1. Flash the microcontroller using this programmer:

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...

(downloads: 623)


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

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:

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.

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.

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.

If you notice an error, select a piece of text and press Ctrl+Enter
SHARE:
Computers and modern gadgets