mikroProg cant program PIC16F18877 EEPROM

General discussion on mikroProg™ programmer and debugger and mikroProg Suite software as well.
Post Reply
Author
Message
XMAJ
Posts: 13
Joined: 11 Dec 2019 18:32

mikroProg cant program PIC16F18877 EEPROM

#1 Post by XMAJ » 20 Dec 2019 17:48

Hi,
I can't seem to program the EEPROM inside the PIC16F18877 with mikroProg.
It always contains 0xFF in every location even though there is EEPROM data in the hex file I load, it never appears inside the "data dump" window that appears when the data button is pressed. It appears EEPROM data is not being loaded from the hex file properly into mikroProg suite, so never gets programmed into the chip.
Please can somebody check this with PIC16F18877 as it all works perfectly with PIC16F1789 so I don't think I am doing anything wrong here. MikroProg suite is v2.80 and MikroProg firmware is v01.16.12.21 which it tells me is the latest.

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: mikroProg cant program PIC16F18877 EEPROM

#2 Post by stefan.filipovic » 24 Dec 2019 11:49

Hi,

I've just tested it, it works well on my EasyPIC v7.
Could you please try with the project from the attachment?
You will need to Read the memory to be able to see EEPROM memory in the DATA Dump window.

Kind regards,
Attachments
EEPROM.ZIP
(57.4 KiB) Downloaded 81 times
Stefan Filipović

XMAJ
Posts: 13
Joined: 11 Dec 2019 18:32

Re: mikroProg cant program PIC16F18877 EEPROM

#3 Post by XMAJ » 27 Dec 2019 18:09

Hi Stefan, thanks for looking into this. I still can't get it to work. Please see the project. I have added a file called "Eeprom18877data.ihex" to the project as EEPROM data. When I build the project and load the resulting hex file into "mikroProg Suite for PIC" the data that is in the file I added does not appear in the "data dump" window when the "data" button is pressed. It is all just full of 0xFF as before. This is with both check-boxes "Save/Load data" and "Save/Load code" both checked. I have tried it a few times but the data inside my new file never appears, therefore I can't write it to the chip either.
Please can you try it again with my new file and see what happens?
Attachments
Eeprom.zip
(58.19 KiB) Downloaded 74 times

hexreader
Posts: 1786
Joined: 27 Jun 2010 12:07
Location: England

Re: mikroProg cant program PIC16F18877 EEPROM

#4 Post by hexreader » 27 Dec 2019 19:29

The extension .ihex seems to be the problem.

Rename the file with a .hex extension and everything works OK.

Tested on EasyPIC7 - everything runs/loads works OK for me.

EDIT: Ah.... now I think I get it....
Run mikroProg application standalone and loading hex file seems to have no effect on the data window or what can be programmed into the PIC.

Best to work with an erased PIC to see the issue - using a programmed PIC just adds to the confusion.

Will look deeper....
Start every day with a smile...... (get it over with) :)

hexreader
Posts: 1786
Joined: 27 Jun 2010 12:07
Location: England

Re: mikroProg cant program PIC16F18877 EEPROM

#5 Post by hexreader » 27 Dec 2019 19:57

The more things I try, the more confused I get.

A simple erase and blank check seems to give a warning of data memory not blank.

Just cannot work out what is going on :(

I have learnt to save to hex file after making any manual changes. mikroProg seems to work with the selected hex file, not with the data shown in edit windows.
Start every day with a smile...... (get it over with) :)

XMAJ
Posts: 13
Joined: 11 Dec 2019 18:32

Re: mikroProg cant program PIC16F18877 EEPROM

#6 Post by XMAJ » 28 Dec 2019 15:04

Yes quoted below, this is absolutely the problem I am experiencing, but only with PIC16F18877. If you try with PIC16F1789 it all works perfectly. Glad it is not me doing something wrong as I was also getting very confused. It appears to be a bug either in the firmware or the software of microProg. Please can somebody in Mikroe try this and see if a fix is available maybe some kind of software update?

EDIT: Ah.... now I think I get it....
Run mikroProg application standalone and loading hex file seems to have no effect on the data window or what can be programmed into the PIC.

Best to work with an erased PIC to see the issue - using a programmed PIC just adds to the confusion.

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: mikroProg cant program PIC16F18877 EEPROM

#7 Post by stefan.filipovic » 30 Dec 2019 10:22

Hi,

The EEPROM address in the .mlk file is wrong, so it causes the issue with the generated .ihex file.
Please press Ctrl+Alt+M to open up the .mlk file, find there the EEPROM node and replace it with the following, save and restart the compiler:

Code: Select all

<EEPROM>
                <MIN_ADDR>0x0000</MIN_ADDR>
                <MAX_ADDR>0x00FF</MAX_ADDR>
</EEPROM>
After that, the EEPROM Editor should generate the correct .ihex file.
Read more about that here:
viewtopic.php?f=88&t=69725

I apologize for the inconvenience caused by this.

Kind regards,
Stefan Filipović

XMAJ
Posts: 13
Joined: 11 Dec 2019 18:32

Re: mikroProg cant program PIC16F18877 EEPROM

#8 Post by XMAJ » 01 Jan 2020 15:07

Hi Stefan,

Yes this has finally fixed the problem. Many thanks - I would never have found it out alone.
Note that when making the change, the old .ihex file will no longer load at all so you have to key in all the data again, but afterwards it is all working 100%.

Still on the EEPROM editor, I notice a strange effect with the screen handling where the 0x0F hex data column is obscured from view by the <NUL> on the right side. Please see the image for an example of what I mean. If you click around the EEPROM editor the effect goes away, but it is a bit odd. No big deal but it would be nice to get rid of it somehow if at all possible.
Attachments
EEPROM editor.png
EEPROM editor.png (34.37 KiB) Viewed 2146 times

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: mikroProg cant program PIC16F18877 EEPROM

#9 Post by stefan.filipovic » 03 Jan 2020 11:54

Hi,

I haven't managed to reproduce this issue with the Char column.
Could you please tell me how can I reproduce it?

Kind regards,
Stefan Filipović

Post Reply

Return to “mikroProg™ programmer and debugger”