TechnologiesElectronics

What is a JTAG programmer?

There are quite a lot of configurations of various programmers that allow you to rewrite the software developments in the microcontroller. They can be different, designed for professionals or, conversely, to have a simplified interface. The hero of this article belongs to the last programmers. You will not only know what it is, but how to make the JTAG programmer by yourself. You will find diagrams and photographs of how the result should look.

What is a JTAG programmer?

It is a simplified version of the professional AVR JTAG ICE, which, as you might guess by its name, is intended for programming microcontrollers of the AVR family. Its main difference is that even an amateur can assemble it, and the final cost will be many times lower than when buying a factory one. In fact, the mechanism presented in the article is a Chinese replica, so this AVR programmer can also be bought. Therefore, without a twisting soul, we can say that there is also a purchase option. But assembly by yourself will avoid possible negative consequences due to cheapness and poor quality of purchased parts in production.

Why choose the JTAG programmer?

The main thing - its low cost and ease of assembly. The JTAG programmer can program all devices that have a JTAG interface. To work through the computer, you need the AVR Studio development environment for the 4th or higher version. With them, this AVR programmer can work.

Disadvantages of the programmer

The latest versions of the microcontroller families, without additional work, are not programmed. There are also significant problems with those representatives who have less than 40 feet and 16 KB of memory. As you can see, the range of potential customers is quite limited. But several popular models just fall under it, so it will come in handy.

The scheme

The scheme of the programmer is simple, for operation it is necessary to have ATMega16 and a little extra electronics. The interface can be used MAX232 (for working with COM) and FT232RL (for working with USB). It is worth mentioning that when using the second option to connect power through USB is not recommended. In such cases, due to an error or oversight, the protective diodes can receive a voltage, and the FT232RL outputs will have a high voltage. This is fraught with failure of either the programmer or the programming object. This nuance is solved by powering the board.

For greater simplicity, those who do not have sufficient qualification, the programmer is designed for MAX232, but for another version it is only necessary to install another connector.

Customize

Given that there are necessary schemes, you should only etch the board. Then everything is neatly connected, soldered to places, and the programmer's work is checked by flashing the loader. Then follow with AVR Studio to update the firmware for the JTAG-programmer to the latest version or as long as necessary. The adapter is connected to the programmer. If it works, then you can go to the next section, which outlines the nuances of work and programming. It should be noted that all the necessary wires are, they are only non-standard located.

As a preparation for work, you should set the Fuse bits. They depend on the notation in which the work is done. For a better understanding, here's the table:

Bit

Direct notation (DataList, UniProf)

Inverted notation (AVR DUDE GUI, PonyProg)

OCDEN

[]

[1]

JTAGEN

[]

[1]

SPIEN

[]

[1]

CKOPT

[1]

[]

EESAVE

[1]

[]

BOOTSZ1

[]

[1]

BOOTSZ0

[]

[1]

BOOTRST

[1]

[]

BODLEVEL

[1]

[]

BODEN

[1]

[]

SUT1

[]

[1]

SUT0

[]

[1]

CKSEL3

[1]

[]

CKSEL2

[1]

[]

CKSEL1

[1]

[]

CKSEL0

[1]

[]

And how to understand which one to choose? The answer to the question is simple: you should connect to the microcontroller and start reading these very bits. Pay attention to SPIEN - if there is a tick in front of it, it means that the notation is inverse. If it's not there, then it's direct. If everything was done correctly, the programmer is ready to flash the microcontrollers. But if he later can not make the firmware - read it and check it again.

Working with the programmer

For greater understanding, an example of LED flashing programming will be given. Initially, you should start the studio and create a new project. Then select the programming language (in this case, the assembler) and specify the name of the project. The program itself can determine that you are using a JTAG programmer. As a platform, you should select it, and in the window next to it - the microcontroller programmed by it. Further everything is pretty common - you just need to drive in the text for the program. In order for the readers to test the working capacity, we suggest testing the JTAG-programmer with the code indicated in the article. You can see that the diodes began to flash very quickly, which is not surprising, because there is no delay. So, the programmer, the instruction for its creation and use is. You can only realize the flight of your imagination.

A little bit about practice. For verification, connect 3 LEDs to port A. Then four interface wires (TCK, TDI, TMS, TDO) and 2 power Vccs go to plus, and GND is connected to the ground. Everything, there is food, you can go further. In the studio, you need to compile the code and run it. The project will be compiled quickly, immediately it will be stitched and will start working. To monitor the execution process, you can press F11, and then you can see on which line of code the program is now. To do this, just bring the cursor to the row, which turns on the LED, and it will light up. There are many more experiments. Remember that in order to do something, you need to work. Let the progress be slow, but eventually you will be able to get exactly what you want, the main thing is not to drop your hands and continue experimenting with an emphasis on the theoretical basis (without it in any way).

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.birmiss.com. Theme powered by WordPress.