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
With the stand alone PICkit 3 programmer software I can not detect the chip
Double check your connection.
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.
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.
On PIC24's VUSB3v3 has to be connected to 3.3v if not being used for usb. ?
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.
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.
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."
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.
Are you powering this from the PicKit3-a-like or is it self powered?
I have tried both.
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.
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.
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.
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
Have you tried to update the firmware on the pickit3 for the family you are using?
Please setup a project in mplab x IDE.
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.
PK3 has to change its FW / AP if you change the PIC device. MPLABX - PK3 would normally do this automatically...
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)
If you are on 2.05 MPLAB X, take a look at this
http://www.microchip.com/forums/m782811-p2.aspxI 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).
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.
As this is a clone what programmer is reported in the MPLABX project properties ?
Device ? PIC18f14k50
Corrected it now. Still same error.
If it gets the serial number MPLABX can 'see' programmer but cannot 'start' it... will PICKit3 program another different PIC project ?
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.
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...
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
Dashboard ...Green arrows ?
These were the DLLs that fixed the 2.05 problem, and I also include the DLLs that are current, and working, with 2.30.
You need to put one in your Windows\System32 and the other in your Windows\Syswow64: the subdirectory structure within the zip file will make it clear which one is which.
Save your old DLLs with an appropriate rename!
One further test is that as I remember it, Pickit 3 worked perfectly with the old MPLAB 8.92, it was just the MPLAB X nonsense that didn't.
The
bad DLLs were:
Directory of C:\Windows\System32
14/01/2014 20:18 243,200 USBAccessLink.dll
Directory of C:\Windows\syswow64
14/01/2014 20:18 199,680 USBAccessLink.dll
Too many green arrows
Have you clicked ' Refresh Debug tool status ' (round arrows) on the dashboard side bar ...
Too many green arrows Have you clicked ' Refresh Debug tool status ' (round arrows) on the dashboard side bar ...
Found 5
Now I understand which one you ment
When clicking "refresh debug tool status" I get another "Connection Failed" message after a while.
So MPLABX can resolve the serial number but not connect for other comms ? is your "PK3" in the win 7 Device manager as 'HID-compliant device' and 'USB input device ' (2 entries)
The problem is solved
I found the solution in the last post of this tread:
http://www.electro-tech-online.com/threads/pickit-3-windows-7-64-bit-mplab-ide-issues.141424/-I ran MPLAB 8.92 as Administrator. (Probably would have worked in MPLAB X and as normal user too.)
-I unplugged the PK3, pressed the button on it and held it while connecting usb again, then released the button.
-A dialog poped up asking to update the firmware, which it then did.
The PK works in MPLAB now. (Both v8.92 and MPLAB X v2.26).
If I try with the standalone programmer software I get this message: "The PICkit 3 is in MPLAB mode. Use the tools menu to download an OS compatible with this application."
Thank you to everyone who helped me with this.
Well done! Can't ever remember having to do that on a PK3, but I may be mistaken.