|
|
View previous topic :: View next topic |
Author |
Message |
PrinceNai
Joined: 31 Oct 2016 Posts: 480 Location: Montenegro
|
|
Posted: Sat Nov 20, 2021 8:30 am |
|
|
And from here:
https://microchipsupport.force.com/s/article/How-to-troubleshoot-ICD3-errors
Quote: |
4. Manually update the firmware
For MPLAB X
a. Go to MPLAB X IDE Project Properties -> ICD3 -> Firmware -> uncheck Use Latest Firmware box -> click on Press to browse for a specific firmware version box -> Select jam file -> OK.
b. Then please try to use the ICD3 (program your target device).
For MPLAB 8
c. Go to MPLAB v8.92, connect the ICD3 and select it as debugger/programmer, then go to Debugger/Programmer -> Settings -> Configuration -> Manual Download.
d. Then please try to use again the ICD3 (program your target device).
|
|
|
|
mdemuth
Joined: 16 Apr 2007 Posts: 71 Location: Stuttgart, Germany
|
|
Posted: Mon Nov 22, 2021 8:28 am |
|
|
I use CCS IDE to write and compile the code. To program the hardware I use PICKitPlus and the good old PICKit2 programmer as first choice.
(I gave up on MPLAB many years ago....)
As a second choice I use the ICD-U64 for chips which are not covered by the PICKitPlus.
I do also have PICKIT3, ICD2, ICD3 in my shelf but I haven't used them for years...
Program and run. I rarely use in circuit debugging. |
|
|
jaka
Joined: 04 May 2014 Posts: 36 Location: Finland
|
|
Posted: Mon Nov 22, 2021 9:23 am |
|
|
I always use MPLAB 8.92, if the PIC is supported by it. I use ICD3, which has a big sticker on it "MPLAB 8.92". This is to prevent accidental exposure to MPLAB-X IPE which I sometimes need to use. If the ICD3 is flashed by MPLAB-X, it is a lot of work to get it to work with 8.92 again. The instructions provided by PrinceNai are useful if you do that mistake. You need to upload the .jam file which comes with MPLAB 8.92.
Otherwise, I use CCS IDE. With that, I use ICD-U64.
I have also a big pile of other PIC programmers, but the above mentioned work best for me, for programming and debugging.
If you don't need debugging, you could use PICkitminus http://kair.us/projects/pickit2minus/index.html It is developed by me It is based on the old Microchip stand-alone GUI program. It works with both PICkit2 and PICkit3. It supports pretty much all 8-bit PICs. |
|
|
johnl
Joined: 30 Sep 2003 Posts: 120
|
|
Posted: Mon Nov 22, 2021 3:06 pm |
|
|
I loaded MPLAB 8.92 and it seems to work. I also am using IPE 3.26 and it works.
Life just got simpler.
Thanks much for the suggestions. |
|
|
jaka
Joined: 04 May 2014 Posts: 36 Location: Finland
|
|
Posted: Tue Nov 23, 2021 10:19 am |
|
|
Your life will get even more simple if you use ICD3 directly from MPLAB 8.92.
In short, you need to:
- Use driver switcher to switch ICD3 to use MPLAB 8
- Downgrade ICD3 firmware in MPLAB by uploading the .jam file
In reality, this is often much more complex. I describe the procedure here, which has worked for me.
Plug ICD3 to your PC. Run driver switcher as administrator. Configure the ICD 3 for MPLAB 8 use.
Sometimes the driver switcher can say that you don't have both MPLAB 8 and MPLAB-X installed, even though you have. This has happened to me with MPLAB 8.92 and MPLAB-X 5.45. Here's a workaround. Go to C:\Program Files\Microchip\MPLABX\v5.45\Switcher\64Bit (or equivalent, depending on your MPLAB-X version). There is ICD3_switcher64.bat. Open the file with text editor, and check that these two lines point to correct directories:
Code: |
@set Full8Path=c:\Program Files (x86)\Microchip\MPLAB IDE\Drivers64
@set FullXPath=c:\Program Files\Microchip\MPLABX\v5.45\Switcher\64Bit |
I had to modify both. The first one was missing (x86) and second one was missing v5.45. Then, open command prompt as administrator, and navigate to the directory where the .bat file is. Ensure the ICD3 is plugged in. Run it like this:
Code: |
ICD3_switcher64.bat 8 |
(If you ever need to switch to MPLAB-X, use some other integer instead of 8)
Then, fire up MPLAB 8.92. Have the ICD3 connected, but no target PIC connected. Do the following:
- Programmer -> Select programmer -> MPLAB ICD 3
- Programmer -> Settings -> Configuration
- Uncheck 'Auto download latest firmware'
- Manual download -> C:\Program Files (x86)\Microchip\MPLAB IDE\ICD3\ICD3FW_012890.jam
It should now program the 01.28.90 firmware (including AP, FPGA, Bootloader, RS)
If all parts of the firmware are programmed succesfully, you are done. If you get some failures, like FPGA self test, try to program again. If it still fails, unplug and replug ICD3 (or try Programmer -> Reconnect), and try again. Eventually it should succeed.
One more note. If you have used same PIC in MPLAB-X IPE, and then just switch the driver to MPLAB 8, it may seem to work OK in MPLAB 8.92, even without downgrading the ICD 3 firmware to 01.28.90. But, if you now try to change to some other PIC in MPLAB 8.92, the ICD 3 will stop working and gives all kind of errors. You need to use the .jam to downgrade all 4 parts of ICD3 firmware to correct version. Only then it will work properly in MPLAB 8.92, even when changing to different PIC families which require different firmware for ICD3. |
|
|
johnl
Joined: 30 Sep 2003 Posts: 120
|
|
Posted: Tue Nov 23, 2021 12:53 pm |
|
|
jaka-
Thanks much for the detailed instructions which I'm sure others will also find useful.
Right now, I'm in the throes of a large project that's also time sensitive (aren't they all?), so I'll stick with my slightly clunky setup THAT WORKS! I'll get elegant with it by using your suggestions another time.
Thanks again!
jaka wrote: | Your life will get even more simple if you use ICD3 directly from MPLAB 8.92.
In short, you need to:
- Use driver switcher to switch ICD3 to use MPLAB 8
- Downgrade ICD3 firmware in MPLAB by uploading the .jam file
In reality, this is often much more complex. I describe the procedure here, which has worked for me.
Plug ICD3 to your PC. Run driver switcher as administrator. Configure the ICD 3 for MPLAB 8 use.
Sometimes the driver switcher can say that you don't have both MPLAB 8 and MPLAB-X installed, even though you have. This has happened to me with MPLAB 8.92 and MPLAB-X 5.45. Here's a workaround. Go to C:\Program Files\Microchip\MPLABX\v5.45\Switcher\64Bit (or equivalent, depending on your MPLAB-X version). There is ICD3_switcher64.bat. Open the file with text editor, and check that these two lines point to correct directories:
Code: |
@set Full8Path=c:\Program Files (x86)\Microchip\MPLAB IDE\Drivers64
@set FullXPath=c:\Program Files\Microchip\MPLABX\v5.45\Switcher\64Bit |
I had to modify both. The first one was missing (x86) and second one was missing v5.45. Then, open command prompt as administrator, and navigate to the directory where the .bat file is. Ensure the ICD3 is plugged in. Run it like this:
Code: |
ICD3_switcher64.bat 8 |
(If you ever need to switch to MPLAB-X, use some other integer instead of 8)
Then, fire up MPLAB 8.92. Have the ICD3 connected, but no target PIC connected. Do the following:
- Programmer -> Select programmer -> MPLAB ICD 3
- Programmer -> Settings -> Configuration
- Uncheck 'Auto download latest firmware'
- Manual download -> C:\Program Files (x86)\Microchip\MPLAB IDE\ICD3\ICD3FW_012890.jam
It should now program the 01.28.90 firmware (including AP, FPGA, Bootloader, RS)
If all parts of the firmware are programmed succesfully, you are done. If you get some failures, like FPGA self test, try to program again. If it still fails, unplug and replug ICD3 (or try Programmer -> Reconnect), and try again. Eventually it should succeed.
One more note. If you have used same PIC in MPLAB-X IPE, and then just switch the driver to MPLAB 8, it may seem to work OK in MPLAB 8.92, even without downgrading the ICD 3 firmware to 01.28.90. But, if you now try to change to some other PIC in MPLAB 8.92, the ICD 3 will stop working and gives all kind of errors. You need to use the .jam to downgrade all 4 parts of ICD3 firmware to correct version. Only then it will work properly in MPLAB 8.92, even when changing to different PIC families which require different firmware for ICD3. |
|
|
|
jaka
Joined: 04 May 2014 Posts: 36 Location: Finland
|
|
Posted: Tue Nov 23, 2021 11:57 pm |
|
|
Quote: | Right now, I'm in the throes of a large project that's also time sensitive (aren't they all?), so I'll stick with my slightly clunky setup THAT WORKS! I'll get elegant with it by using your suggestions another time. |
That's very good idea. Even though I haven't (yet) totally bricked any ICD3, it is possible.
I hope the instructions are of help to others as well. This thread inspired me to document the procedure to myself also, because I have been suffering from the driver switcher problem for some time. I found the .bat file solution only yesterday. |
|
|
PrinceNai
Joined: 31 Oct 2016 Posts: 480 Location: Montenegro
|
|
Posted: Wed Nov 24, 2021 2:14 pm |
|
|
Quote: |
Right now, I'm in the throes of a large project that's also time sensitive (aren't they all?), so I'll stick with my slightly clunky setup THAT WORKS! I'll get elegant with it by using your suggestions another time.
|
Big and time critical project is the LAST where you wanna have any kind of clunky setup and kinda working tools. An hour spent making sure all your tools work 100% will save you a lot of time wondering " Is it because of my debugger or is it my code?" |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9241 Location: Greensville,Ontario
|
|
Posted: Wed Nov 24, 2021 2:57 pm |
|
|
re: Quote: | An hour spent making sure all your tools work 100% will save you a lot of time wondering " Is it because of my debugger or is it my code?" |
BTDT, dayze.....
MPLAB mid8s, the build configuration default was 'debug' not 'release'. THAT was loads of fun... wondering why SIMPLE code didn't work in the 'real world'.....sigh. I'd change to release, code would work, then hours later, arrgh, again not working, oh yeah.... change to release...grrr... yellow post-it on monitor after that...
Called Microchip, talked to an MPLAB expert, I asked how to make 'release' the default, it took him awhile to understand I never use 'debug', THAT is what the 'real world' is for, he figured it out days later, called me,sent a 'patch', then a few versions later MPLAB was changed so that the last 'build config' was the default....
I would still like to know WHO decided pins 2 and 3 of the 'RS-232' connector had to be swapped when 'they' went from DB-25 to DE-9s..ZERO logic in that. sigh. |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Fri Dec 03, 2021 2:35 am |
|
|
Most of the time with CCS, I use UltraEdit32 to edit and compile using CCS's CLI mode.
To program, There's the MPLAB-X programmer (IIRC, it's separate)
but also, I thought the ICD-3 had a CLI mode as well.
I'd have to go back and look - it's been so long. _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|