Author Topic: PIC18F24K50 programming problems  (Read 15897 times)

0 Members and 1 Guest are viewing this topic.

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
PIC18F24K50 programming problems
« on: January 14, 2015, 09:58:08 am »
I have not been able to program a PIC18F24K50.

I use a PICkit3 (Olimex xlone). With the stand alone PICkit 3 programmer software I can not detect the chip, error msg: "No device found". I think this software may not be compatible with the 24k50, as I have not found any supported device list which lists 24k50. Can anyone confirm if this is correct or not? If so, any updates to fix it?

Using MPLAB IPE I can choose the correct device, but not connect to it, error msg: "Connection failed."

Connections from 18f24k50 (SSOP package) to PK3 programmer:
Pin 1 ---> MCLR (with 10K pullup to VDD)
Pin 20 ---> VDD
Pin 8,19 ---> VSS
Pin 28 ---> PGD
Pin 27 ---> PGC

As far as I can tell from the datasheet this is correct.

I have tried it with two chips on two boards with the same result.
I have verified voltage on the VDD pin, checked for continuity between pins and the PK3 and checked for shorts between adjacent pins. I have programmed other PICs using this PK3 so I know the programmer is working.


Emil
« Last Edit: January 14, 2015, 10:00:47 am by Emil »
 

exapod

  • Guest
Re: PIC18F24K50 programming problems
« Reply #1 on: January 14, 2015, 11:31:12 am »
Have you double checked the polarity of the ICSP connector https://www.olimex.com/Products/PIC/_resources/PIC-ICSP-2.jpg ?
If you have programmed other microchip pic families (dspic, pic16, etc) you have to update the firmware on the pickit, follow chapter 3 on this doc https://www.olimex.com/Products/PIC/Programmers/PIC-KIT3/resources/PIC-KIT3.pdf .
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: PIC18F24K50 programming problems
« Reply #2 on: January 14, 2015, 11:46:10 am »
Have you double checked the polarity of the ICSP connector https://www.olimex.com/Products/PIC/_resources/PIC-ICSP-2.jpg ?
If you have programmed other microchip pic families (dspic, pic16, etc) you have to update the firmware on the pickit, follow chapter 3 on this doc https://www.olimex.com/Products/PIC/Programmers/PIC-KIT3/resources/PIC-KIT3.pdf .

I have checked the polarity. One of the first things I did when I got the programmer was to print the pinout and tape it to the programmer, then marke the MCLR pin on the cable.

I have programmed pic16's and NOT updated the firmware. I will try that tonight. Thank you.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PIC18F24K50 programming problems
« Reply #3 on: January 14, 2015, 11:52:26 am »
Quote
With the stand alone PICkit 3 programmer software I can not detect the chip

Double check your connection.

Quote
any supported device list which lists 24k50.

You should check Microchip - I would be surprised if it is not supported. One of the issues of PICKIT3 is the need to re-download OS -> that may be your problem.
================================
https://dannyelectronics.wordpress.com/
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2250
  • Country: ca
Re: PIC18F24K50 programming problems
« Reply #4 on: January 14, 2015, 02:43:30 pm »
First, select device family, PIC18FxxK, then attempt to talk to it.
If you have the wrong (or no) device family selected, the pickit 3 can't identify some chips.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: PIC18F24K50 programming problems
« Reply #5 on: January 14, 2015, 08:20:20 pm »
On PIC24's  VUSB3v3  has to be connected to 3.3v if not being used for usb. ?
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Online hli

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: de
Re: PIC18F24K50 programming problems
« Reply #6 on: January 14, 2015, 09:19:53 pm »
Follow the basic connections in section 2.1 of the data sheet. Especially connect a capacitor to Vusb. Also, since the device has multiple Vdd pins, connect them all (and decouple each of them).

Edit: OK, the 24K50 only has one Vdd pin (I looked at the 44K50 that has two). But Vusb still needs to be decoupled properly.
« Last Edit: January 14, 2015, 09:22:13 pm by hli »
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5313
  • Country: gb
Re: PIC18F24K50 programming problems
« Reply #7 on: January 14, 2015, 09:43:23 pm »
As others have said, check your ICSP connections. Then check again. And again. Seriously. I have spent far too many hours fannying around with this interface only to find it's a schoolboy error.

