# Problems with AVRJTAG and atmega128

**URL:** <https://community.sparkfun.com/t/problems-with-avrjtag-and-atmega128/156>\
**Category:** MicroMod\
**Tags:** avr-atmel\
**Created:** [July 21, 2004, 2:46pm UTC](https://community.sparkfun.com/t/problems-with-avrjtag-and-atmega128/156 "2004-07-21T14:46:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![meissner.a](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@meissner.a](https://community.sparkfun.com/u/meissner.a)\
**Post date:** [July 21, 2004, 2:46pm UTC](https://community.sparkfun.com/t/problems-with-avrjtag-and-atmega128/156/1 "2004-07-21T14:46:37Z")

</div>

Hi all,

I’m trying to use the AVRJTAG with the atmega128 and AVRStudio.

I’ve updated the AVRJTAG with the AVRStudio as described on the OLIMEX page. Now I load the \*.cof file of my application and choose in AVRStudio the JTAG ICE platform and ATmega128 device.

The application is not running on the device and if I break the execution, AVRStudio will give me the following error messages:

Loaded partfile: D:\Programme\Atmel\AVR Tools\PartDescriptionFiles\ATmega128

Loaded objectfile: D:\Projekte\Atmel\_AVR\Test\_128\test\_128.cof

Error reading memory IO Address:0 Size:64

Error reading memory REGISTERS Address:0 Size:32

Error reading memory SRAM Address:96 Size:160

JTAG ICE Warning: Reading the program counter, an invalid value (0x7FFFFFFF) was received from the device.

Error reading programcounter

Error reading memory IO Address:0 Size:64

Error reading memory REGISTERS Address:0 Size:32

Error reading memory SRAM Address:96 Size:160

I can read the signature and handle the fuses in the JTAG ICE dialog box.

Both fuses - OCDEN and JTAG - are correct (marked).

What I’m doing wrong. Do I need a bootloader already installed in the device?

Any suggestions?

Andreas

---

<div class="post-metadata">

**Author:** ![OLIMEX](https://avatars.discourse-cdn.com/v4/letter/o/50afbb/32.png) [@OLIMEX](https://community.sparkfun.com/u/OLIMEX)\
**Post date:** [July 22, 2004, 3:57pm UTC](https://community.sparkfun.com/t/problems-with-avrjtag-and-atmega128/156/2 "2004-07-22T15:57:17Z")

</div>

what hardware schematic?

what software project?

Tsvetan

---

<div class="post-metadata">

**Author:** ![meissner.a](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@meissner.a](https://community.sparkfun.com/u/meissner.a)\
**Post date:** [July 23, 2004, 7:24am UTC](https://community.sparkfun.com/t/problems-with-avrjtag-and-atmega128/156/3 "2004-07-23T07:24:51Z")

</div>

I have checked my schematic. There was a permanent connection between the /PEN pin an ground (maybe a hair on the mask of the my board). So the atmel was permanent in programming mode and do not execute any code.

Thanks for food for thought :idea:

Andreas
