• AVR Freaks

Helpful ReplyHot!Issue with programing PIC18F67K22 past memory location 14000

Author
markdem
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2011/05/21 18:34:17
  • Location: 0
  • Status: offline
2020/10/01 05:51:21 (permalink)
0

Issue with programing PIC18F67K22 past memory location 14000

I am having some issues programing a PIC18F67K22 using a PICKIT3.
Programing will work fine until the program grows and passes memory location 14000, at witch point I will get the following error.
"Address: 14001 Expected Value: b3 Received Value: 0"
Removing a function from the program (can be any function) until the program is smaller the 14000 and it will program fine.
I have tried;
1. MPLABX 5.20, 5.35 and 3.40.
2. PIC at 3.3v and 5V, both from external power and from the PICKIT.
3. 2 Different PICs (Both PIC18F67K22).
Only thing I cant test is a different PICKIT as I only have one..
 
I am guessing hardware is ok as it will program fine when the program is small.
Nothing else is currently connected to the board.
 
Is there anything I can try to get around this? What is so special about memory location 14000 anyway. i cant see anything in the datasheet that matches up to this boundary.
 
Thanks 
#1
Anobium
Senior Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/01 11:54:24 (permalink)
5 (1)
If you want to.  Your choice.
 
I can try your errant HEX with PICKitPlus and a PICKit3 programmer here.  I just need the hex.
 
This is not a plug but a true offer of help.  The root cause could be identified by this offer.
#2
Anobium
Senior Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/01 12:40:45 (permalink)
0
I just tried a HEX hex.  Stats are Program Memory: 63908/65536 words (97.52%)   RAM: 24/3862 bytes (0.62%)   OSC: INTIO2, 64Mhz (Internal oscillator)   Chip: 18F67K22 The PROGMEM is therefore from 0x0000 to x0x1F2AC contiguous in memory. 
 
So, what is your CONFIG? Do you have a write protect set? 
#3
1and0
Access is Denied
  • Total Posts : 11324
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/01 13:19:23 (permalink)
4 (1)
Anobium
I just tried a HEX hex.  Stats are Program Memory: 63908/65536 words (97.52%)   RAM: 24/3862 bytes (0.62%)   OSC: INTIO2, 64Mhz (Internal oscillator)   Chip: 18F67K22 The PROGMEM is therefore from 0x0000 to x0x1F2AC contiguous in memory. 
 
So, what is your CONFIG? Do you have a write protect set? 

Programming typically involves erasing (including the protection bits), programming, verifying, and then activating the protection bits.
 
@OP: Daniel in this link seems to have the same issue as you:  https://www.microchip.com/forums/m1130750.aspx
 
#4
markdem
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2011/05/21 18:34:17
  • Location: 0
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/01 15:26:36 (permalink) ☄ Helpfulby Anobium 2020/10/01 22:15:09
0
Hi Anobium,
 
I will take you up on the offer. HEX can be found here - https://1drv.ms/u/s!AjN1dYoUGyAvh64iclNqhBXwExUh9Q?e=oFtMKb
 
Thanks
 
#5
markdem
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2011/05/21 18:34:17
  • Location: 0
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/01 15:35:00 (permalink)
0
Thanks 1and0.
I had a look at the post but there is not really much helpful information there, just banter about PICKIT3 not supporting new pics. The 18F67K22 is not new and I cant see why support would be dropped.
 
 
#6
ric
Super Member
  • Total Posts : 28660
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/01 16:32:39 (permalink)
0
markdem
Thanks 1and0.
I had a look at the post but there is not really much helpful information there, just banter about PICKIT3 not supporting new pics. The 18F67K22 is not new and I cant see why support would be dropped.

Did you read post#4 and post#6 in that thread?
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#7
NorthGuy
Super Member
  • Total Posts : 6349
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/01 17:19:33 (permalink)
0
This is most likely a bug in the tools or in PICkit3. Most likely something introduced lately. 3 years ago, I used PIC18F67K22 for testing programming speed, and PICkit3 could program the full chip (but not EEPROM) without problems in 34 sec.
 
I would suggest contacting Microchip support - perhaps they can fix it.
 
If nothing else helps, you can buy one of our NSDSP programmers. It is not integrated with MPLAB X, but it can program your HEX file without problems:
 
NSPROG 141 (C) 2015-2020 Northern Software Inc. All Rights Reserved.
The HEX file contains the following blocks:
   0x00000000-0x00000006: 6 bytes
   0x00000008-0x0000fffe: 65526 bytes
   0x00010000-0x00014674: 18036 bytes
   0x00300000-0x0030000e: 14 bytes
