Hi all,
Can anyone clarify how to write data to the PIC18F45K22 EEPROM? I created *.ihex dump file, added to my project, selected EEPROM library in the Library Manager.
Press Build and Program. The MikroProg Suite GUI appears. Press "Data" knobe" - Data Dump windows is empty (all cells are FF).
Press "Reload Hex". Data Dump window is filled with data from *.ihex file.
Press "Write", then "Read" - Data Dump windows is empty (all cells are FF).
What am I doing wrong? Is there any project setting missing?
PIC18F45K22 EEPROM
PIC18F45K22 EEPROM
- Attachments
-
- EEPROM.JPG (160.73 KiB) Viewed 2633 times
- strahinja.jacimovic
- mikroElektronika team
- Posts: 200
- Joined: 18 Dec 2017 18:19
Re: PIC18F45K22 EEPROM
Hi,
When you use the .hex file, it writes code to your MCU.
Now if your code didn't include any EEPROM writing, then of course it won't write to the memory.
Here is how you write to EEPROM: viewtopic.php?f=88&t=71526
Also, there is a protection that could be preventing you from writing to it.
Make sure to de-select Code Protect for Data EEPROM.
Kind regards,
When you use the .hex file, it writes code to your MCU.
Now if your code didn't include any EEPROM writing, then of course it won't write to the memory.
Here is how you write to EEPROM: viewtopic.php?f=88&t=71526
Also, there is a protection that could be preventing you from writing to it.
Make sure to de-select Code Protect for Data EEPROM.
Kind regards,
Strahinja Jacimovic
Re: PIC18F45K22 EEPROM
I assume that you created the ihex file with help of EEPROM Editor. If you answered Yes to the question "Use this EEPROM definition in project?" then the ihex file is included in project's hex file (and visible in Project Manager in "EEPROM files").VladimirG wrote:Can anyone clarify how to write data to the PIC18F45K22 EEPROM? I created *.ihex dump file, added to my project, selected EEPROM library in the Library Manager.
That would obviously be a quirk of mikroProg Suite if one had to reload hex file to see its contents though I don't see such behaviour for PIC18F45K22-based project (v. 2.51 of mikroProg Suite).Press Build and Program. The MikroProg Suite GUI appears. Press "Data" knobe" - Data Dump windows is empty (all cells are FF).
Press "Reload Hex". Data Dump window is filled with data from *.ihex file.
Make sure that you have "Load/Save DATA" checked in mikroProg Suite and that in "Options" in "Advanced Options" group "Preserve DATA" checkbox is unchecked. As Strahinja suggested, "Data EEPROM Code Protection" needs to be disabled in Project Manager.Press "Write", then "Read" - Data Dump windows is empty (all cells are FF).
Re: PIC18F45K22 EEPROM
Hi strahinja and Janny,
Thanks for the inputs, I upgraded the MikroProg software and firmware, it seems everything works good now!
Regards,
Vlad
Thanks for the inputs, I upgraded the MikroProg software and firmware, it seems everything works good now!
Regards,
Vlad
- strahinja.jacimovic
- mikroElektronika team
- Posts: 200
- Joined: 18 Dec 2017 18:19