ArticleslgStudy

science

In-system programming

In-system programming is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand In-system programming rather than just read about it. In short: 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 with…

In-system programming — main illustration
In-system programming — illustration

Key takeaways

  • In-system programming belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect In-system programming to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of In-system programming from memory before moving on to harder problems.

Reference excerpt

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.

Illustrations

In-system programming: 6- and 10-pin AVR ISP headers
6- and 10-pin AVR ISP headers
In-system programming: Microchip PICkit ICSP programmer
Microchip PICkit ICSP programmer
In-system programming: Typical programming communication
Typical programming communication
In-system programming illustration
In-system programming: RJ11 to ICSP PIC programmer
RJ11 to ICSP PIC programmer

Worked examples

Example 1 — a first encounter with In-system programming

Start with the simplest possible case. Write down what In-system programming claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to In-system programming before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about In-system programming ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of In-system programming

In research
In-system programming appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses In-system programming in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
In-system programming is common in secondary-school and first-year university syllabi. It links to neighbouring topics Digital electronics, Microcontrollers, so understanding it makes those chapters shorter.
In everyday life
Look for In-system programming outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study In-system programming in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what In-system programming means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain In-system programming out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is In-system programming in simple terms?

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 installin…

Why does In-system programming matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study In-system programming?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on In-system programming.

Tags

  • Digital electronics
  • Microcontrollers

Keep exploring