In-system programming (ISP), or also called in-circuit serial programming (ICSP), is the ability of a programmable logic device, microcontroller, chipset, or other embedded device to be programmed while installed in a complete system, rather than requiring the chip to be programmed before installing. It also allows firmware updates to be delivered to the on-chip memory of microcontrollers and related processors without requiring specialist programming circuitry on the circuit board, and simplifies design work.
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. 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. Typically, chips supporting ISP have internal circuitry to generate any necessary programming voltage from the system's normal supply voltage, and communicate with the programmer via a serial protocol. Most programmable logic devices use a variant of the JTAG protocol for ISP, in order to facilitate easier integration with automated testing procedures. Other devices usually use proprietary protocols or protocols defined by older standards. In systems complex enough to require moderately large glue logic, designers may implement a JTAG-controlled programming subsystem for non-JTAG devices such as flash memory and microcontrollers, allowing the entire programming and test procedure to be accomplished under the control of a single protocol.
History Starting from the early 1990s, an important technological evolution in the architecture of the microcontrollers was witnessed. At first, they were realized in two possible solutions: with one-time programmable (OTP) or with EPROM memories. For EPROM, a memory-erasing process requires the chip to be exposed to ultraviolet light through a specific window above the package. In 1993 Microchip Technology introduced the first microcontroller with EEPROM memory: the PIC16C84. EEPROM memories can be electrically erased. This feature allowed to lower the realization costs by removing the erasing window above the package and initiate in-system programming technology. With ISP flashing process can be performed directly on the board at the end of the production process. This evolution gave the possibility to unify the programming and functional test phase and in production environments and to start the preliminary production of the boards even if the firmware development has not yet been completed. This way it was possible to correct bugs or to make changes at a later time. In the same year, Atmel developed the first microcontroller with flash memory, easier and faster to program and with much longer life cycle compared to EEPROM memories. 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 can 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 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.
… excerpt ends here. Continue reading the full article.






