Need PICkit2 interface to target PCB info.

Page: 12 > Showing page 1 of 2
Author
paulbergsman
Super Member
  • Total Posts : 1517
  • Reward points : 0
  • Joined: 2006/05/25 12:18:23
  • Location: Merion Station, Penna.
  • Status: offline
2008/07/23 16:16:09 (permalink)
3.25 (4)

Need PICkit2 interface to target PCB info.

Hello;

I have searched for a circuit, and/or info on what I need, to do the following without success.
If it has already been covered in another thread, please point me to that thread.

I want to use the PICkit2 to program 16F series PICs installed in the target circuits.

So, the question is this: can I program the 16F series parts without building the
"Sample Driver Board" in Application note TB016?


I am using an external clock Osc

I have installed a diode in series between the MCLR RC ckt, and the wire connecting PICkit2 and Target-board's Vpp I/O pins

I will limit programming to 5 volt Vdd

I can use the PCB's Power Supply. Do I need a circuit between the PCB power supply and the PICkit2's Vdd?

Thanks, Paul
post edited by paulbergsman - 2008/07/23 16:20:41

Paul Bergsman, N3PSO


For the most cost effective PIC prototyping board around:
http://mysite.verizon.net/vzes94mj/picprototypingboard
#1

25 Replies Related Threads

    PICkit2Dev
    Super Member
    • Total Posts : 994
    • Reward points : 0
    • Joined: 2006/09/27 08:41:47
    • Location: 0
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/23 17:23:57 (permalink)
    0
    Paul,
     
    Chapter 3 of the PICkit 2 User's Guide should provide all the needed information to connect to a PIC16 device in-circuit.
     
    It provides information on connecting PICkit 2 VPP and device MCLR, which you seem to already have nailed.
    PGC and PGD connect directly from PICkit 2 to the appropriate MCU pins.  Chapter 3 provides information on isolating using series resistors from any circuit connections to these pins which may interfere.
     
    Finally, directly connect PICkit 2 VDD and GND to your circuit power and ground. The PICkit 2 will automatically detect the power being provided by your circuit board.  Additionally, the Low Pin Count Demo Board and 44-Pin Demo Board schematics provide examples of simple connections.  The schematics for these demo boards are in the Appendices of the their respective User Guides.
    #2
    paulbergsman
    Super Member
    • Total Posts : 1517
    • Reward points : 0
    • Joined: 2006/05/25 12:18:23
    • Location: Merion Station, Penna.
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/23 20:10:39 (permalink)
    3.67 (3)
    ORIGINAL: PICkit2Dev

    Paul,

    Chapter 3 of the PICkit 2 User's Guide should provide all the needed information to connect to a PIC16 device in-circuit.

    It provides information on connecting PICkit 2 VPP and device MCLR, which you seem to already have nailed.
    PGC and PGD connect directly from PICkit 2 to the appropriate MCU pins.  Chapter 3 provides information on isolating using series resistors from any circuit connections to these pins which may interfere.

    Finally, directly connect PICkit 2 VDD and GND to your circuit power and ground. The PICkit 2 will automatically detect the power being provided by your circuit board.  Additionally, the Low Pin Count Demo Board and 44-Pin Demo Board schematics provide examples of simple connections.  The schematics for these demo boards are in the Appendices of the their respective User Guides.


    I thought I had to isolate the target board's Vdd from the PICkit2 Vdd, to protect the target boards power supply from the higher programming voltage (+13volts).

    If I do not need anything else, what is the purpose of the "sample driver board circuit" in Microchip's Application Note: TB016?


    Paul Bergsman, N3PSO


    For the most cost effective PIC prototyping board around:
    http://mysite.verizon.net/vzes94mj/picprototypingboard
    #3
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/23 21:42:53 (permalink)
    3 (2)
    PICkit 2 (along with ICD 2 or similar) has limited driving capability. For example, if your boards have heavy load for Vpp line (say you have a 100nF capacitor) or you need a long cable (PGC/PGD line driving capability problem), then PICkit 2 will have problems. That is why Chapter 3 of the PICkit 2 user guide recommends some guideline for ICSP. Some programmers like Promate III will have better driving capability and can cope with this kind of situation better than prototype programmer like PICkit 2.

    The driver board is to improve the driving capability of the programmer.
    #4
    paulbergsman
    Super Member
    • Total Posts : 1517
    • Reward points : 0
    • Joined: 2006/05/25 12:18:23
    • Location: Merion Station, Penna.
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/24 03:49:01 (permalink)
    3 (2)
    ORIGINAL: xiaofan

    PICkit 2 (along with ICD 2 or similar) has limited driving capability. For example, if your boards have heavy load for Vpp line (say you have a 100nF capacitor) or you need a long cable (PGC/PGD line driving capability problem), then PICkit 2 will have problems. That is why Chapter 3 of the PICkit 2 user guide recommends some guideline for ICSP. Some programmers like Promate III will have better driving capability and can cope with this kind of situation better than prototype programmer like PICkit 2.

    The driver board is to improve the driving capability of the programmer.


    Thanks Xiaofan;

    But, the mid-range data-sheets says that if my target board is a large load, I should use the PICkit2 with the target board's power supply on.

    Then I read that some power supplies do not react well to voltages, above thier rated output.

    So, what interface should I use between the target board power supply, and the PICkit2?
    post edited by paulbergsman - 2008/07/24 03:51:49

    Paul Bergsman, N3PSO


    For the most cost effective PIC prototyping board around:
    http://mysite.verizon.net/vzes94mj/picprototypingboard
    #5
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/24 06:23:24 (permalink)
    2.33 (3)

    ORIGINAL: paulbergsman
    But, the mid-range data-sheets says that if my target board is a large load, I should use the PICkit2 with the target board's power supply on.


    This is because that PICkit 2 can not supply enough current to the target circuit.


    Then I read that some power supplies do not react well to voltages, above their rated output.

    So, what interface should I use between the target board power supply, and the PICkit2?


    This will depend on the PIC you are using. If you are using mid-range PICs like PIC12F675 which needs Vpp before Vdd, you may need to let PICkit 2 control the target voltage for those who use internal MCLR and internal RC oscillator. A trick is to use a jumper to isolate the chip. Not a very nice solution.

    For other PICs, you will have no problems, just connect the target Vdd to PICkit 2 target Vdd line.

    And take note ICSP is not always the best choice. For higher volume production, off-line programming using Gang Programmer or factory pre-programming are often better choice.
    #6
    paulbergsman
    Super Member
    • Total Posts : 1517
    • Reward points : 0
    • Joined: 2006/05/25 12:18:23
    • Location: Merion Station, Penna.
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/24 09:13:33 (permalink)
    3 (2)
    Hello Xiaofan;

    Thanks for the good information.

    I think I have sorted out all the interface requirements.  Except one, the target PIC's Vdd.

    The data sheet, and application note, both say that if there is a large load on the target PIC, then use the target circuit's power supply.

    They show a small resistor in series with the target PIC's Vdd I/O pin.
    But, the value of that resister is never given, nor can I locate a discussion on how to determine it's value.


    For other PICs, you will have no problems, just connect the target Vdd to PICkit 2 target Vdd line.


    My target PIC's power supply, Vdd,  is  +5 volts. 

    The PICkit2 generates voltages above 5 volts.

    While my target board's power supply is ON:

    1) So, under the above conditions,  you think it is OK to just connect the PICkit2's Vdd line directly to the target PIC's Vdd ?


    This will depend on the PIC you are using. If you are using mid-range PICs like PIC12F675 which needs Vpp before Vdd, you may need to let PICkit 2 control the target voltage for those who use internal MCLR and internal RC oscillator. A trick is to use a jumper to isolate the chip. Not a very nice solution.


    2) So in that case, If I build, and use, the driver board as described in the application note, I should disconnect the target board's +5v from the target PIC's Vdd while programming with the PICkit2?


    And take note ICSP is not always the best choice. For higher volume production, off-line programming using Gang Programmer or factory pre-programming are often better choice.


    I understand, and agree, with what you are saying.
    Unfourtinatly, that kind of defeets a major reason for having ICSP, in-field code updates.

    Thanks
    post edited by paulbergsman - 2008/07/24 09:27:08

    Paul Bergsman, N3PSO


    For the most cost effective PIC prototyping board around:
    http://mysite.verizon.net/vzes94mj/picprototypingboard
    #7
    PICkit2Dev
    Super Member
    • Total Posts : 994
    • Reward points : 0
    • Joined: 2006/09/27 08:41:47
    • Location: 0
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/24 10:04:43 (permalink)
    5 (1)
    I thought I had to isolate the target board's Vdd from the PICkit2 Vdd, to protect the target boards power supply from the higher programming voltage (+13volts).


    PICkit 2 generates up to 12 Volts, depending on the device family, on the VPP/MCLR pin, not VDD.  VDD remains at the voltage set in the PICkit 2 Programmer application, or at whatever voltage the target is powering itself.  Forget TB016; to avoid confusion please reference Chapter 3 of the PICkit 2 User Guide for all PICkit 2 ICSP connectivety requirements.

    Note that the diode you put on the MCLR RC should protect your circuit from the high VPP voltage on this pin.

    For VDD, if your target has its own power, PICkit 2 will detect this and will not drive any voltage on the VDD pin.  However, the VDD must still be connected so the voltage clamps on the PICkit 2 programming signals limit their voltage swing to the target VDD.
    If you are powering your circuit from PICkit 2, it will only drive the VDD pin to the voltage specified in the application.

    MPLAB NOTES: When used with MPLAB IDE, PICkit 2 will only detect target power when first selected (or on a reconnect).  To prevent putting a voltage on a target normally self-powered target if it was accidently left unpowered, use Programmer > Settings  or Debugger > Settings in MPLAB 8.14 or later and check the "Always use target power." option.
     
     
    FYI, TB016 provides a schematic of a "driver board" to augment the current drive capability of the programmer's own VPP and VDD output drive, if these are insufficient for the application.  The VDD driver is designed as variable as production programmers should verify the device at both the minimum and maximum VDD (for example, 2V and 5.5V).  You should not need to augment the VDD/VPP drive capability of PICkit 2 unless your circuit is very unusual, or was not designed following the guidelines in Chapter 3 of the User Guide.
    post edited by PICkit2Dev - 2008/07/24 10:12:45
    #8
    biozen
    Senior Member
    • Total Posts : 122
    • Reward points : 0
    • Joined: 2004/10/09 09:00:47
    • Location: Agra, India
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/24 10:39:38 (permalink)
    5 (1)
    I think you are confusing between Vpp and Vdd. Vpp goes to 13V while programming.

    Vdd remains at 5V throughout (or whatever the board's external supply is). The Vpp goes straight to the MCLR/Vpp pin of the PIC (no resistors, diodes etc. in between). You then connect the Vpp pin to the board's 5V supply through a 10K resistor (typical value). So you have a 10K resistance between the 13V from PICkit2 and the 5V on the board. The Vdd of the PICkit2 connects to the target board's Vdd of 5V. So is the ground (Vss) of both.

    Hope this clears things up!


    Regards,
    Mohit Mahajan.
    www.BioZen.co.in
    www.aTroglodyte.com
    #9
    paulbergsman
    Super Member
    • Total Posts : 1517
    • Reward points : 0
    • Joined: 2006/05/25 12:18:23
    • Location: Merion Station, Penna.
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/24 15:10:12 (permalink)
    3 (2)
    OK, Now it is clear. 
    Thanks again.

    If, after leaving this post, I can rate your responce, I will with a +2.



    Paul Bergsman, N3PSO


    For the most cost effective PIC prototyping board around:
    http://mysite.verizon.net/vzes94mj/picprototypingboard
    #10
    paulbergsman
    Super Member
    • Total Posts : 1517
    • Reward points : 0
    • Joined: 2006/05/25 12:18:23
    • Location: Merion Station, Penna.
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/24 15:15:03 (permalink)
    3 (2)
    You are correct. It was not clear, from the data-sheet, that the PICkit2 would not introduce a voltage greater than +5v on Vdd. And the circuit shows a resistor, [no value] between the target PIC and Vdd.  Still don't know what the resistor does. But, I now know what I have to do to use ICSP with my prototyping boards.

    Both you and the moderator set me stright.

    thanks

    P.S. You earned two points too!

    I already thanked Xiaofan
    post edited by paulbergsman - 2008/07/24 15:17:26

    Paul Bergsman, N3PSO


    For the most cost effective PIC prototyping board around:
    http://mysite.verizon.net/vzes94mj/picprototypingboard
    #11
    biozen
    Senior Member
    • Total Posts : 122
    • Reward points : 0
    • Joined: 2004/10/09 09:00:47
    • Location: Agra, India
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/24 19:41:39 (permalink)
    1 (1)
    Still don't know what the resistor does.

    If it weren't there the 13V reaches the 5V. It drops 13V-5V = 8V.

    Regards,
    Mohit Mahajan.
    www.BioZen.co.in
    www.aTroglodyte.com
    #12
    paulbergsman
    Super Member
    • Total Posts : 1517
    • Reward points : 0
    • Joined: 2006/05/25 12:18:23
    • Location: Merion Station, Penna.
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/26 02:28:49 (permalink)
    3 (2)
    ORIGINAL: biozen
    Still don't know what the resistor does.

    If it weren't there the 13V reaches the 5V. It drops 13V-5V = 8V.


    What 13 volts.  In a previous post you said that PICkit2's Vdd output stays at 5 volts.
    So, why is there a resistor in series with the target PIC's Vdd pin and the target PCB's Vdd?
    post edited by paulbergsman - 2008/07/26 02:30:34

    Paul Bergsman, N3PSO


    For the most cost effective PIC prototyping board around:
    http://mysite.verizon.net/vzes94mj/picprototypingboard
    #13
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/26 18:48:35 (permalink)
    1 (2)
    You do not need to put a resistor between PICKit 2 Vdd and the target PIC's Vdd (on your PCB).

    What Mohit mentions is the pull-up resistor (about 10k) between Vpp/MCLR pin and Vdd on the target circuits to use the Power Up Reset function. This resistor will take the difference between Vpp (say 13V) and Vdd (say 5V).

    As PICKit2Dev said before, "you should not need to augment the VDD/VPP drive capability of PICkit 2 unless your circuit is very unusual, or was not designed following the guidelines in Chapter 3 of the User Guide".
    #14
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/26 18:51:50 (permalink)
    1 (1)
    If you are really concerned, you can put a fuse between PICkit 2's Vdd line and the Vdd on your PCB. Maybe the AN you read has a resistor to help protect the programmer.
    #15
    paulbergsman
    Super Member
    • Total Posts : 1517
    • Reward points : 0
    • Joined: 2006/05/25 12:18:23
    • Location: Merion Station, Penna.
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/27 04:14:55 (permalink)
    3.67 (3)
    Hello Xioafan;

    You do not need to put a resistor between PICKit 2 Vdd and the target PIC's Vdd (on your PCB).

    Yes, I know that. This responce does not address my question

    What Mohit mentions is the pull-up resistor (about 10k) between Vpp/MCLR pin and Vdd on the target circuits to use the Power Up Reset function. This resistor will take the difference between Vpp (say 13V) and Vdd (say 5V).

    Yes,  I know that.  It has been fully explained before. My question is not about the MCLR I/O pin.

    If you are really concerned, you can put a fuse between PICkit 2's Vdd line and the Vdd on your PCB. Maybe the AN you read has a resistor to help protect the programmer.

    The PICkit2 Programmer User Guide, and the PIC16F627 Data-Sheet, both show a resistor, [no value given], between the target PIC's Vdd I/O pin, and the target PIC's power supply.

    I was looking for an explanation as to what the resistor was for, and it's value.
    post edited by paulbergsman - 2008/07/27 04:29:18

    Paul Bergsman, N3PSO


    For the most cost effective PIC prototyping board around:
    http://mysite.verizon.net/vzes94mj/picprototypingboard
    #16
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/27 05:09:55 (permalink)
    1 (1)
    ORIGINAL: paulbergsman

    If you are really concerned, you can put a fuse between PICkit 2's Vdd line and the Vdd on your PCB. Maybe the AN you read has a resistor to help protect the programmer.

    The PICkit2 Programmer User Guide, and the PIC16F627 Data-Sheet, both show a resistor, [no value given], between the target PIC's Vdd I/O pin, and the target PIC's power supply.

    I was looking for an explanation as to what the resistor was for, and it's value.

     
    I am really confused. What is the resistor you are talking about?
     
    The following is from PICKit 2 User Guide 51553E. There is no resistor between PICkit 2' Vdd line and the target Vdd.
     
     
     

    Attached Image(s)

    #17
    Neiwiertz
    Super Member
    • Total Posts : 2046
    • Reward points : 0
    • Joined: 2004/09/01 02:58:52
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/27 06:31:12 (permalink)
    0
    Hello Paul

    I would like to stick this one here,
    A while ago i learned from your post here about the "man to machine" protection resistor http://forum.microchip.com/fb.aspx?m=342194
    Thats the explain for the 470E resistor shown at above post.

    But i am not being aware of the other resistor you meant, can't help yet about that one

    Flying With --|Explorer 16|HardWare|SoftWare|-- Fav(s) Gallery Lists
    #18
    PICkit2Dev
    Super Member
    • Total Posts : 994
    • Reward points : 0
    • Joined: 2006/09/27 08:41:47
    • Location: 0
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/27 11:10:06 (permalink)
    0
    A while ago i learned from your post here about the "man to machine" protection resistor http://forum.microchip.com/fb.aspx?m=342194
    Thats the explain for the 470E resistor shown at above post.

     
    No, this is not the reason for the 470K Ohm in the FIGURE 3-1 that Xiaofan posted.  In this case, that resistor or diode is to isolate the capacitor in the Reset pullup RC from the programmer VPP signal, which cannot drive much capacitance.
     
    Paul, would you post the document and figure number of the resistor you are asking about?  A picture of the figure would also be helpful.  Thanks.
    #19
    paulbergsman
    Super Member
    • Total Posts : 1517
    • Reward points : 0
    • Joined: 2006/05/25 12:18:23
    • Location: Merion Station, Penna.
    • Status: offline
    RE: Need PICkit2 interface to target PCB info. 2008/07/28 11:36:13 (permalink)
    3 (2)
    ORIGINAL: PICkit2Dev

    Paul, would you post the document and figure number of the resistor you are asking about?  A picture of the figure would also be helpful.  Thanks.


    PICmicro MID-RANGE MCU FAMILY REFERENCE MANUAL Pg 28-4, FIGURE 28-1

    Microchip Application Note, TB016, page 1, FIGURE1

    Paul Bergsman, N3PSO


    For the most cost effective PIC prototyping board around:
    http://mysite.verizon.net/vzes94mj/picprototypingboard
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2014 APG vNext Commercial Version 4.5