Are you powering this from the PicKit3-a-like or is it self powered?

If pwoered from the PK3, check the current demands of the rest of the circuit are minimal.

PICs are not alone, debug interfaces are the perennial weak link of flakiness in embedded debugging and programming. Once you've got it figured out it should be reliable though.

In the meantime can you tell us what OS you're running, and what MPLAB you're using? There were some versions of MPLAB X that were just awful at detecting PK3s, I wasted a frw days of my life on that too. Screen prints of your error and environment will help.
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: PIC18F24K50 programming problems
« Reply #8 on: January 15, 2015, 08:44:40 am »
On PIC24's  VUSB3v3  has to be connected to 3.3v if not being used for usb. ?

It should be connected to VDD for LF devices, but for F devices it should just be decoupled. I missed that part and have not decoupled it. I Will try adding a cap between Vusb and Gnd.

From the datasheet:
"When the regulator is enabled (F devices), a low-ESR
(< 5?) capacitor is required on the VUSB3V3 pin to
stabilize the voltage regulator output voltage. The
VUSB3V3 pin must not be connected to VDD and is
recommended to use a ceramic capacitor of between
0.22 to 0.47 ?F connected to ground."
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: PIC18F24K50 programming problems
« Reply #9 on: January 15, 2015, 11:18:30 am »
As others have said, check your ICSP connections. Then check again. And again. Seriously. I have spent far too many hours fannying around with this interface only to find it's a schoolboy error.

I have made two different PCB's with this PIC and checked the connections from both boards to the programmer multiple times. But I'll check again to be sure.

Quote
Are you powering this from the PicKit3-a-like or is it self powered?

I have tried both.

Quote
If pwoered from the PK3, check the current demands of the rest of the circuit are minimal.

I have not populated the whole board yet, just what's needed to get the mcu running, so no current demand from the rest of the circuit.

Quote
PICs are not alone, debug interfaces are the perennial weak link of flakiness in embedded debugging and programming. Once you've got it figured out it should be reliable though.

I have used this programmer for maybe two years now and I have also found it to be reliable. No problems in the past that wasn't quickly resolved as soon as I figured out what I was doing wrong.

Quote
In the meantime can you tell us what OS you're running, and what MPLAB you're using? There were some versions of MPLAB X that were just awful at detecting PK3s, I wasted a frw days of my life on that too. Screen prints of your error and environment will help.

Running Windows 7 64bit. I normally use the standalone programming software, I only downloaded MPLAB when I started to suspect the standalone software didn't support the device.

I'm using MPLAB X, either 2.05 or 2.30, I will check whan I'm back on my computer tonight. I'll get some screenshorts too.

To clarify: the PK3 is detected, but not the PIC.
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: PIC18F24K50 programming problems
« Reply #10 on: January 15, 2015, 07:40:42 pm »
I have added a 330nF cap between Vusb3v3 and gnd (soldered directly to the Vusb3v3 pin). No change.

I have measured continuity between all the pins on the PK3 and the corresponding pins on the PIC. I have also checked that none are shortet together. I have verified 10K resistance from MCLR to VCC.

It appares I was mistaken thinking that PK3 standalone program does not support the 18F24k50, as I was able to select it manually.

Edit: Also tested with a 16f1455 to verify that the PK3 is working.

IPE version 2.26
MPLAB X IDE version version 2.26
PICkit 3 standalone programmer version 3.10.00, device file version 1.63.148
« Last Edit: January 15, 2015, 08:41:36 pm by Emil »
 

exapod

  • Guest
Re: PIC18F24K50 programming problems
« Reply #11 on: January 16, 2015, 02:39:08 pm »
Have you tried to update the firmware on the pickit3 for the family you are using?
Please setup a project in mplab x IDE.
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: PIC18F24K50 programming problems
« Reply #12 on: January 16, 2015, 02:47:00 pm »
Have you tried to update the firmware on the pickit3 for the family you are using?
Please setup a project in mplab x IDE.

