In order for AVR-type microcontrollers to work without errors, they have to regularly update the firmware. This is done by programmers that have a connector and output to a PC. A microcircuit and a chip are connected to the connector, acting as a signal converter from a computer.
Such devices can be bought at flea markets or in specialized stores. But if you have the necessary parts and skills, a simple STK500 programmer can be assembled with your own hands.
Possessing a wide range of products, ATMEL products can serve many purposes, especially if you choose the technical properties of the future controller correctly. For flashing any chip, it is important that the programmer be able to correctly read its contents before uploading a new firmware, which means that they must be fully compatible. Typical chip family have the following parameters:
- the amount of flash memory – from 4 to 32 kilobytes;
- RAM – from 512 bytes to 2 kilobytes;
- the size of the firmware in the EEPROM module is from 256 to 1024 bytes;
- supply voltage – from 1.8 to 5.5 volts.
In addition, there are various options for IC cases on the market, which differ in the way they fit, the number of legs, and the geometric shape.
Any microcircuit can be soldered to the board in two different ways:
- end-to-end, when the legs are sealed on the reverse side;
- planar – with legs-conclusions located on the same platform as the body.
Different devices are used to work with such parts. In the first case, a soldering iron is enough, and in the second, you will have to add a thermo-air dryer.
The number and purpose of the legs of the chip due to its purpose. It is extremely important to arrange all the tracks correctly and in accordance with the scheme on the board prepared for its installation, since improper grounding or power supply can damage the entire structure after the first power up.
The geometric shape is the latest factor in the selection of the part; it is selected when the tracks are divorced, etched and ready for installation.
The conditions in which such a microcircuit can work are quite diverse, which benefits its multitasking. Temperatures at which it is guaranteed to function, lie in the interval from 55 degrees of frost to 125 heat.
You can store it with a wider range. The crystal chip is heat resistant, therefore, in a properly assembled board, it will not overheat above the passport data.
If you liked the video – share with friends:
For the STK500, the scheme is quite simple and does not include difficult-to-assemble parts. Assembly operation is carried out in several stages.
Each requires working tools and various parts.
You can assemble according to the finished scheme, but with special knowledge, absolutely free modification of any configuration is allowed. For example, if an amateur is not satisfied with the proposed connector for connecting to a PC, it is allowed to replace it with a similar one with similar conclusions. There may be several options:
- MicroUSB is the most compact output, but it needs an adapter for a full USB. Can be used on small programmers.
- USB Type-A – a normal connector, can immediately connect to the corresponding port in the PC. It is suitable for people who try to eliminate the influence of the length of the wire as much as possible when working with the programmer.
- USB Type-B also requires a wire, but it does not have such a tendency to breakage as a result of bending. The necessary cable can be found in any modern printer. It is very sensitive to length, with its large value it may simply not do its job.
As USB Type-C spread, such connectors appeared, but they should be used at your own risk.
The main advantage of such devices is the absence of the need to guess the correct position of the plug to be plugged in – it is inserted independently of this due to symmetry.
To assemble the STK500 programmer yourself, you will need:
- Board with etched tracks, varnished and tinned.
- The ATMEL mega8 chip is the heart of the device.
- Microcircuit CP2102 – signal converter. Used to provide USB communication.
- Binding according to datasheet.
All elements are soldered with lead-free solder to withstand different working conditions. It does not crack and does not form grooves, which, after several years of operation, can lead to sudden “glitches” or malfunctions that are inexplicable from the technical side.
Besides, Lead-free oxidation resistant, therefore, it is able to provide conductivity much longer.
Chips are installed according to the key, but if the board has no indication of which leg it should respond, it is better to ring them and identify those that are responsible for grounding. ATMEL has a mega8 of such legs on one side of the whole 5, which will help in orientation.
CP2102 in some cases is a planar chip, which can not put everyone. First, you need to recoup it, since simple lead points are used as contacts, and only then set, heating the entire area with a hairdryer.
If you liked the video – share with friends:
Important in any programmer is the interface with which it will communicate with the device being flashed. Experience shows that the 10 or 6 pin ISP connector will be optimal in this case.
It is inexpensive, versatile and well documented.
The user does not have to search for a long pinout, which simplifies its maintenance.
There are several types of loops that serve as adapters between devices. In addition, there are whole boards that are connected to various ISPs that provide good modularity.
They are used to unpack various ports that are used to connect Ethernet cables in order to later flash JTAG connectors or other functional devices over the network. There are MOLEX adapters that can supply additional power for self-service (12 volts).
Quartz must be selected strictly according to the frequency of the main microcontroller. This indicator can be viewed in datasheet. If it is not there, then it can be measured with an oscilloscope.
To do this, you will have to apply working power to the microcircuit and fix the probes – one near the terminals, the other – on any leg that is responsible for the “ground”. The standard output frequency should be close to 1 MHz.
This is the most common option, which is the easiest to pick up quartz.
After the process of sealing parts is completed, it is time to proceed with the initial device initialization. To do this, insert it into the computer and wait for the definition of the operating system.
After a while, a message appears stating that a new device has been detected. Depending on whether it was determined immediately, there are two options:
- start of work, if yes;
- search with driver installation, if not.
To find the software for this programmer, just enter its name in the search engine and use the available options from users. The installation procedure is as follows:
- Download the archive with the driver. Unpack it.
- Run the executable file from the created folder.
- Wait until the installation is complete.
After that, you may need to restart. If the restart of the OS in the device manager is still an unknown device, and not a fully defined programmer, then you should perform a few additional steps. First you need to disable the digital driver check:
- To reboot the PC, press the F8 button when turning it on again.
- From the proposed options, select “Disable driver signature verification in the system.”
- Boot into the OS and install software through the device manager.
To do this, on an undecided programmer, right-click and select “Update driver”. Then you should click “Run search on this computer”, specify the folder with the driver through “Explorer” and click “Next”.
After that, you must wait for the installation to complete.
Without specialized software, it will not be possible to flash the chips with this device, and therefore it is recommended to use one of several utilities that are popular among enthusiasts. One of them is AVR Studio (its modern equivalent is Atmel Studio).
For it, in automatic mode, the plugin is pulled up to interact with the STK500, so no additional initialization actions are required.
- There is a firmware behavior simulator that is able to eliminate all possible problems at the preliminary planning stage.
- There are several compilers to improve compatibility between software written in different languages.
- Command line mode for debugging and entering commands manually.
- Native support for a large number of plugins that simplify some actions.
In earlier versions of the program, an assembler was present that offered the possibility of source code byte-by-byte analysis, but the developers decided that it was superfluous because it made the package so constantly growing in size. If necessary, it can be obtained from older versions.
Another useful utility is ChipBlasterAVR Chip Programmer. She is very versatile, supports many types of controllers and flexible configuration of the parameters of the firmware process. It can assign batch uploading of software to several chips in turn, without the need to configure the whole process all over again.
The frequency of quartz is also selected, which can be set both accurately and within two values.
If you liked the video – share with friends: