PICkit 3 build problem

Thread Starter

Old Frank

Joined Jul 23, 2016
17
The tables weren't a problem at all. The problems were getting the correct chip number, formatting the code, and the configuration. For whatever reason, MPLab 8.92 didn't like the bit names. That could also have been a case sensitivity issue. When I test code like this, I usually just do it as a "Quickbuild" and don't set up a project.

John
Because I can't even get the PICkit 3 to build, I'm using Oshonsoft's assembler and getting successful hex files with no errors reported. I realise that doesn't necessarily mean that the program will work as I want, but it seems to be in a form that a programmer or simulator could handle. Oshonsoft's "PIC simulator" does a half-decent job on my code, but can't handle the DAC. Initially, it's simulation I need, so that I can check registers are storing correct values. For example, the 12F752 has 4 memory banks, so I realise I can easily miss selection of the correct Bank. That's where the simulator is invaluable.
 

atferrari

Joined Jan 6, 2004
4,764
I might be missing something but, is the Pickit3 who compiles it? This seems an MPLAB task, AFAK. It would be good to clarify the issue in benefit of the TS/OP at least.
 

Thread Starter

Old Frank

Joined Jul 23, 2016
17
I might be missing something but, is the Pickit3 who compiles it? This seems an MPLAB task, AFAK. It would be good to clarify the issue in benefit of the TS/OP at least.
I couldn't get the PICkit3 to build, so I was using Vladimir's stuff. I'm just trying again with the PICkit3 and got a long list of error messages for a program that is accepted and simulates with Vlad's stuff, so I think it must be basic "errors" dependent on the software. I also get
"Target Device ID (00000000) does not match expected Device
ID (00001520)"
so I'm going for a walk - in the Welsh rain.
 

jpanhalt

Joined Jan 18, 2008
11,087
As pointed out, the PK3 doesn't "build" the program. I posted your program that built perfectly using MPLab 8.92. All you needed to do was check the configuration and/or case of a few items, build, and then program with your PK3. If you used MPLab it would be easy to tell you how to do that step by step. In fact, MPLab lets one disable case sensitivity so that will not be an issue. If setting the configuration is something you do not know how to do, MPLan is a great help. Oshonsoft, I believe, is even easier to use based on comments by some who have used both. In either case, the PK3 is not involved in the "build" and is not the source of your problem getting the program to build.

The earlier comment about Project Wizard was probably based on that person's experience with MPLab, but you don't need to use that wizard, if you don't want to use it. It is not like some MS wizards. It just help get a project file and associated files set up. I usually just default through it, then go back and add the files I need.

John
 

atferrari

Joined Jan 6, 2004
4,764
As pointed out, the PK3 doesn't "build" the program. I posted your program that built perfectly using MPLab 8.92. All you needed to do was check the configuration and/or case of a few items, build, and then program with your PK3. If you used MPLab it would be easy to tell you how to do that step by step. In fact, MPLab lets one disable case sensitivity so that will not be an issue.
Gracias John,

I should have said so myself instead of provoking a reply as yours above. Sorry.

The title denotes the confusion already. Looking in the wrong part is the worst you could do when troubleshooting or debugging.
 

jpanhalt

Joined Jan 18, 2008
11,087
I couldn't get the PICkit3 to build, so I was using Vladimir's stuff. I'm just trying again with the PICkit3 and got a long list of error messages for a program that is accepted and simulates with Vlad's stuff, so I think it must be basic "errors" dependent on the software. I also get
"Target Device ID (00000000) does not match expected Device
ID (00001520)"

so I'm going for a walk - in the Welsh rain.
That error is often a bad connection, failure to specify the power source (programmer or target -- usually target not recognized), or a bad setting in the programmer's configuration. I am only familiar with MPLab 8.92 driving a PicStart Plus, ICD3 or PK3. In those set-ups, you need to define the programmer (ICD3, PK3, other), the proper chip, and the power source. If you are programming that chip alone, you can probably power by the PK3. If you are doing in-circuit programming, you probably want to power the board independently, as the PK3 is very limited in how much power it can provide. I believe it is less than 50 mA and perhaps only 25 to 30 mA.

John
 

Thread Starter

Old Frank

Joined Jul 23, 2016
17
Thanks for your time, John.
I've got the correct chip (12HV752) and tried with power via PICkit3 and target's own supply (declared in the prog'r config'n), and still get "Target detected" but "Target Device ID (00000000) does not match expected Device ID (00001520)".
I don't have much coding experience, but I've succeeded in writing Assembly code, simulating and programming a 10F220, 12F819 and 12F675 (this last one drove a 2-range LED strobe), so I must have got something right - eventually. But you can see why I need someone sitting next to me with this PICkit3. It has too many "bells & whistles" for me as a B.S.I.
"Counting my chickens ..." I'd prepared a ZIF socket, nicely mounted, ready to program 30+ PICs for my latest project and it ain't not goin' nowhere.
If you think you can't help any more at this distance, feel free to leave me to it. I'll crack it sometime and "the closer I get to death, the less time seems to matter". I'm very grateful for what you've done already because it's cleared some of the likely obstacles for me.
Frank
 

jpanhalt

Joined Jan 18, 2008
11,087
I don't have much coding experience, but I've succeeded in writing Assembly code, simulating and programming a 10F220, 12F819 and 12F675 (this last one drove a 2-range LED strobe), so I must have got something right - eventually.
The 12F819 doesn't appear to have been released by Microchip yet. Are you sure you are not a phantom developer for Microchip in Chandler, AZ?

Can you provide a link to its datasheet?

John
 

Thread Starter

Old Frank

Joined Jul 23, 2016
17
The 12F819 doesn't appear to have been released by Microchip yet. Are you sure you are not a phantom developer for Microchip in Chandler, AZ?

Can you provide a link to its datasheet?

John
Sorry, John. It was the 16F819, my first try with an ADC, but I wanted to use a smaller case than that allowed. That was when I went to the 12F675.
 

Thread Starter

Old Frank

Joined Jul 23, 2016
17
Trying to follow in your footsteps, John, I uninstalled MPLAB X and tried to install MPLAB v8.92, but kept getting a "missing file" message close to the end of the process. I'll try again on an aged laptop running Windows XP - but tomorrow, as my spring's run down.
Frank
 

dannyf

Joined Sep 13, 2015
2,197
I have to say that I don't quite understand your issue.

Pickit3 is a programmer and debugger so it cannot build anything.

Your problem sounds more like a wiring problem or a bad target chip. If you can program the target via a different programmer, you can then focus on wiring.

On that front, get the indepdent utility for pickit3 and see if you can identify the chip and program it correctly.

Then go from there.

Btw, to help people help you, show a picture of your wiring and provide some context.
 

jpanhalt

Joined Jan 18, 2008
11,087
Trying to follow in your footsteps, John, I uninstalled MPLAB X and tried to install MPLAB v8.92, but kept getting a "missing file" message close to the end of the process. I'll try again on an aged laptop running Windows XP - but tomorrow, as my spring's run down.
Frank
That type of problem is frequently experienced. Here is just one example: http://www.electro-tech-online.com/threads/mplab-ided-v-8-92-corrupted.148826/#post-1272370 WP100 is a very experienced user of PIC's and their programmers.

A clean install on a competent alternative PC is the easiest solution.

John
 

Thread Starter

Old Frank

Joined Jul 23, 2016
17
I have to say that I don't quite understand your issue.

Pickit3 is a programmer and debugger so it cannot build anything.

Your problem sounds more like a wiring problem or a bad target chip. If you can program the target via a different programmer, you can then focus on wiring.

On that front, get the indepdent utility for pickit3 and see if you can identify the chip and program it correctly.

Then go from there.

Btw, to help people help you, show a picture of your wiring and provide some context.
I try to use the "Build" because that's in the instructions for forming the whole project.
Wiring is fine as it detects the chip, but there's the ID problem as well
"Target Device ID (00000000) does not match expected Device
ID (000xxxxx)". Anyway, I'm about to try with an old Acer running XP and using MPLAB.
 

Thread Starter

Old Frank

Joined Jul 23, 2016
17
That type of problem is frequently experienced. Here is just one example: http://www.electro-tech-online.com/threads/mplab-ided-v-8-92-corrupted.148826/#post-1272370 WP100 is a very experienced user of PIC's and their programmers.

A clean install on a competent alternative PC is the easiest solution.

John
Tried MPLAB on old Acer with a 12HV752 and got:
PICkit 3 detected
Connecting to PICkit 3...
Firmware Suite Version...... 01.28.90
Firmware type......................PIC18F
Downloading AP...
AP download complete
Running self test...
Self test completed
Firmware Suite Version...... 01.28.90
Firmware type......................Midrange
PICkit 3 Connected.
Target Detected
Target Device ID (00000000) does not match expected Device
ID (00001520).
I'll see what I can do to change the ID. This is where my inexperience really shows.
Frank
 

Kjeldgaard

Joined Apr 7, 2016
476
Here are some of my experiences with MPLAB (Ver. 8.xx) and ICD3.

Target Detected: Tells the ICD has detected the Vdd supply is connected.
Device ID Revision = 0000000x: PGC and PGD are connected and the ICD can communicate with the target.
Target Device ID (0000xxx0) does not match expected Device ID (0000yyy0): There are breaks or shorts on the PGC and/or PGD connections.
 
Top