Content deleted Content added
m Reverted edits by 2409:4063:6D86:4A00:A9C0:F773:9DEA:D535 (talk) to last version by Arjayay |
tag with {{Bare URL PDF}} |
||
Line 1:
{{Use American English|date = March 2019}}▼
{{Short description|Embedded system programming technique}}
▲{{Use American English|date = March 2019}}
{{Use mdy dates|date = March 2019}}
[[Image:Isp headers.svg|thumb|6- and 10-pin AVR ISP headers]]
Line 9:
The primary advantage of in-system programming is that it allows manufacturers of electronic devices to integrate programming and testing into a single production phase, and save money, rather than requiring a separate programming stage prior to assembling the system. This may allow manufacturers to program the chips in their own system's production line instead of buying pre-programmed chips from a manufacturer or distributor, making it feasible to apply code or design changes in the middle of a production run.
The other advantage is that production can always use the latest firmware, and new features as well as bug fixes can be implemented and put into production without the delay occurring when using pre-programmed microcontrollers.
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 20:
Microcontrollers that support ISP are usually provided with pins used by the serial communication peripheral to interface with the programmer, a Flash/EEPROM memory and the circuitry used to supply the voltage necessary to program the microcontroller. The communication peripheral is in turn connected to a programming peripheral which provides commands to operate on the Flash or EEPROM memory.
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 could be a problem if the necessary precautions are not taken into account in the design of the board; the device can suffer the damage of the I/O components during the programming. Moreover, it’s important to connect the ISP lines to [[high impedance]] circuitry both to avoid a damage of the components by the programmer and because the microcontroller often cannot supply enough current to pilot the line. Many microcontrollers need a dedicated RESET line to enter in the Programming Mode. It is necessary to pay attention to current supplied for line driving and to check for presence of [[Watchdog timer|watchdogs]] connected to the RESET line that can generate an unwanted reset and, so, to lead a programming failure. Moreover, some microcontrollers need a higher voltage to enter in Programming Mode and, hence, it’s necessary to check that this value it’s not attenuated and that this voltage is not forwarded to others components on the board.
== Industrial application ==
In-System Programming process takes place during the final stage of production of the product and it can be performed in two different ways based on the production volumes.
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 [[Test fixture|fixture]]. The latter are integrated, based on the production volumes, in semiautomatic or automatic test systems called [[Automatic test equipment|ATE – Automatic Test Equipment]]. Fixtures are specifically designed for each board - or at most for few models similar to the board they were designed for – therefore these are interchangeable in the system environment where they are integrated. The test system, once the board and the fixture are placed in position, has a mechanism to put in contact the needles of the fixture with the Test Points on the board to test. The system it’s connected to, or has directly integrated inside, an ISP programmer. This one has to program the device or devices mounted on the board: for example, a microcontroller and/or a serial memory.
Line 33:
== 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. However, for newer microcontrollers, specifically PIC18F6XJXX/8XJXX microcontrollers families, entering into ICSP modes is a bit different.<ref>http://ww1.microchip.com/downloads/en/DeviceDoc/39644l.pdf {{Bare URL PDF|date=March 2022}}</ref> Entering ICSP Program/Verify mode requires the following three steps:
# Voltage is briefly applied to the MCLR (master clear) pin.
# A 32-bit key sequence is presented on PGD.
Line 66:
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}}
|