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.

WinPicProg what does this mean?!?

Status
Not open for further replies.

2camjohn

Member
OK This is one for Nigel probably, as he wrote WPP, but if any info from anyone is appreciated.

I am programming one of my SMT boards, this has always worked fine but this time its bringing up errors.
The programmer still works with my DIP pics, I dont have another SMT board here at the moment to try...



Here's what happens...

Sometimes it writes to program memory but then fails verification at adress 0x00

Sometimes it stops straight away without writing to memory.

When i read from the chip it has the code on the chip, but the fuses and oscillator options are all wrong.


If anyone can offer help on this, such as what part of my circuitry may be at fault, or the nature of the error, I would greatly appreciate it.

John
 
2camjohn said:
OK This is one for Nigel probably, as he wrote WPP, but if any info from anyone is appreciated.

I am programming one of my SMT boards, this has always worked fine but this time its bringing up errors.
The programmer still works with my DIP pics, I dont have another SMT board here at the moment to try...



Here's what happens...

Sometimes it writes to program memory but then fails verification at adress 0x00

Sometimes it stops straight away without writing to memory.

When i read from the chip it has the code on the chip, but the fuses and oscillator options are all wrong.


If anyone can offer help on this, such as what part of my circuitry may be at fault, or the nature of the error, I would greatly appreciate it.

The verify at address 0x00 error is almost always caused by the PIC not getting switched to programming mode - usually caused by too little voltage on the MCLR pin.

If you're programming in-circuit, how long are the total connections from programmer to PIC? - the normal hardware isn't designed for ICSP, and will only work with VERY short connections (due to the passive pull-ups on the lines).
 
Thanks for the quick response Nigel.


I just checked and during programming Im getting just over 13V on the MCLR pin. Im using 2 9V batteries...

The programming lines are about 15cm long, I will try cutting them down...

All the connections from programmer to PIC are fine.. Nothing appears to be wrong with the board...


What is confusing me is that this setup has worked before for ICSP without any problems...
And that it appears to be able to program the code, just not the fuses!!!




Any more suggestions?


Many thanks
John
 
Do you have a diode connected to the MCLR pin, so as to isolate its programming 13v from the 5v the rest of the board is getting?
 
Bonxer:
The MCLR pin is already isolated as it is not used in the circuit, it is only used when programming.





Everyone:


The programming lines are now 5cm long.

I have doubled the programming delay to 20.

But Im still getting the same problem!!
I am able to read the chip and erase the chip without problems.
When I read the chip it shows the correct code, but the fuses are always wrong.
I can write code to the chip (although it always fails verification at 0x000)
I can verify the chip using the verify button and it gets to config fuses before it fails with Config fuses verify error (as the fuses are incorrect)

Any more suggestions??
Please bear in mind Im still a relative noob so if you can think of anything I might have done wrong, no matter how simple or obvious please let me know...
John
 
2camjohn said:
Any more suggestions??
Please bear in mind Im still a relative noob so if you can think of anything I might have done wrong, no matter how simple or obvious please let me

What PIC are you trying to program?, and what version WinPicProg do you have?.
 
OK I just tried the new version...

And it still gives the same errors.

Whats annoying now is it gives errors with both SMT and DIP chips...
With both the old and the new versions of the software!

Just realised I hadnt set the hardware up properly in the new beta program. It now programs the DIP chips properly again...



But anyway, with the beta software set up properly, it still wont program my SMT board.


Any suggestions appreciated..

John
 
Is there anything else connected to RB7 & RB6 (the serial lines) ...
Also what's RB3 (LVP) connected to ?

scematic ?
 
i'm assuming the sm pic is already mounted on the target pcb. in wich case power and mclr are shared between target project & programming - do you have a scematic to show how they're connected ?
especially power ... when you use the programmers power line to power the pic it may also feed other devices on the target board - if the load gets too much it might not get to required voltage.
 
Alot of parts of the circuit arent attached yet.. so the bits remaining are very simple...


VCC goes to the + of the voltage regulator
GND goes to the GND of the voltage regulator
The input of the voltage regulator isnt connected.

A couple of the pins (that arent to do with programming) go through 1k resistors then through LEDs to GND, a couple of pins (that arent to do with programming) go through 1k resistors then the B-E junction of a transistor, to GND.

Two decoupling capacitors go from VCC to GND (one near the PIC one near the regulator) thats it!
Nothing else is connected yet.

Can choosing the wrong value for decoupling capacitors mess up the programming??
Im usually very careful, but this time I used some ones that I had found on the floor :oops: I didnt think it would make alot of difference???
Does it???

Cheers
John
 
OK just checked and the decoupling capacitors are the same!

So its not that!

I have a SMT board here that I programmed several days ago and is working. I dont wanna try and program it again incase I mess it up.
But at the same time I do want to try it to confirm it is this board that is broken and not something else!!
:cry: :cry: :cry:
 
I suppose at worse case, you could desolder your SMT device, solder on small wires directly to the required pins, and then plug those wires into your programmer. That would remove the possibility of anything wrong with the circuit itself causing problems. Yuck, I know, but sometimes it comes down to it. :)
 
Sorry! - I've been out! - back again now!.

I would suggest getting the connections between programmer and target board absolutely as short as you can - under an inch if you can manage it!. Failing that, try decreasing the value of the pullup resistors on the programmer board - lower resistors, more current, faster pullup.

I did a special ICSP version of WinPicProg (using specific hardware, with active high's rather than pullups) last year for a guy - he was struggling with leads over an inch long, lower pullups helped the situation a bit.
 
Shielded cable helps a lot also.

Did you try to measure VCC when programming?
It's connected to the output of your voltage regulator, and the regulator's input is unconnected. This may cause 'undefined behaviour', the v-reg may pull VCC down because your programmer is feeding it's output.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top