• AVR Freaks

Helpful ReplyHot!PIC24F08KL200 Address: f8000c Expected Value: 7b Received Value: fb

Author
Mike432
Starting Member
  • Total Posts : 76
  • Reward points : 0
  • Joined: 2016/08/15 06:26:37
  • Location: 0
  • Status: offline
2020/11/26 19:07:32 (permalink)
0

PIC24F08KL200 Address: f8000c Expected Value: 7b Received Value: fb

I get the error message when trying to program my IC.  It is a very simple program to flash an LED On/Off.  I tried to switch to high voltage program entry mode but then it give a target voltage not detected error.  The only thing I have connected right now is the LED/resistor to pin 9 and a .1uF cap between Vdd and Vss.
 
added note... Using a 5V 2 amp power supply for power to the IC.
 
Connecting to MPLAB PICkit 3...
Currently loaded firmware on PICkit 3
Firmware Suite Version.....01.51.06
Firmware type..............dsPIC33F/24F/24H
Target voltage detected
Target device PIC24F08KL200 found.
Device ID Revision = 2
Device Erased...
Programming...
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x3ff
configuration memory
configuration memory
Address: f8000c Expected Value: 7b Received Value: fb
Failed to program device
post edited by Mike432 - 2020/11/26 19:18:03
#1
BroadwellConsultingInc
Super Member
  • Total Posts : 97
  • Reward points : 0
  • Joined: 2020/06/09 06:07:55
  • Location: 0
  • Status: offline
Re: PIC24F08KL200 Address: f8000c Expected Value: 7b Received Value: fb 2020/11/26 19:22:19 (permalink) ☄ Helpfulby Mike432 2020/11/26 19:44:45
5 (1)
This bit is the MCLRE bit in the FPOR configuration register.   There's a note on page 180 of the datasheet:
 
Note 1: The MCLRE fuse can only be changed when using the VPP-Based ICSP™ mode entry. This prevents a user from accidentally locking out the device from the low-voltage test entry.
 
Try changing your config bits to make RA5 a reset pin rather than an I/O pin and see if the programming is successful.
#2
Mike432
Starting Member
  • Total Posts : 76
  • Reward points : 0
  • Joined: 2016/08/15 06:26:37
  • Location: 0
  • Status: offline
Re: PIC24F08KL200 Address: f8000c Expected Value: 7b Received Value: fb 2020/11/26 19:48:24 (permalink)
0
Setting the configuration "#pragma config MCLRE = ON" allowed me to program the device.
 
Does this mean that I can't use RA5 as an input or is there a way to set it as an input during startup of the device?  I was planning to use every I/O on this chip.
 
 
#3
BroadwellConsultingInc
Super Member
  • Total Posts : 97
  • Reward points : 0
  • Joined: 2020/06/09 06:07:55
  • Location: 0
  • Status: offline
Re: PIC24F08KL200 Address: f8000c Expected Value: 7b Received Value: fb 2020/11/26 19:57:08 (permalink)
5 (2)
I think you can if you can do high-voltage programming of the chip.  I've not used this chip before, but the way I read the datasheet note you have to program using a voltage higher than your Vdd voltage on the MCLR pin.  You'll need to look at your circuit design to make sure that having your programmer apply such a voltage (between 7.75 and 9 volts if you look in the PIC24F08KL200 flash programming specification) won't cook whatever you have hooked up that you intended to measure with RA5.
#4
ric
Super Member
  • Total Posts : 29435
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: PIC24F08KL200 Address: f8000c Expected Value: 7b Received Value: fb 2020/11/26 20:08:46 (permalink)
0
As above.
However, you must be very careful if you are connecting an "off board" signal to the MCLR pin, as any glitch higher than Vdd on that pin could cause the chip to jump into programming mode!
 

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!
#5
Mike432
Starting Member
  • Total Posts : 76
  • Reward points : 0
  • Joined: 2016/08/15 06:26:37
  • Location: 0
  • Status: offline
Re: PIC24F08KL200 Address: f8000c Expected Value: 7b Received Value: fb 2020/11/26 20:24:54 (permalink)
0
Currently I have nothing connected to RA5.  That can come later after I get the device programmed.
 
In "Project Properties", selecting "PICkit 3" under categories, selecting "Program Options" from the "Option categories:" drop down, and checking "Use high voltage programming mode entry" causes the below error when trying to program the IC.
 
Connecting to MPLAB PICkit 3...
Currently loaded firmware on PICkit 3
Firmware Suite Version.....01.51.06
Firmware type..............dsPIC33F/24F/24H
Target voltage detected
Target Device ID (0x0) is an Invalid Device ID. Please check your connections to the Target Device.
#6
ric
Super Member
  • Total Posts : 29435
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: PIC24F08KL200 Address: f8000c Expected Value: 7b Received Value: fb 2020/11/26 21:02:00 (permalink)
4 (1)
It would appear something is preventing it pulling the MCLR pin up to the high voltage.
Either there is some other device connected to MCLR, with internal protection diodes to Vdd, or MCLR is not connected to the PK3 at all.
(I doubt it is the latter, as that would have stopped low voltage programming from working too.)
 

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
Jump to:
© 2021 APG vNext Commercial Version 4.5