PDA

View Full Version : ICSP Newbie



Mark Scotford
- 28th April 2005, 06:57
Going over from EPROM Pics to FLASH devices for deveopment, need a little help please. I bought a ELNEC Pikprog+ ICP programmer for this purpose, I 've isolated the VPP from the Reset circuit using a diode, have not used the RB6+7 pins for anything else, the bit I don't understand is the resistor shown in the Microchip guide on ICSP programming. It shows a resistor connecting VDD of the PIC to the supply voltage, I presume this is to allow the programmer to raise and drop the supply voltage to the PIC, when it is verifying. My question, is this resistor left in circuit once the PIC has been programmed? if so what is a safe value to use for this resistor? would a diode not be a better solution? TIA

mister_e
- 28th April 2005, 07:08
in my case i never use that method as Microchip suggest. what i use is something like this (http://www.melabs.com/support/icsp.htm). Not much.

BigWumpus
- 28th April 2005, 07:34
I have managed to use ICSP in my current devices.

I take a 100K-resistor from VDD to MCLR, so I can connect ICSP to MCLR direct.
RB6 and RB7 are connected to the ICSP and have 100K Pullups for normal function of the device.

100K are like isolation for the signals.

5V is connected through a 1N5818 to the PICs VDD, and this signal is connected to ICSP.

garret
- 28th April 2005, 13:28
AS always, simplicity is the nicest of methods.
Do a search for melanies icsp attachment. You will find it in this forum and it demonstrates simplicity and effectiveness.
I've triedit and use it almost all the time...

Mark Scotford
- 30th April 2005, 23:51
I took time to search for Melanies ICSP method, and I think it maybe too simple for my programmer. If I understand things correctly, my programmer raises and lowers the VDD to my PIC (but cannot, because I have hard wired my PIC's VDD, to the supply rail, and is clamped to +5V by my 7805 regulator), to verfiy after programming, that the code has "taken" with all possible supply voltages (I only ever use +5V, but try telling my ELNEC programmer that). When ever I try using the ICSP set-up I am currently using, my ELNEC programmer comes back saying that programming could not be verifyed correctly, and I presume this is because of this VPP raising/lowering problem I have been talking about. ELNEC have told me to consult the Microchip data sheet on ICSP programming, and this is where this thread originates from, can any body help me on this with the correct implementation of the Microchip ICSP protocol/method etc??0

mister_e
- 1st May 2005, 01:44
BTW there's no reason to take your VDD from your programmer.

In your programmer software, you should be able to disable some tests like voltage testing (at xyz voltage(s)).

Did you try to erase the device before programming?

Is this programmer have also an ISP connector?

Melanie
- 1st May 2005, 08:44
>>I took time to search for Melanies ICSP method, and I think it maybe too simple for my programmer.

Are you saying that because something is 'simple' it shouldn't work? I use Elnec although a different model... the software however is probably the same... When you Click PROGRAM DEVICE... select DEVICE OPERATION OPTIONS... therein you will be able to select your Verify and Voltage options.

>> If I understand things correctly, my programmer raises and lowers the VDD to my PIC (but cannot, because I have hard wired my PIC's VDD, to the supply rail, and is clamped to +5V by my 7805 regulator)...

This is the equivallent of "I have my Ferrari tied to a 1 ton concrete block and I can't reach 100mph in 6.5 seconds anymore - can anyone suggest what I can do?".

So you KNOW what your problem is... don't waste time looking for non-existant solutions to a problem you are clearly aware of. If you have VDD on your PIC strapped directly to the +5v rail without a blocking Diode, you are effectively telling the Elnec to power your entire PCB... you're lucky it's not tripping an "Overcurrent Error". No wonder you're getting a Verify failure!

Mark Scotford
- 2nd May 2005, 22:57
Sorry, no offense meant

Melanie
- 3rd May 2005, 01:43
None taken. Just stating facts. I welcome people pulling my schematics or code apart - I can learn from that as much as anyone else.

Mark Scotford
- 5th May 2005, 01:04
Does the forward voltage drop of the PIC's supply isolating diode not cause any problems?

Melanie
- 5th May 2005, 09:00
Since I don't know what you're doing with your 5v rail, it's impossible to comment. If you're running ADC's and VRef is strapped to Vdd then sure you will have to compensate for that in your design.

Life is a compromise.

It all depends what you're building. If it's a one-off prototype for your own play, then shove a DPDT switch or Relay on the board instead of my Diode solution. Ugly, but no losses there (other than in PCB Real-Estate and Money). If it's a production PCB, then what are you doing with ICSP anyway?... you're just adding unnescessary expense, and if you must, then as I previously said, you will have compensated in your circuit design appropriately.

EDWARD
- 7th May 2005, 09:19
icsp is good for future upgrades if the pic isnt removable.

also, i read somwhere in here that some people just use a jumper to go into program or execute mode. looks nice and people wont mess with that like they might a button.

melanie sure shoots em down.