View previous topic :: View next topic |
Author |
Message |
capella
Joined: 07 Feb 2009 Posts: 38
|
write_eeprom limit problem |
Posted: Sat Jul 03, 2010 2:31 am |
|
|
Hello, I try to write internal eeprom(18f452) as big than 255, but I can't. It means when I try to write eeprom 1020 adc value; I can not. Everytime pic eeprom is saved 255...what is wrong? (I defined adc values as int32). |
|
|
jbmiller
Joined: 07 Oct 2006 Posts: 73 Location: Greensville,Ontario
|
|
Posted: Sat Jul 03, 2010 4:54 am |
|
|
Knowledge is power...please read the PIC datasheets !
EEPROM is designed as BYTES, not Bits, Words, or Long words so you must access that memory area as Bytes (8 bits).
It is a simple task to 'split' the Word or LWord data into Byte sized 'chunks' to store.
There have been several examples here in the past to handle this. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19561
|
|
Posted: Sat Jul 03, 2010 7:20 am |
|
|
and, the code for doing this is supplied with the compiler. Look at the file 'internal_eeprom.c'.
Best Wishes |
|
|
|