ICE 200 and EEPROM

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a problem reading EEPROM contents using the AVR Studio Emulator and the ICE200. I have tried two different ICE units, and the problem persists in both. The problem is NOT reproduced using the simulator.

Source code:

-----
.include "4433def.inc";
.def temp =r16
.def e_adr =r26

.cseg
.org 0
rjmp reset
reset:
ldi temp, RAMEND
out sp, temp
sei

main:
ldi e_adr, 0x05
out EEAR, e_adr
sbi EECR, EERE
nop
nop
in temp, EEDR
rjmp main

----------
Upon the sbi command, the correct contents of the eeprom address 0x05 are in the EEDR. ANY instruction following the sbi causes the EEDR register to be corrupted with random data (ie: data that is not anywhere within the eeprom contents).

I have tried changing power supplies, etc. The ICE is connected to the STK200 development board. I am using AVR Studio 3.22 (the same happens in AVR studio 2.0)

Regards,

Paul Korzycki