Page 1 of 1

Pickit 3 Initialize failed!

Posted: Wed Feb 02, 2011 9:03 am
by ocaltek
Hi all

I have made a very simple led flasher program and it simulates perfectly. Flowcode also compiles to c ok aswell but when I try to compile to the pic mcu I get the following error.
I am using the pic16f1827 on a proto board and the Hi Tech compiler Lite. I have been through all settings a dozen times but cant seem to find what wrong.
I also tried this with the demo board included with the pickit3 (18f45k20) and adjusted the compiler setting s as needed with the same result.

I have also confirmed that the pickit 3 is fuctional on another pc that has mplab which came with the pickit.

I have attached the project file for reference. I will also attach other files if needed.


TEST.zip
Flowcode test program
(1.03 KiB) Downloaded 283 times
Cheers
Christian

Code: Select all

http://www.matrixmultimedia.com


Launching the compiler...
E:\Program Files\HI-TECH Software\PICC\9.81\bin\picc.exe --CHIP=16F1827 -N48 TEST.c
(1273) Omniscient Code Generation not available in Lite mode (warning)

Memory Summary:
    Program space        used    B9h (   185) of  1000h words   (  4.5%)
    Data space           used    29h (    41) of   180h bytes   ( 10.7%)
    EEPROM space         used     0h (     0) of   100h bytes   (  0.0%)
    Configuration bits   used     2h (     2) of     2h words   (100.0%)
    ID Location space    used     0h (     0) of     4h bytes   (  0.0%)

HI-TECH C Compiler for PIC10/12/16 MCUs (Lite Mode)  V9.81
Copyright (C) 2010 Microchip Technology Inc.

Running this compiler in PRO mode, with Omniscient Code Generation enabled,
produces code which is typically 40% smaller than in Lite mode.
See http://microchip.htsoft.com/portal/pic_pro for more information.


Return code = 0

Launching the linker/assembler...
E:\Program Files\Matrix Multimedia\Flowcode V4\Tools\DoNothing\DoNothing.exe 

Return code = 0

Launching the programmer...
E:\Program Files\Matrix Multimedia\Flowcode V4\Tools\PICkit3\PK3CMD.exe -P16F1827 -FTEST.hex -E -M -Y


Initialize Failed !!!
Return code = 1

Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.

FINISHED

Re: Pickit 3 Initialize failed!

Posted: Wed Feb 02, 2011 12:40 pm
by Benj
Hello,

I just tried the PICkit3 with the settings as you have them and the device is working ok.
Launching the programmer...
C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\PICkit3\pk3cmd.exe -P16F88 -Ftst.hex -E -M -Y

Connecting...
PICkit 3 detected
Connecting to PICkit 3...
Running self test...
.


Self test completed
Firmware Suite Version...... 01.26.33
Firmware type......................Midrange
PICkit 3 Connected.
...


Target Detected
Device ID Revision = 00000005

Erasing ...
Erase device complete

Programming Device ...
Programming/Verify complete

Verifying Device ...
Verify complete
Return code = 0

FINISHED
I'll try again with the 1827 and let you know how I get on.

Re: Pickit 3 Initialize failed!

Posted: Wed Feb 02, 2011 12:52 pm
by Benj
Ok here is the 16F1827 and a PICkit 3.
Connecting...
PICkit 3 detected
Connecting to PICkit 3...
Firmware Suite Version...... 01.26.33
Firmware type......................Midrange
Downloading AP...
........................

AP download complete
.

Running self test...
Self test completed
Firmware Suite Version...... 01.26.33
Firmware type......................Enhanced Midrange
PICkit 3 Connected.
....

Target Detected
Device ID Revision = 00000004

Erasing ...
Erase device complete

Programming Device ...
Programming/Verify complete

Verifying Device ...
Verify complete
Return code = 0

FINISHED
My compiler options programmer settings are as follows.

C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\PICkit3\pk3cmd.exe
-P%p -F%f.hex -E -M -Y

Which release of v4 are you running?

Re: Pickit 3 Initialize failed!

Posted: Wed Feb 02, 2011 10:51 pm
by ocaltek
Hi Ben

I am using the latest release, I believe it is V4.3.7.63 I tried to update it once it was installed but it said it was the latest version.
Would it have anything to do with the fact that the drive letter on that os is not C:\ but E:\ I do remember reading a post about
non standard directories being an issue.

I have also attached a pdf of the circuit diagram for the test circuit board. Just to rule out any hardware faults. I used the pickit 3 data sheet as reference for the
connections to the mcu

Thanks for your help so far.


cheers

christian

Re: Pickit 3 Initialize failed!

Posted: Thu Feb 03, 2011 10:36 am
by Benj
Hello Christian,

Your schematic looks good to me. It might be worth installing MPLAB and selecting the PICkit3 as a programmer. Hopefully this will update the firmware on the device for the chip you are using and allow it to work correctly. Bring back the PICkit 2 I say 8)

Maybe also worth a quick check of the microchip forums to see if they have had someone else with the same problem.

Let me know how you get on.

Re: Pickit 3 Initialize failed!

Posted: Fri Feb 04, 2011 1:15 am
by ocaltek
Hi Ben

After having no luck to to resolve the Initialize failed! error. I decide to do a clean install of windows 7 x86 on a separate partition on the pc (hp laptop) to eliminate any software/driver conflicts. These are my observations so far.

Once everything was installed minus mplab I would get a different error when launching the programmer. (sorry didn't note it down)
Then installed mplab and the Initialize failed error reappeared. SO I uninstalled mplab with no change.

Wiped OS win7 AND STARTED OVER with software install minus mplab.

Installed mplab on separate pc and upgraded firmware pickit 3 and mplab confirmed a device ID for my mcu board.

Started new project with all same settings (to uploaded file) on fresh OS win7 (run as admin saved on a USB Drive)
Compiled to the chip and still get an error but now it is not an Initialize failed it is as below any more help would be great
kind feel like tearing my hair out at the moment and not sure what else to do.

cheers
Christian
File name: H:\flowcode files\test2.c
Generated by: Flowcode v4.3.7.63
Date: Friday, February 04, 2011 11:25:48



http://www.matrixmultimedia.com


Launching the compiler...
C:\Program Files\HI-TECH Software\PICC\9.81\bin\picc.exe --CHIP=16F1827 -N48 test2.c

.........

(1273) Omniscient Code Generation not available in Lite mode (warning)

Memory Summary:
Program space used 8Ah ( 138) of 1000h words ( 3.4%)
Data space used 24h ( 36) of 180h bytes ( 9.4%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Configuration bits used 2h ( 2) of 2h words (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)

HI-TECH C Compiler for PIC10/12/16 MCUs (Lite Mode) V9.81
Copyright (C) 2010 Microchip Technology Inc.

Running this compiler in PRO mode, with Omniscient Code Generation enabled,
produces code which is typically 40% smaller than in Lite mode.
See http://microchip.htsoft.com/portal/pic_pro for more information.


Return code = 0

Launching the linker/assembler...
C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\DoNothing\DoNothing.exe

Return code = 0

Launching the programmer...
C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\PICkit3\PK3CMD.exe -P16F1827 -Ftest2.hex -E -M -Y

Return code = -1073741515

Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.

FINISHED

Re: Pickit 3 Initialize failed!

Posted: Fri Feb 04, 2011 2:25 am
by ocaltek
Hi Ben

I thought I would post in with some good news IT's ALIVE. It appears that the mplab v8.30 was causing conflicts. So on the fresh OS install I downloaded and installed the latest version of mplab V8.63 and now it is working a treat I even have a flashing LED on my test circuit. I am surprised how happy one little flashing led has made me.

Thanks for all your help!

Cheers
Christian

File name: H:\flowcode files\test2.c
Generated by: Flowcode v4.3.7.63
Date: Friday, February 04, 2011 12:51:35


http://www.matrixmultimedia.com


Launching the compiler...
C:\Program Files\HI-TECH Software\PICC\9.81\bin\picc.exe --CHIP=16F1827 -N48 test2.c

........

(1273) Omniscient Code Generation not available in Lite mode (warning)

Memory Summary:
Program space used 6Ah ( 106) of 1000h words ( 2.6%)
Data space used 21h ( 33) of 180h bytes ( 8.6%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Configuration bits used 2h ( 2) of 2h words (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)

HI-TECH C Compiler for PIC10/12/16 MCUs (Lite Mode) V9.81
Copyright (C) 2010 Microchip Technology Inc.

Running this compiler in PRO mode, with Omniscient Code Generation enabled,
produces code which is typically 40% smaller than in Lite mode.
See http://microchip.htsoft.com/portal/pic_pro for more information.


Return code = 0

Launching the linker/assembler...
C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\DoNothing\DoNothing.exe

Return code = 0

Launching the programmer...
C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\PICkit3\PK3CMD.exe -P16F1827 -Ftest2.hex -E -M -Y

Connecting...
PICkit 3 detected
Connecting to PICkit 3...
Running self test...
Self test completed
Firmware Suite Version...... 01.26.43
Firmware type......................Enhanced Midrange
.


PICkit 3 Connected.
Target Detected
Device ID Revision = 00000004

Erasing ...
Erase device complete

Programming Device ...
Programming/Verify complete
.



Verifying Device ...
Verify complete
Return code = 0

FINISHED

Re: Pickit 3 Initialize failed!

Posted: Fri Feb 04, 2011 9:34 am
by Benj
Brilliant glad its working correctly now,

Thanks for letting me know how you fixed the problem.