View previous topic :: View next topic |
Author |
Message |
Delfy_Coltech
Joined: 25 Nov 2009 Posts: 27 Location: Vietnam
|
Help with write EEPROM PIC18F |
Posted: Wed Jul 25, 2012 6:19 am |
|
|
Dear all,
I am using CCS version 4.017 with PIC18F4620 (1Kbytes of EEPROM).
I try to store my data (array of 16-bit unsigned numbers) to EEPROM.
I declerate 0xA0 for START_ADDRESS
but I only can write data to 0xFF
From, 0x100, I can not write data.
When the pointer encrease to 0x100, it automatically return 0x00
Has anyone have this troubble?
Thanks! _________________ -------------------------------------------------
Mechatronics Department, Coltech, VNUH
Hanoi, Vietnam.
------------------------------------------------- |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Wed Jul 25, 2012 7:19 am |
|
|
I'd say 'compiler fault'.
4.017, was an early 'beta' release of V4. The earliest working releases are around 4.07x. At this point, even quite basic features didn't work.
Best Wishes |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
Re: Help with write EEPROM PIC18F |
Posted: Wed Jul 25, 2012 8:22 am |
|
|
Delfy_Coltech wrote: | Dear all,
I am using CCS version 4.017 with PIC18F4620 (1Kbytes of EEPROM).
I try to store my data (array of 16-bit unsigned numbers) to EEPROM.
I declerate 0xA0 for START_ADDRESS
but I only can write data to 0xFF
From, 0x100, I can not write data.
When the pointer encrease to 0x100, it automatically return 0x00
|
Are you by chance using an 8bit value as the pointer or a 16bit value?
You don't show us your code (per http://www.ccsinfo.com/forum/viewtopic.php?t=47549) so we can't tell by reading your mind...
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Wed Jul 25, 2012 8:30 am |
|
|
Very possible, but on 4.017, I'd not even bother to look - too many other problems waiting.....
Best Wishes |
|
|
Delfy_Coltech
Joined: 25 Nov 2009 Posts: 27 Location: Vietnam
|
Write EEPROM |
Posted: Wed Jul 25, 2012 7:52 pm |
|
|
Hi hi hi!
Thanks for your response! Mr. Ttelmah and Mr. bkamen.
My data is BYTE type. (8bit)
But with dsPIC, it has no problem! _________________ -------------------------------------------------
Mechatronics Department, Coltech, VNUH
Hanoi, Vietnam.
------------------------------------------------- |
|
|
|