The connections made in this order on the connector ensure that it does not matter if the connector is inserted incorrectly, as GND and VCC are applied to the clock and data. If VCC and GND were located at opposite ends of the connector, it would create a problem. The Vpp pin connects to the reset input of the PIC microcontroller labeled MCLR. During programming or verification, this signal is raised to the programming voltage (13.5V) or VCC + 3.5V. This indicates to the microcontroller that programming or verification is about to begin and, for older models, supplies necessary current. Notably, older PIC microcontrollers used this line to directly power the programming circuit that updates the flash memory, necessitating a current supply. In contrast, newer models that support Low Voltage Programming (LVP) generate the programming voltage internally, meaning the Vpp signal from the PIC ICSP only serves as an indicator and does not need to supply current. This connection may also provide power to the board, typically using a 5V regulator, such as a 7805. This allows for prototype board development without requiring an additional power supply, only needing a power brick for the PIC programmer circuit. However, the programmer circuit may not be optimized for the specific circuit, which could introduce noise. If the programmer employs a 78L05, the maximum current output is limited to 100mA. The data (PGD) and clock (PGC) signals are crucial for operation as data is transmitted to the PIC microcontroller. Data is sent as either high or low voltage (0/1), and after a suitable duration, the clock transitions from low to high, clocking the data into the microcontroller. It is important to note that PIC microcontrollers are shipped with LVP enabled, allowing the use of a new chip in LVP mode. Changing this mode requires a high voltage programmer. The diagram from the PIC ICSP application note DS33023A specifies that RB6 and RB7 should be isolated, but this is circuit-dependent. To ensure correct programming and verification, two 10k resistors isolate the programmer and RB6 and RB7 from the rest of the circuit, preventing signals from interfering during programming. Without these isolation resistors, loading or driving the pins could halt programming entirely. For instance, connecting an LED to RB6 (PGD) that draws 20mA can pull the output voltage too low, preventing the PIC ICSP programmer from reading the desired voltage, resulting in a verification failure.
The described circuit involves a connection scheme for programming a PIC microcontroller using an In-Circuit Serial Programming (ICSP) interface. The arrangement allows for flexibility in connector orientation, mitigating the risk of incorrect connections that could damage the microcontroller. The Vpp pin's role in supplying programming voltage is critical, particularly for older PIC models that require external current for programming. This aspect emphasizes the importance of understanding the specific needs of different microcontroller versions, especially when transitioning to newer models that utilize internal voltage generation.
The use of a 5V regulator, such as the 7805, is a practical solution for powering prototype boards. However, it is essential to consider the limitations of the power supply and the potential for noise interference, which can affect the performance of the circuit. The maximum current output of 100mA from a 78L05 regulator must be sufficient for the intended application, and careful design considerations should be made to avoid overloading the programmer circuit.
The data and clock signals (PGD and PGC) are fundamental to the programming process, with the timing of the clock signal being critical for successful data transmission into the microcontroller. The note regarding the default LVP mode for newly shipped PIC microcontrollers is a vital consideration for users, as it simplifies the initial setup process but may require adjustments for specific programming needs.
The inclusion of isolation resistors is a necessary design feature to prevent interference during programming. This precaution is particularly relevant when external components, such as LEDs, are connected to the programming pins. The described scenario where an LED draws excessive current illustrates the potential pitfalls of neglecting isolation, which can lead to programming failures. Overall, the circuit design must be approached with an understanding of the microcontroller's requirements, the characteristics of the programming interface, and the need for isolation to ensure reliable operation.With the connections made in this order on the connector it will not matter if the connector is placed the wrong way round as GND and VCC are then applied to clock and data. If VCC and GND had been at opposite ends of the connector then there would be a problem. Vpp connects to the reset input of the pic microcontroller labelled MCLR. During programming or verify this signal is raised to the programming voltage (13. 5V) - or VCC+3. 5V. This signals to the microcontroller that programming/verification is about to start and for older parts, supplies current. Note: Older pic micros used this line to directly power the programming circuit that updates the Flash memory.
So this connection had to supply some current. With the newer parts that allow LVP (Low Volt programming) the programming voltage is generated internally so the Vpp signal from the pic ICSP is only used as an indicator i. e. it doesn`t have to supply current. This connection may supply power to your board - usually using a 5V regulator (probably a 7805). This is ok for some use as you can develop a prototype board without needing any other power supply (just a power brick that plugs into the pic programmer circuit).
The only problem with it is that the programmer circuit is not designed for your circuit (does it have a heatsink) and it can also introduce noise to your circuit. If the programmer uses a 78L05 then you will only get 100mA maximum current output. These are the signals that do the work. Data (PGD) and clock (PGC) transmit data to the pic micro. First data is sent either high or low voltage (0/1). After a suitable time the clock is strobed low to high - rising edge clocking the data into the microcontroller.
Note: PIC microcontrollers ship with LVP enabled - so if you use a brand new chip you can use it in LVP mode. The only way to change the mode is by using a high voltage programmer. Note that the diagram from pic ICSP application note `DS33023A` specifically goes out of its way to not design it for you saying RB6 and RB7 should be isolated but this depends on your circuit!
This is not very helpful so I have included the circuit I use on my development board (See the diagram shown earlier): To ensure you can program and verify correctly two 10k resistors isolate the programmer (and RB6 and RB7) from the rest of the circuit i. e. they stop signals at the other side from interfering with RB6 and RB7 during programming. If you don`t use the isolation resistors then loading or driving the pins can stop programming all together.
For example if you put an LED on RB6 (PGD) that draws 20mA when on. The output voltage (when the output is on) will be pulled so low that the pic ICSP programmer will not be able to read back the desired voltage i. e. it will give a verification failure. 🔗 External reference
This device listens to conversations and then interjects words and phrases at inappropriate times. I got this box at a local thrift store for $1.50. It has a nice hinged top and a place to insert a panel with...
The following circuit illustrates a stepper motor controller. This circuit is based on the PIC16F84A integrated circuit. Features: a transistor is utilized to drive the motor.
The stepper motor controller circuit employs the PIC16F84A microcontroller, which serves as the central...
The circuit illustrated is a typical configuration for the LM4916 two-channel amplifier. The left and right channel audio signals are fed into the LM4916, which amplifies them internally. The output is then delivered through a coupling capacitor (Co) to...
Spectrum-analyzer project 2007 update. Since the development of the wide-band VCO almost 10 years ago, the entire spectrum-analyzer project has progressed significantly.
The spectrum analyzer project initiated in 2007 focuses on the development and enhancement of a wide-band Voltage Controlled...
This device uses a PIC12F615 to implement a capacitor discharge ignition system. When the switch (button) is closed, the PIC sends pulses to the IRF644 MosFet creating high voltage pulses to charge the 1.0 uf/250 volt capacitor. The voltage...
The preamplifier circuit is designed to offer appropriate loading for phono cartridges with reluctance. It achieves a gain of approximately 25 dB at 1 kHz (converting an input of 2.2 mV to an output of 100 mV). The circuit...
We use cookies to enhance your experience, analyze traffic, and serve personalized ads.
By clicking "Accept", you agree to our use of cookies.
Learn more