Electronicdesign 24878 Ifd2678 Promo

Program a PIC Processor In-Circuit Using a 3.3-V Supply

Dec. 6, 2018
In this Idea for Design, placing this circuit setup between the battery VDD bus and the PIC microcontroller allows you to execute in-circuit programming while protecting the application circuit.

Download this article in PDF format.

Many PIC processors require 5-V power while being programmed, yet battery-powered systems may contain low-voltage devices that will be damaged at voltages above their maximum voltage ratings. In addition, application circuits may draw more current than the programming device can source, so unpowered circuits operating on 5 V may require isolation between the programming device and the application circuit. These situations require isolation of the application circuit (and the battery itself, in some cases) from the 5-V programming-device voltage used to power the PIC while programming it.

Placing the circuit of Figure 1 between the battery VDD bus and the PIC microprocessor will isolate the battery and the other circuitry from the 5-V power provided for the PIC from the programming device, such as an ME Labs U2 programmer. When the programming device is disconnected, Q1 is biased on by the 100-kΩ resistor from gate to ground while Q2 is biased off due to zero volts between gate and source.

1. Adding this small circuit to a system using a PIC processor provides isolation of the low-voltage loads from the 5-V programmer voltage, yet has minimal impact on the normal operation of the system.

During normal operation, Q1 provides a very low-resistance connection (65 mΩ) from the 3.3-V battery to the PIC. Q2 provides a low-resistance path from the programming device to the PIC power pins when programming.

While the programming device is connected to the system, Q1 is biased off by the 5-V source in the device while Q2 is biased on. This isolates the low-voltage analog and digital circuits in the target system from the potentially damaging 5-V being sourced by the programming device. Q2 will not turn on if the application circuit is powered from a 5-V source, but it will turn on if the power source is 3.3 V or less while programming the PIC.

Note that applications using 5 V must be powered-down while programming if using this circuit. Though the 100-kΩ resistor doesn’t load the battery, there’s a small loading effect on the programmer’s 5-V source. This effect is too small to be significant during programming.

The typical in-circuit serial programming application circuit is available at the Microchip Technology site.1 In that design, the resistor between system’s VDD (battery-voltage levels) to the PIC VDD pins and ICSP connection will not provide good isolation from 5 V to the application circuitry. It also will not provide a low-resistance path from system VDD to the PIC, if the PIC is driving relatively high-current loads of tens of milliamps.

2. The added isolation circuit requires only three components: Q1, Q2, and R1.

However, with this design, the programming voltage is completely isolated from the application circuit, while providing a low-resistance connection from the battery to the PIC during normal system operation (Fig. 2).

Dave Conrad, a retired electronics engineer, creates innovative light-show systems using LED or video displays, and also does some contract consultation.

Reference:

1. Microchip Technology, “In Circuit Serial Programming App Note DS31028A,” page 28-4, Figure 28-1.

Sponsored Recommendations

The Importance of PCB Design in Consumer Products

April 25, 2024
Explore the importance of PCB design and how Fusion 360 can help your team react to evolving consumer demands.

PCB Design Mastery for Assembly & Fabrication

April 25, 2024
This guide explores PCB circuit board design, focusing on both Design For Assembly (DFA) and Design For Fabrication (DFab) perspectives.

What is Design Rule Checking in PCBs?

April 25, 2024
Explore the importance of Design Rule Checking (DRC) in manufacturing and how Autodesk Fusion 360 enhances the process.

Unlocking the Power of IoT Integration for Elevated PCB Designs

April 25, 2024
What does it take to add IoT into your product? What advantages does IoT have in PCB related projects? Read to find answers to your IoT design questions.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!