I have uploaded the firmware that came with the PICkit3 software to the PK3. (Not at home at the moment, so I can't check the version number.) Do you know where I can download the most recent version? I have searched but not found any.

I'll try making a project in Mplab X.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: PIC18F24K50 programming problems
« Reply #13 on: January 16, 2015, 03:27:03 pm »
PK3 has to change its FW  / AP  if you change the PIC device.  MPLABX - PK3 would normally do this automatically... 
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: PIC18F24K50 programming problems
« Reply #14 on: January 16, 2015, 03:33:11 pm »
I had to use IPE to change the firmware, something with MplabX made it impossible.
I also have to run these programs "as administrator" to make things work.. pure crap.
But on the ICD3 they have totally different drivermodel, I have no problems with that one. (other than price, but got lucky on the forum here)
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5313
  • Country: gb
Re: PIC18F24K50 programming problems
« Reply #15 on: January 16, 2015, 04:08:28 pm »
If you are on 2.05 MPLAB X, take a look at this http://www.microchip.com/forums/m782811-p2.aspx

I had the "Connection failed" error and it took a long time to figure it out, it was corrected by the two DLLs mentions in the link.

If you don't have the DLLs I can try to find them for you, I have since upgraded to 2.30.

Like so many new Microchip things in recent years, they release shit that takes months if not years to finally get to production strength (MPLAB X, Harmony framework, PIC32MZ, their "new" forum software).
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: PIC18F24K50 programming problems
« Reply #16 on: January 16, 2015, 04:35:41 pm »
If you are on 2.05 MPLAB X, take a look at this http://www.microchip.com/forums/m782811-p2.aspx

I had the "Connection failed" error and it took a long time to figure it out, it was corrected by the two DLLs mentions in the link.

If you don't have the DLLs I can try to find them for you, I have since upgraded to 2.30.

Like so many new Microchip things in recent years, they release shit that takes months if not years to finally get to production strength (MPLAB X, Harmony framework, PIC32MZ, their "new" forum software).

I'm using MPLAB X 2.26. Do I still need the DLLs?

I tried making a project in MPLAB and program the chip. Got these errors:
"The programmer could not be started: Could not connect to tool hardware: PICkit3PlatformTool, com.microchip.mplab.mdbcore.PICKit3Tool.PICkit3DbgToolManager"
"Connection Failed."

I tried running MPLAB as Administrator, no change.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: PIC18F24K50 programming problems
« Reply #17 on: January 16, 2015, 08:17:46 pm »
As this is a clone what programmer is reported in the MPLABX project properties ? 
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: PIC18F24K50 programming problems
« Reply #18 on: January 16, 2015, 08:59:33 pm »
As this is a clone what programmer is reported in the MPLABX project properties ?

PICkit3
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: PIC18F24K50 programming problems
« Reply #19 on: January 16, 2015, 09:22:35 pm »
Device ? PIC18f14k50
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: PIC18F24K50 programming problems
« Reply #20 on: January 16, 2015, 09:28:17 pm »
Device ? PIC18f14k50

Corrected it now. Still same error.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: PIC18F24K50 programming problems
« Reply #21 on: January 16, 2015, 09:46:19 pm »
If it gets the serial number  MPLABX can 'see'  programmer but cannot 'start' it...  will PICKit3 program another different PIC project ? 
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: PIC18F24K50 programming problems
« Reply #22 on: January 16, 2015, 09:54:38 pm »
If it gets the serial number  MPLABX can 'see'  programmer but cannot 'start' it...  will PICKit3 program another different PIC project ?

It will program other PICs using the standalone PICkit3 software.

Using the MPLAB X IDE I get the same errors.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: PIC18F24K50 programming problems
« Reply #23 on: January 16, 2015, 10:10:08 pm »
Have you gone through all the PK3 Project properties, "Power " - " Use latest Firmware"  you could try "specific firmware" option...   


Edit
Also On the dashboard side bar  ( green arrows) refresh Debug tool status , it will / should show FW and also download info...
« Last Edit: January 16, 2015, 10:22:45 pm by 22swg »
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: PIC18F24K50 programming problems
« Reply #24 on: January 16, 2015, 10:27:34 pm »
Have you gone through all the PK3 Project properties, "Power " - " Use latest Firmware"  you could try "specific firmware" option...   

I have checked "Power target circuit from PICkit3" and I have also tried unchecking it and power the board.
I have tried "Use latest firmware" and also to use a specific firmware ersion, I used the only one I could find, PK3FW_013411.jam
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf