AVRJTAG clone in action

Building AVR Jtag clone

Finally I found some time to finish AVRJTAG clone. It was hanging for a while on a breadboard with bunch of wires. I have made an Eagle CAD project with PCB layout you will find at the bottom of article.



I didn’t change the circuit very much from previous, just added ISP header(but didn’t have a chance to test it) and transferred to Eagle project as I didn’t find one ready to build:



Description on how to update firmware is in previous article <Build your own AVR JTAG ICE clone>.

Testing AVR Jtag in action

Let’s give a test run. Using Jtag is easy as using AVR Studio simulator. Difference is only that you have to connect JTAG adapter to target board. Im my case I am using Atmega128L Piconomic board.


In the board there is a connector for Jtag adapter/debugger. Second option is to set JTAGEN fuse for target MCU.


Otherwise AVR Studio will throw an error:


After hardware is ready lets try with sample project. For this create AVR-GCC project in AVRStudio environment. Then select debugger platform (JTAG ICE) and AVR MCU(in my case Atmega128):


Write a simple program which controls a button and LED: button_led.c

Compile program and start debugger with run command. You can work with JTAG debugger as with simulator – stepping, auto-stepping, break-points, memory views, changing register and memory values and so on.


One difference that program is running in real world. So it is easy to debug platform with additional peripherals connected to MCU. And of course real time execution.

Project files for Eagle CAD and boot-loader are here: avr_jtag_clone.zip

