Pickit 3 with PIC 12F629 not Programming

t06afre

Joined May 11, 2009
5,934
Do you have any components connected to the VPP/MCLR pin? If so remove this and only connect the programmer to this pin, during programming. Shot in the dark but it should be simple to test
 

RG23

Joined Dec 6, 2010
304
i am able to connect with MPLAB IPE and MPLAB x-IDE.

but whenever i try to program it says the pickit failed to program device.. ??!!
_______________________________________________________________

you said you are able to connect with MPLAB

whats the error number you see in MPLAB when you try to program???
 

RG23

Joined Dec 6, 2010
304
If you think theres something wrong with your pickit3 then try pickit2 if you have one

Try to isolate the problem first if its the program or pickit
 

Thread Starter

amitr12345

Joined Jun 17, 2013
37
No error number, just what i attached earlier at the post.

I dont have a pickit 2.

My feeling is that if blanking the mcu, some how it blocks programming
 

Thread Starter

amitr12345

Joined Jun 17, 2013
37
i will send the build.

but a quick question that may prove a point.
if i want in all memory range to put 1's.
I load MPLAB IPE program, fill memory with 1's and programming should work, but this doesn't work, so my assumption is that the code isn't the problem.

are there critical memory segments that when erasing memory can render the 12f629 useless ?
 

t06afre

Joined May 11, 2009
5,934
Is it any other components connected to your PIC. Besides the programmer during programming? Can you test with another PIC. And just write a very simple program
 

tshuck

Joined Oct 18, 2012
3,534
i will send the build.

but a quick question that may prove a point.
if i want in all memory range to put 1's.
I load MPLAB IPE program, fill memory with 1's and programming should work, but this doesn't work, so my assumption is that the code isn't the problem.

are there critical memory segments that when erasing memory can render the 12f629 useless ?
Writes to the configuration word should be monitored closely, with a single bit potentially bricking the device. It is possible you wrote a test that set the code protect bit, in which case, you made yourself a new decoration in the IC graveyard...
 

t06afre

Joined May 11, 2009
5,934
Writes to the configuration word should be monitored closely, with a single bit potentially bricking the device. It is possible you wrote a test that set the code protect bit, in which case, you made yourself a new decoration in the IC graveyard...
I was under impression that a bulk erase would fix this problem on a F version PIC. A bulk erase at least under MPLAB. Is done by
Toolbar-> programmer -> "Erase flash device"
After this the device under programming must be go through power on cycle. But then the chip should be virginal.
 

Thread Starter

amitr12345

Joined Jun 17, 2013
37
I should check If cp enabled means 1's or 0's.
everything is zeros in my mcu.

If 0 gets cp enabled then i bricked it.

If not then i still have to check
 

tshuck

Joined Oct 18, 2012
3,534
I was under impression that a bulk erase would fix this problem on a F version PIC. A bulk erase at least under MPLAB. Is done by
Toolbar-> programmer -> "Erase flash device"
After this the device under programming must be go through power on cycle. But then the chip should be virginal.
For the newer ones, that should be true, provided I've does a bulk erase... not sure about this one. There are some fringe errors floating about, here's is one person's solution to an odd error.
http://www.electro-tech-online.com/microcontrollers/38143-pic-code-protection-read-0x00-2.html
 

Thread Starter

amitr12345

Joined Jun 17, 2013
37
works..

how ?? i hope this helps others, i have being working for a week to solve my issue, and maybe (high probability) this will happen to others.

the problem was...

Mistake number 1:
Vdd from chip to pickit
CLK from chip to pickit
both of them i used very low diameter wires.. the resistance (low diameter, high resistance) was enough to make the current too low, enough for it to say "Programming failed" ! and when reading giving all 0's.

mistake number 2 :
the pins that entered the pickit3 were too short (by a millimeter maybe, i cut them incorrectly), therefore made the contacts not sit tight

Autodeduction:
don't put a "too low" wire diameter and make sure the pins enter and sit tight in the pickit socket.

hopes it helps for the next person who comes along with my problem.

END THREAD (-:
 

ErnieM

Joined Apr 24, 2011
8,377
I doubt the wire gauge was an issue,there just isn't enough current for the gauge to matter.

I always use pins like these to attach the PICkit and I never have connection problems:


They come in 40 pin strips, just snap off as many pins as you need.
 

tshuck

Joined Oct 18, 2012
3,534
I doubt the wire gauge was an issue,there just isn't enough current for the gauge to matter.

I always use pins like these to attach the PICkit and I never have connection problems:


They come in 40 pin strips, just snap off as many pins as you need.
+1, I use these and have never had problems...
 

ErnieM

Joined Apr 24, 2011
8,377
Funny, I actually read the first post of this thread today thinking it was a new one...

Did anyone else notice the first post "schematic" had data and clock swapped?
 

Thread Starter

amitr12345

Joined Jun 17, 2013
37
the schematic was mismatched, while the real wiring was ok, my mistake..

anyway, with a 30 AWG there won't be any problem, i used a thin wire used for coils, that's what made the gauge matter to the current.
i am sure of it, since the new 30 AWG wire fixed the problem. i changed only the Vdd and CLK.

i used the pins u r showing, but i had long ones so i cut them a bit too much.

i have ordered 30AWG wires and thoses pins from china, no more problems for me.

thnx
 
Top