Content deleted Content added
m typos |
→See also: grammar |
||
(35 intermediate revisions by 13 users not shown) | |||
Line 1:
{{More citations needed|date=November 2022}}{{Short description|Embedded system programming technique}}▼
{{Use American English|date = March 2019}}
▲{{Short description|Embedded system programming technique}}
{{Use mdy dates|date = March 2019}}
[[Image:Isp headers.svg|thumb|6- and 10-pin AVR ISP headers]]
'''In-system programming''' (ISP), or also called '''in-circuit serial programming''' (ICSP), is the ability of
== Overview ==
There is no standard for in-system programming protocols for programming [[microcontroller]] devices. Almost all manufacturers of microcontrollers support ISP, but all have implemented their own protocols, which often differ even for various devices from the same manufacturer. Up to 4 pins may be required for implementing a [[JTAG]] standard interface. In general, modern protocols try to keep the number of pins used low, typically to 2 pins. Some ISP interfaces manage to achieve the same with just a single pin. Newer [[ATtiny]] microcontrollers with UPDI can even reuse that programming pin also as a [[general-purpose input/output]].<ref>{{Cite web |title=Unified Program and Debug Interface (UPDI) High-Voltage Activation Information - Developer Help |url=https://developerhelp.microchip.com/xwiki/bin/view/software-tools/programmers-and-debuggers/avr-updi-info/ |archive-url=https://web.archive.org/web/20241007021157/https://developerhelp.microchip.com/xwiki/bin/view/software-tools/programmers-and-debuggers/avr-updi-info/ |archive-date=2024-10-07 |access-date=2024-12-17 |website=developerhelp.microchip.com |quote=Shared UPDI pin. This implementation is generally used on devices with smaller packages. The UPDI pin can be re-configured into a GPIO or /RESET pin. In this case, the UPDI functionality is disabled, and a high-voltage source is required to re-enable it. Examples include tinyAVR 0-series, 1-series, and 2-series devices.}}</ref>
The primary advantage of
Microcontrollers are typically soldered directly to a printed circuit board and usually do not have the circuitry or space for a large external programming cable to another computer.
Line 15 ⟶ 16:
== History ==
Starting from the early
Microcontrollers that support ISP are usually provided with pins used by the serial communication peripheral to interface with the programmer, a
When designing electronic boards for ISP programming, it’s necessary to take into account some guidelines to have a programming phase as reliable as possible. Some microcontrollers with a low number of pins share the programming lines with the I/O lines. This
== Industrial application ==
In-
In the first method, a connector is manually connected to the programmer. This solution expects the human participation to the programming process that has to connect the programmer to the electronic board with the cable. Hence, this solution is meant for low production volumes.
The second method uses [[
In production lines, boards are placed on a bed of nails called a [[Test fixture|fixture]]. The latter are integrated, based on the production volumes, in semiautomatic or automatic test systems called [[Automatic test equipment|
== Microchip ICSP ==
For most Microchip microcontrollers, ICSP programming is performed using two pins, clock (PGC) and data (PGD), while a high voltage (12 V) is present on the Vpp/MCLR pin. Low voltage programming (5 V or 3.3 V) dispenses with the high voltage, but reserves exclusive use of an I/O pin.
# Voltage is briefly applied to the MCLR (master clear) pin.
# A 32-bit key sequence is presented on PGD.
Line 45 ⟶ 46:
# '''USB cable''' - Small and light weight, has support for voltage source and most computers have extra ports available. The distance between the circuit to be programmed and the computer is limited by the length of USB cable - it must usually be less than 180 cm. This can make programming devices deep in machinery or cabinets a problem.
ICSP programmers have many advantages, with size, computer port availability, and power source being major features. Due to variations in the interconnect scheme and the target circuit surrounding a micro-controller, there is no programmer that works with '''''
PICs are programmed using five signals (a sixth pin 'aux' is provided but not used). The data is transferred using a two-wire synchronous serial scheme, three more wires provide programming and chip power. The clock signal is always controlled by the programmer.
Line 53 ⟶ 54:
=== Signals and pinout ===
[[File:pic icsp.jpg|thumb]]
* ''' V<sub>pp</sub>
* ''' V<sub>dd</sub>
* ''' V<sub>ss</sub>
* ''' ICSPCLK
* ''' ICSPDAT
* ''' AUX/PGM
=== RJ11 pinout ===
An industry standard for using [[Registered jack#RJ11|RJ11 sockets]] with an ICSP programmer is supported by Microchip. The illustration represents information provided in their data sheets. However, there is room for confusion. The PIC data sheets show an inverted socket and do not provide a pictorial view of pinouts so it is unclear what side of the socket Pin 1 is located on. The illustration provided here is '''untested''' but uses the phone industry standard pinout (the RJ11 plug/socket was original developed for wired desktop phones).▼
[[File:Rj11-4-6 to icsp.jpg|thumb|RJ11 to ICSP PIC programmer]]
▲
==References==
{{reflist}}
==See also==
*[[PIC microcontroller#Device programmers|Device
{{Microchip Technology}}
|