It is currently 20 Oct 2018 10:11

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: PIC18F45K22 EEPROM
PostPosted: 15 Jan 2018 08:12 
Offline

Joined: 04 May 2012 10:52
Posts: 34
Location: Canada
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?


Attachments:
EEPROM.JPG
EEPROM.JPG [ 160.73 KiB | Viewed 362 times ]
Top
 Profile  
 
 Post subject: Re: PIC18F45K22 EEPROM
PostPosted: 15 Jan 2018 13:34 
Offline
mikroElektronika team
User avatar

Joined: 18 Dec 2017 18:19
Posts: 200
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,

_________________
Strahinja Jacimovic


Top
 Profile  
 
 Post subject: Re: PIC18F45K22 EEPROM
PostPosted: 15 Jan 2018 14:48 
Offline

Joined: 18 Feb 2006 13:17
Posts: 4983
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.
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").

Quote:
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.
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).

Quote:
Press "Write", then "Read" - Data Dump windows is empty (all cells are FF).
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.

_________________
Replacement libraries for mP PRO and PIC18 processors, mP PRO tips & trics


Top
 Profile  
 
 Post subject: Re: PIC18F45K22 EEPROM
PostPosted: 17 Jan 2018 07:26 
Offline

Joined: 04 May 2012 10:52
Posts: 34
Location: Canada
Hi strahinja and Janny,

Thanks for the inputs, I upgraded the MikroProg software and firmware, it seems everything works good now!

Regards,
Vlad


Top
 Profile  
 
 Post subject: Re: PIC18F45K22 EEPROM
PostPosted: 18 Jan 2018 10:28 
Offline
mikroElektronika team
User avatar

Joined: 18 Dec 2017 18:19
Posts: 200
I'm glad that you solved it.

Kind regards,

_________________
Strahinja Jacimovic


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: