View previous topic :: View next topic |
Author |
Message |
randy.shaffer
Joined: 21 Mar 2018 Posts: 51
|
Unable to view EEPROM data in CCSLOAD with 16F18323 |
Posted: Fri Feb 16, 2024 5:17 pm |
|
|
Compiler is v5.116, programmer is ICD-U64. After the program executes, I was expecting to see the stored values in the Data Storage table in CCSLOAD but the table appears blank.
Is the base address incorrect? The data sheet says the EEPROM starts at 0x7000. In the IDE, under Tools\Device Editor\Memory it states Data EE Start as 0000F000. I've tried changing the base address with no results.
MCLR has a 10k pull-up, MCU is powered by the programmer (+5V).
Code: |
#include <16F18323.h>
#include <stdint.h>
#fuses NOWDT, PUT, BROWNOUT
#use delay(internal = 32MHZ)
void main(void)
{
uint8_t BASE_ADDRESS = 0x00;
write_eeprom(BASE_ADDRESS, 0xA);
write_eeprom(BASE_ADDRESS + 1, 0xB);
write_eeprom(BASE_ADDRESS + 2, 0xC);
while(TRUE);
} |
Last edited by randy.shaffer on Sat Feb 17, 2024 8:33 am; edited 3 times in total |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Fri Feb 16, 2024 5:40 pm |
|
|
hmm... when you recompiled and reprogrammed the PIC, did you(the programmer IDE or whatever...) erase the ENTIRE PIC before programming ?
There's an option to NOT erase 'sections' of PICs memories.....
I know with Pic Start+ you can select what to erase..... |
|
|
randy.shaffer
Joined: 21 Mar 2018 Posts: 51
|
|
Posted: Fri Feb 16, 2024 5:43 pm |
|
|
Disregard, I was expecting to see the EEPROM values after re-programming and realized that is not correct, sorry for the trouble. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Fri Feb 16, 2024 9:23 pm |
|
|
Actually you can store(program) sections of EEPROM with data and see them after reprogramming the PIC ,even with a new program.
The 'trick' is you have to set the programmer to NOT erase those sections of memory. |
|
|
randy.shaffer
Joined: 21 Mar 2018 Posts: 51
|
|
Posted: Sat Feb 17, 2024 8:31 am |
|
|
Thank you, temtronic. I was hoping to view the stored values in CCSLOAD. I've modified the original code. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19495
|
|
Posted: Sun Feb 18, 2024 8:26 am |
|
|
If you read the chip, and select the 'file' page in CCSload then the page
here for 'data storage', this will show the EEPROM. |
|
|
randy.shaffer
Joined: 21 Mar 2018 Posts: 51
|
|
Posted: Sun Feb 18, 2024 9:47 am |
|
|
I was missing the read operation! Thank you so much! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19495
|
|
Posted: Sun Feb 18, 2024 12:15 pm |
|
|
|
|
|
|