View previous topic :: View next topic |
Author |
Message |
Pongo Guest
|
Problem using the PIC18F6620 EEPROM |
Posted: Fri Jul 09, 2004 2:01 pm |
|
|
I've a problem using the PIC18F6620 EEPROM.
Up to now I used the PIC16 family with only 256 byte of EEPROM memory without problems. But the PIC18 family has up to 1Kbyte of EEPROM, and I don't understand how to drive this portion of memory.
The write_eeprom() and the read_eeprom() functions are able to drive only 256 byte. But, even if I use them, I'm not able to read or write a single byte.
Thanks |
|
|
Guest
|
|
Posted: Sat Jul 10, 2004 3:32 am |
|
|
The updated doc says that the address is 16 bit wide for these PICs so you are able to make something like this:
Write_eeprom(0x0145,0x12);
c = Read_eeprom(0x0145);
If you aren't able to write EEPROM then check your fuse settings. |
|
|
Steve Guest
|
1K EEPROM |
Posted: Mon Jul 30, 2007 3:44 am |
|
|
I'm confused.
The doc with my compiler (version 3.206) only mentions an 8 bit address for read_eeprom and write_eeprom, but the compiler does support the 18F6680 which has 1K of EEPROM.
So my question is, does my compiler support 16 bit address for read_eeprom and write_eeprom? |
|
|
Ttelmah Guest
|
|
Posted: Mon Jul 30, 2007 4:22 am |
|
|
The current versions say:
"address is an (8 bit or 16 bit depending on the part) int"
These correctly handle addresses beyond 255.
I'm afraid 3.206, is very old, and though chip support was added, I don't think the allowed range was implemented in these parts.
The only ways to find out, would be:
1) Ask CCS.
2) Write something to byte 512, using a long integer address, and see where the code puts it.
Best Wishes |
|
|
SteveL
Joined: 30 Jul 2007 Posts: 1
|
|
Posted: Mon Jul 30, 2007 4:36 am |
|
|
Sounds like I need an upgrade ... I was starting to think that anyway.
Thanks. |
|
|
|