Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PicKit2 Errors

Status
Not open for further replies.

Steve311

Member
Hi All; I am having difficulties with my PICkit2 programmer. #1 is i get Vdd voltage error and it says "no device found" or "unsupported device"....I am using a PIC16F88 and I have programmed many times with it. I thought it was my laptop at first, so I tried on another computer and it still had the errors....then I thought it was my pickit so I actually purchased another one and I still cant communicate with the PIC.

Ive gone through the troubleshooting guide using the Pickit2 software and everything seems fine. I also bought 5 new PICs and none of them can be read. I am getting the error in both MPLab as well as the Pickit2 software...

Any IDeas???
 
So, you've tried different computers, different PICkit2 devices, different PIC chips? What do you have in common with all? I would assume being a PICkit2 you're programming in serial? I myself have the (By Bill from Blueroomelectronics). I use the Junebug in conjunction with the PICkit2 software. In my case the target device circuit must be fully powered before the PICkit2 software allows for Reading/Writing from/to the PIC.

With the Junebug you must keep the ribbon wire between the PIC (target) circuit and the Junebug as short as possible. Does the genuine PICkit2 have this cable? If so, is this cable still fully functional?
 
Open the PicKit2 software, reflash the PicKit2 firmware with the newest version (even if it's already installed). Strip your prototyping board to just the chip to be programed (PIC16f88) and ICSP connections. Verify Vpp goes to the right pin, PGD, PGC and so on. Tie PGM low (Pin 9 on DIP packaged version). Now try to program your code, or to read from the chip.

Can you post a picture of your programming setup?
 
  • Like
Reactions: 3v0
Thanks for your responses--

SPDCHK/TTX71CM - I am using very short wires soldered to a breakout which fits both my proto board and PICKit2. I have made 3 different harnesses (as I used to have muh more success in the past with programming) and those too seem to make no differece. I have deleted both the PICKIT2 and MPLAB programs off of my computer and downloaded the latest versions directly from Microchip. I also re-loaded the newest OS system for the PICKIT2 in bith its software and in MP Lab. I am completely stumped. Very aggravating. Any other ideas?
 
Did you try pulling PGM (Pin 9) low?

Straight from the datasheet:
4: RB3 should not be allowed to float if LVP
is enabled. An external pull-down device
should be used to default the device to
normal operating mode. If RB3 floats
high, the PIC16F87/88 devices will enter
Programming mode.
5: LVP mode is enabled by default on all
devices shipped from Microchip. It can be
disabled by clearing the LVP bit in the
CONFIG1 register.
 
Check that all of your connections are correct. Vcc, gnd, and the 2 programming pins must be connected between the PICkit 2 and the PIC. The PICkit 2 is extremely reliable and shouldn't give you any problems. Even if the target board is powered, the Vcc connection to the PICkit must be made.
 
If you manage to program your chips just once then it is probably the code that is stopping them being reprogrammed/read. This happens if the timer1 oscillator is enabled in code. The way around this is to insert a new pic and let the pk2 identify it. Then swap in a "broken" chip and immediately erase it.

In your code make sure you never set bit 3 of T1CON when using a 16F88.

Mike
 
Pommie - I think you are right....I am able to program a brand new PIC one time, then I cannot read or write to it thereafter....however I don't write to the timer1 at all...Its just a basic ADC converter outputs an 8bit decimal. I was able to program the same code just a few weeks back. Now i am baffled. ....

It does seem very odd that for a new pic, I can program it correctly but am unable to read/write to it after...??
 
Do you have code protection enabled by chance? That wouldn't affect writing to the PIC but it would affect reading it.
 
Last edited:
Pommie - I think you are right....I am able to program a brand new PIC one time, then I cannot read or write to it thereafter....however I don't write to the timer1 at all...Its just a basic ADC converter outputs an 8bit decimal. I was able to program the same code just a few weeks back. Now i am baffled. ....

It does seem very odd that for a new pic, I can program it correctly but am unable to read/write to it after...??

Are you able to post the code?

One thing to try is to put a delay at the start of your code to allow time for the chip to get into programming mode before the code starts executing. Place it just after you write to OSCCON so it is running at the correct speed and then move it down until you find where it fails.

BTW, does the "hot swapping" to erase work?

Mike.
 
Last edited:
Just checked the data sheet and if you are writing to OSCTUNE in bank zero you could be enabling the timer1 oscillator.

Mike.
 
Thanks for your responses guys, I appreciate it. This code is known good. I have used it numerous times in the past. I will post the code when I get back to my house later on tonite for review.

One thing I do notice is that sometimes, when i go to read the PIC through the pk2 software, "code protect" will pop up and then all registers read "0000"....and I never use code protect nor do I want to. I think the software is putting the PIC into some weird intermittent programming state.

I will try putting a delay loop right after I write to OSCCOn and see if that helps at all...

Thanks again guys and I will post the code later on.
 
Hello Again All; So thought about it and it doesn't matter if I post my code or not. I know this code works, it has worked in the past and no changes have been made. I will outline exactly whats going on:

1) No device found - I have seen this in the past but not this frequently. I am lucky if I can get a device to be read or recognized 1 out of 20 times.
2) If i am able to program, (either by MPlab or by pk2 Hex file), then I go to read what is on the PIC to verify the checksum, the software normally says "no device detected"....or if it is detected, then it will sometimes go into "code protect" and all registers read 0000.
3)then I am likely never able to read or write to that PIC again correctly. This happens instantly even with brand new PICS.

and again, this happens to the PICS no matter what program I try to write to it.

I am sick and tired of spending all of this troubleshooting time and money between buying new PICS, Pickit2, trying new USB cables, Different computers and always downloading updates and latest revisions for the .NET program, MPlab ide and the Pk2 software.

Please Help!
 
It would help if you answered some of the questions that have been asked.

Does the method I suggested to erase the chips work?
Have you checked you are writing to OSCTUNE in the right bank?
Did a delay loop help?

From the symptoms you describe I'm pretty sure that you are enabling timer1 oscillator. Maybe an indirect address is going wrong. Without seeing the code it is very difficult to guess.

Mike.
 
Hi Pommie - Attached is my code. I have yet to try the delay loop but I think it is definately worth a shot. One thing I do notice, is once I am able to burn a PIC16f88 the initial time, then when I go to read or write to it again, I am pretty sure the Config Settings on the PICkit2 software are changing and the PIC is going into protect mode....I dont know if that is any insight or not....

Thanks again for your responses...Highly appreciated.

Steve
 

Attachments

  • Analog to Digital Conversion Revision 1.asm
    6 KB · Views: 230
Pommie - And to answer your other questions.....I am unfimiliar with "hot swapping" to erase.... (unfortunately I am an RF engineer and can only play with PICs half of my free time)...so my knowledge is limited.....Could you please advise on this technique?

And I am not writing to OSCTUNE.... However I am writing to OSCCON....Take a look if you would....

Also..
 
Dear Steve311

I have the same problem for years "Voltage Level Error".What I did is I applied 5V to the target ZIF socket from a separate power supply.

Also note there are some PIC's that it will generate "no device found" after couple of times programmed.You cannot never get into programming mode.So better go off for a new PIC.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top