Good luck.





  1. And how does it work with VCC connected to reset?

  2. The ATmega16 Vcc,AVCC must be connected to the +5V net.
    The AVRISP connector 5 pin(reset), should be connected to the JTAG connector 6pin (nSRST), not to the ATmega16 RST net.

  3. AVR ISP connector 5 pin is OK I think as ISP head is only used to upload bootloader to adapter itself via ISP interface. It has nothing to do with JTAG. But VCC and AVCC circuit in picture is connected improperly. I will look at my original circuit if there is same problem, because my adapter works OK. Thanks Laszlo for notice.

  4. Yep same error in my board. Can anyone tell my why it works for me with VCC connected to Reset pin? I have fixed circuit and pcb files. Thank you for your notice.

  5. probably ot works because the output pins have some diodes for protection, and draws the power from your target board.

    I have a AVRJTAGICE mkII and that has this feature, you just connect a small adapter to the JTAG connector,and select ISP mode.
    I tought that the JTAGICE has this feature to.

  6. Hy,

    I’ve build this JTAG loaded the bootloader, when I try to upgrade the ATmega163 is selected, and I get a verification error to, and offcourse I can’t connect to the JTAG adapter trough AVRStudio.

    Please explain this errors, and give some answer.

    Regards, Laszlo

  7. I build the PCB and load the bootloader and the upgrade files into mega16 by following your instructions. Fuse was programed the same as you describled.

    but when I try to connect it to another Mega16(jtag enabled) to test. it comes with a error message:”cannot connect JTAG ICE from port x” (all available ports were tested)

    The wire connection is good, and the target mega16 jtag connection is good, I dont understand why it didn’t work.

    please help me!!!!

  8. Hi,
    I made this JTAG ICE and everything seem to be fine, but when I build mentioned “button_led.c” and start debugging, program pointer appears out of program range (see screenshots http://www.imagecross.com/myspace-image-hosting-viewer-d.php?id=3145Screenshot-0.gif , http://www.imagecross.com/myspace-image-hosting-viewer-d.php?id=5241Screenshot-1.gif and http://www.imagecross.com/myspace-image-hosting-viewer-d.php?id=8699Screenshot-2.gif ).
    Any idea what is wrong? After two days of testing I had no solution. Realy appreciate any hint. Thanks.

  9. Problem found! 🙂 I made mistake with connecting external crystal and setting FUSE to external CLOCK. After changing FUSEs all working great. Sorry 🙂

  10. Nice to hear that. Good luck.

  11. Hi :), juz wondering whether this AVRJTAG works with ATMega1280/1281/2560/2561? Has anyone try to use this JTAG for these chips?

  12. I’ve build this JTAG loaded the bootloader, when I try to upgrade the ATmega163 is selected, and I get a verification error to, and offcourse I can’t connect to the JTAG adapter trough AVRStudio.

    Please explain this errors, and give some answer.

  13. please tell me could I use Max232 intant of Max3232,because I havn’t found it .

  14. Yes it has to be MAX232.
    Double check the fuses – it should work.

  15. I built the JTAG, downloaded the bootice16_rom into the mega16, set the fuses as described in the page, but when i try to upgrade the soft i get that the device is an mega163 and an error about no able to erase the device at the end of the progress bar. I am using an mega16 but the 8 mhz maxium version. I sounds like the same described in a previous post.

  16. Upgrade error:
    The complete text of the error is: Adress: 0x0000, expected 0x940c, Received: 0xffff

  17. Maybe you used a bootloader for mega16 instead of mega163? Hard to say right now where is a problem.

  18. Another diagnosis, it is so strange because i can read flash and eeprom using de avrprog of the avrstudio via the serial port. In the other hand, i downloaded the bootloader containded into avr_jtag_clone.zip. So besides the error of the incorrect micro version, could be that there is a problem with the programming voltages. The Pcb is the attached in the quoted file. I will keep trying another possibilites.

  19. I get the “No supported board found, AVR Prog version 1.40″ message” when selecting AVRProg.
    i havent got any pony prog hw, but then a jtagice mkII.
    i have to make a cheap programmer for atmega128L.
    could anyone show some picture about conf. and sec. bits window as the avr studio shows it?

  20. Hi. I’ve made this JTAGice but I get “Not supported board found. AVRprog version 1.40”. I get this massage even when no board is connected to my PC. I’ve made my own target board with a new Atmega16. I’ve programmed the bootloader to another Atmega16, which I placed in the Jtag board. I’ve got power supply wherever I need one. Still no result from my attempts. Can you give me some directions. Thanks.

  21. I tried this JTAG, it’s create. And I also edited this JTAG into the USB version because my laptop do not has the COM port.
    It really useful to remove bugs in your source code.
    But the among of support chip is small, only 8 chips in AVR 4.07 and 9 chips in AVR 4.14.
    Anyway, thanks for your job scienceprog!
    I am starting to build other type od JTAG which can support more AVR chip.

    Luong Vu Dang Quang

  22. Hi, is this AVRJTAG works with ATMega48/88/168, has anyone try to use it for these microcontroller?

  23. same error as angle
    I’ve build this JTAG loaded the bootloader, when I try to upgrade the ATmega163 is selected, and I get a verification error to, and offcourse I can’t connect to the JTAG adapter trough AVRStudio.

    Please explain this errors, and give some answer.


  25. No one answer that “Can mega32 be used instead of Mega16”?I also have a lot of meag32 but no mega16.

  26. You can use it,but you have to recompile boot loader for your controller with good frequency.:)

  27. Hi, Can I use this programmer for XMEGA?

  28. Pingback: JTAG CLONE error

  29. 2 JTAG CLONE error: Test connection VCC to PA2…

  30. If You have any problems with AVR JtagICE clone, built as above, check on site http://aquaticus.info/jtag (few pages).There is proper fuse setting (not as look on Ponyprog), and hex file with complete program which dont need update (identical with update from last versiom of AVR Studio 4). (Update go well, and verify also) Only difference is that pin 21 is connected over 1k to jumper (normal – bootloader), but if You program BOOTRST fuse to “1” (inactive), works also without jumper.

  31. hi,
    I made my jtag ice from this website several years ago.
    Now i want to build it again.
    In the old version there was a resistor attached to pin 38 of atmega 16. is there any change?

    can i use old jtag to burn boot loader in the new one?

  32. Haven’t used this clone for long time. Iguess ti should work same. And yes tou should be able to program new adapter with old one. Anyway you will need another programmer to set fuses on target.

Leave a Reply

Your email address will not be published. Required fields are marked *