At 12:36 PM 4/01/2007, you wrote:
> So wy is this code not actually reading the EEPROM data?
1st thing you need to up/download memory (from debug) to have the EEP
file put into eeprom space.
Then the first time around you are filling r16 with 0 and then
decrementing it which points to 0xff. Last EEPROM address is 0x7f
or 128 bytes :)
This is my EEP reading routine, try to find out why yours doesn't
work :)
;Get 1 byte pointed by Z. Data returned in temp
get_ieep_byte:
out EEARL,zl ;Sets up address in EEP
sbi EECR,EERE
in temp,EEDR ;Get data
ret
EEARH also is not used as it is only needed when EEP>256 bytes.
Once I made some small changes to your code I could see the EEP
data into r0.
Regards
John Samperi
********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495 Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************Message
Re: [AVR-Chat] *sigh*
2007-01-04 by John Samperi
Attachments
- No local attachments were found for this message.