Target device is PIC18F67K22.
Connected to NSDSP100000000 Version 0103.
Ranges to be programmed:
   code   0x00000000-0x00014680: 653 rows
   config 0x00300000-0x0030000e: 7 words
Communications with target device established at 6000kHz.
Programming ... Done
Operation complete. Time elapsed 2.246s.

 
Found an interesting thing (silicon bug perhaps) when working with your file - your file has MCLRE disabled and there must be impossible to program it with LVP, but the file programmed just fine effectively locking out my LVP mode. I had to use HVP extension to bring the chip back with HVP mode.
 
 
#8
markdem
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2011/05/21 18:34:17
  • Location: 0
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/01 19:56:33 (permalink)
0
I did.
I tried MPLab 5.20, did not make a difference. 
I will try 5.05 later on today. 
#9
Anobium
Senior Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/01 22:28:00 (permalink)
0
Your hex works here.  See the https://1drv.ms/u/s!Ase-P...uQWbTVUJS-HuQ?e=gwYm5D
 
As one of the developers of the PICKitPlus software.  I do know.  There was a low level with these specific chips that Microchip had had failed to resolve in the PICKit range of software.  We resolved this issue within our new software.  
 
So, I would try the latest version of MPLAB-IPE or upgrade to PICKitPlus (this would retain your existing programming hardware).
#10
markdem
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2011/05/21 18:34:17
  • Location: 0
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/02 00:17:45 (permalink)
0
Thanks for the test. 
So it looks like there is a issue with my PICKIT3..
 
For the record, I tried to use MPLABx 5.05, did not work.
The latest version also does not work, IDE and IPE..
 
I have borrowed another PICKIT3, should have it in the next few days. I will report back on what I find.
 
Thanks again
#11
Anobium
Senior Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/02 00:37:28 (permalink)
0
I am not sure that this is the PICkit3.  It could be the MPLAB version or the version of the firmware you are using within the PICkit3.
 
Do try another PICkit3, or, you may have to upgrade to PICKitPlus (which sounds like a plug but it is a solution). 
 
Evan
#12
Mysil
Super Member
  • Total Posts : 3796
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/02 01:34:11 (permalink)
0
Hi,
There are 2 cases here,
1. Standalone programming using PICkit 3 plus programming application seem to be solved by anobium.
   Also NorthGuy  with his NSPROG software and NSDSP hardware tool seem to have solved the case.
 
2. Programming and Debugging in MPLAB X
    Be aware that each release of MPLAB X also include a version of PICkit3 firmware.
    A new version of MPLAB X will Upgrade firmware in PICkit 3 hardware, if there is an older version in the Tool.
    An older version of MPLAB X will Not automatically Downgrade the firmware in PICkit 3,
    if the tool have been used with a later version.
 
    For use with MPLAB X v5.20  or 5.05  you may have to do additional manual steps,
    to force a download of the accompanying Firmware into PICkit 3 hardware tool.
    There are several possible ways:
    1.   Disconnect USB cable to PICkit 3,  Push and hold the black button while connecting USB cable.
    2.   Project Properties box in MPLAB x, PICkit  3 settings, there is a box for Firmware...
    3.   Use  MPLAB 8.92 to install it's version of firmware, then MPLAB X to Update firmware in the tool.
    PICkit 3 Firmware consist of 3 parts, watch that all 3 are downloaded when firmware update is done.
 
    Mysil
#13
markdem
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2011/05/21 18:34:17
  • Location: 0
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/06 00:46:17 (permalink)
5 (1)
Ok, after half a day or trial and error (the bug only shows up now and again) I have found out what is going on.
incase anyone else comes across this one, here is what I have found.
1. PIC fails to program after 14000
2. Open up Microchip IPE.
3. Erase the chip. I now MPLAB should do this prior to programing, but here we are...
4. Perform a "Blank Check". If is fails, GOTO 3.
5. Programing will now work, for a random amount out time. When it fails again, GOTO 2.
I have no idea why this is going on. It happens on both of the PICKIT3 units I have, both with same firmware (also no idea why the borrowed unit worked the first few times, however I might of actually erased the chip prior to testing).
I have found I will normally get about 5-15 programs before it will fail again.
Hopeful this helps someone in the future..
 
Thanks to everyone that helped out here, at least I could rule out something with my HEX.
 
Thanks
#14
Anobium
Senior Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
Re: Issue with programing PIC18F67K22 past memory location 14000 2020/10/06 00:52:54 (permalink)
2 (1)
How strange.  But. if it works. It works.
 
Well done for working this through!
#15
Jump to:
© 2020 APG vNext Commercial Version 4.5