PDA

View Full Version : EEPROM/DATA problem with 18F2523



JohnM
- 16th March 2008, 09:53
I'm using PBP 2.50A, MCS V3.0.0.5 and MPASM V5.14 and an 18F2523.

Every time use DATA or EEPROM to write to a byte in an odd position (1,3,5, etc.), the next byte gets overwritten with $00. For example:

EEPROM 1,[$01] results in...
Address $01 = $01
Address $02 = $00

If I use EEPROM 2,[$01] then all is OK...
Address $02 = $01
Address $03 = (unchanged)

I've read the other threads regarding the 18F fixes. But as far as I can tell, the 18F2523 still has a problem. Has anyone else seen this one or, even better, have a workaround? I've tried everything I can think of.

Thanks!

Acetronics2
- 16th March 2008, 10:15
Hi,

That's quite normal ...

see here :

http://www.picbasic.co.uk/forum/showthread.php?t=6896&highlight=18F452+EEPROM

Alain

JohnM
- 16th March 2008, 10:31
Thanks for that link Alain! I missed that thread.

I was so sure that EEPROM only wrote a single byte at a time because of the "Only the least significant byte of numeric values are stored" line from the PBP manual. I never thought that PBP and the PIC itself would do things differently. Silly me. :)

Time to hit the PIC18F reference manual to get all of the gory details...ugh.

Thanks again,
John