You are on page 1of 13

 

AVRJTAG clone in action


 admin  AVR Microcontrollers, Projects

Building AVR Jtag clone


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

I didn’t change the circuit very much from the 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:

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Privacy Policy

Close and accept


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

Testing AVR Jtag in action


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

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Privacy Policy

Close and accept


On the board, there is a connector for the Jtag adapter/debugger. The second option is to set the JTAGEN
fuse for the target MCU.

Otherwise, AVR Studio will throw an error:

After the hardware is ready, let us try with the sample project. For this, create the AVR-GCC project in the
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 the program and start the debugger with the run command. You can work with JTAG debugger as
with simulator – stepping, auto-stepping, break-points, memory views, changing register and memory values,
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
andTosofind
on.out more, including how to control cookies, see here: Privacy Policy

Close and accept


One difference that the program is running in the real world. So it is easy to debug the 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

   AVR JTAG, DIY AVR JTAGICE.  Bookmark.

 Compressed Thumb instructions of ARM Interesting research on ceramic capacitors 


MCU

 32 Comments:

Jack
January 19, 2007 at 22:02

And how does it work with VCC connected to reset?

Log in to Reply

laszlo
FebruaryThis
Privacy & Cookies: 20, site
2007 at 13:08
uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Privacy Policy

The ATmega16 Vcc,AVCC must be connected to the +5V net.


Close and accept
The AVRISP connector 5 pin(reset), should be connected to the JTAG connector 6pin (nSRST), not to the
ATmega16 RST net.
Log in to Reply

scienceprog
February 20, 2007 at 15:14

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.

Log in to Reply

scienceprog
February 20, 2007 at 15:47

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.

Log in to Reply

laszlo
February 21, 2007 at 10:44

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.

Log in to Reply

Laszlo
April 14, 2007 at 12:13

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.


Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Privacy Policy
Regards, Laszlo

Close and accept


Log in to Reply
loman
April 19, 2007 at 10:59

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

Log in to Reply

Jiri
September 2, 2007 at 18:05

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.

Log in to Reply

Jiri
September 2, 2007 at 23:50

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

Log in to Reply

scienceprog
September 3, 2007 at 10:41

Nice to hear that. Good luck.


Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
ToLog
find in
outtomore,
Replyincluding how to control cookies, see here: Privacy Policy

Close and accept


William
December 24, 2007 at 07:20

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

Log in to Reply

Rami
February 27, 2008 at 01:25

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.

Log in to Reply

Rami
February 27, 2008 at 01:27

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

Log in to Reply

scienceprog
February 27, 2008 at 02:15

Yes it has to be MAX232.


Double check the fuses – it should work.

Log in to Reply

Angel
February 27, 2008 at 04:37

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.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Privacy Policy
Log in to Reply

Close and accept


Angel
February 27, 2008 at 13:14

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

Log in to Reply

Angel
February 27, 2008 at 14:33

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.

Log in to Reply

scienceprog
February 27, 2008 at 13:48

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

Log in to Reply

sandor
April 11, 2008 at 02:02

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?

Log in to Reply

Nedsan
May 27, 2008 at 11:18

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
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
Atmega16. I’ve programmed the bootloader to another Atmega16, which I placed in the Jtag board. I’ve
To find out more, including how to control cookies, see here: Privacy Policy
got power supply wherever I need one. Still no result from my attempts. Can you give me some directions.
Thanks. Close and accept
Log in to Reply

dquang
May 27, 2008 at 13:28

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

Log in to Reply

Slavko
August 13, 2008 at 15:40

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

Log in to Reply

vport
September 29, 2008 at 10:04

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.

Log in to Reply

avrvi
June 1, 2009 at 12:03

AVR JTAG ICE MKII Clone

Log in to Reply

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Privacy Policy
Mansoor
December 27, 2009 at 22:31 Close and accept
No one answer that “Can mega32 be used instead of Mega16”?I also have a lot of meag32 but no
mega16.

Log in to Reply

Machta
March 8, 2010 at 20:18

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

Log in to Reply

Arek
March 27, 2010 at 13:41

Hi, Can I use this programmer for XMEGA?

Log in to Reply

Pingback: JTAG CLONE error

madgrey
September 17, 2010 at 00:13

2 JTAG CLONE error: Test connection VCC to PA2…

Log in to Reply

Dragutin
January 15, 2013 at 14:45

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.

Log in to Reply

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find outadnan
more, including how to control cookies, see here: Privacy Policy
April 7, 2013 at 21:17
Close and accept
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?

Log in to Reply

ScienceProg
April 9, 2013 at 23:14

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.

Log in to Reply

Leave a Reply
You must be logged in to post a comment.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Privacy Policy

Close and accept


Categories

Arduino ARM microcontrollers Artificial intelligence AVR controlled signal generator

AVR Microcontrollers Biomedical electronics Biomedical Engineering Business Casino

Computers Construction Cool Gadgets DIY DSP Lessons Education Electronics

Electronics Software Electronics Tutorial Embedded General Energy Industry Engineering

Explore Finance Free Hobby Electronics Circuits Games Guide Hacks Health

Home Automation Industrial Internet IoT Machine Learning Melanoma Misc

PCB Technology Programming Projects Raspberry Pi Reviews Robotics Science

Security Software STM32 Technology Uncategorized

Recent Comments

Aravinth on Flashing programs to STM32. Embedded Bootloader

nick on Understanding 1-wire interface

Tadas on Using current limiting resistors on AVR I/O pins

Jaime Murillo on AVR DDS signal generator V2.0

Konstantin on Build your own AVR JTAG ICE clone


Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Privacy Policy

Close and accept


Archives
Select Month

Top Posts & Pages

Running LEDs on MSP-EXP430FR5739 FRAM board

Can vs LIN bus interfaces in automotive electronics

Signal power and energy calculation

How does Bluetooth Low Energy (BLE) Work?

Five Reasons to Choose the Right Wealth Management Firms

@ scienceprog.com | Privacy policy

Powered by Tempera & WordPress.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Privacy Policy

Close and accept

You might also like