The difference between an ISP and an IAP

Source: Internet
Author: User



Turn:



The ISP (In-system programming) is programmed in the system to refer to a blank device on the board that can be programmed to write to the end user code without removing the device from the board, and the programmed device can be erased or reprogrammed by the ISP. IAP (In-application programming) means that the MCU can get new code in the system and reprogram itself to use the program to change the program. ISP and IAP technology are the future development direction of instrumentation.



1. How ISPs and IAP work



The implementation of the ISP is relatively simple, the general practice is that the internal memory can be used by the host computer software through the serial port to rewrite. For single-chip microcomputer can be used through the SPI or other serial interface to receive data from the host computer and write to the memory. So even if we weld the chip on the circuit board, as long as the host computer interface with this serial port, you can realize the memory of the chip rewriting, and no need to remove the chip.



IAP implementation is relatively complex, in the implementation of the IAP function, the microcontroller must have two blocks inside the storage area, the general piece is called the boot area, the other piece is called the storage area. MCU power on the boot area, if the conditions of the external rewrite program is satisfied, then the memory of the program to overwrite the operation. If the condition of the external rewrite program is not satisfied, the program pointer jumps to the store and starts executing the program placed in the store, which implements the IAP function.



2. Application of ISP and IAP in single chip microcomputer



2.1 Shortcomings of traditional programming methods



In the general MCU experiment or development, the programmer is an essential device. Simulation, debugging procedures need to use the programmer to burn into the microcontroller internal or external program memory. Ordinary programmer price from hundreds of yuan to thousands of yuan, for the general microcontroller users is still a large amount of expenditure. In addition, during the development process, the program will unplug the circuit board on the chip after programming, and then plug in, so that not only the trouble is also easy to damage the chip and circuit board, in addition, the program needs to be upgraded to make changes, the equipment must be returned to the factory or technical personnel to the site operation, neither convenient also cause cost waste.



2.2 Advantages of ISPs and IAP



The advantage of ISP technology is that you can do the experiment and development of single-chip microcomputer without programmer, single chip microcomputer chip can be directly welded to the circuit board, the end of debugging is finished, eliminating the inconvenience caused by frequent inserting and removing chip to chip and circuit board when debugging.



The IAP technology is a structure that maps flash memory to two storage bodies, and when you run a user program on a storage body, you can reprogram another storage body and then move the program from one storage to another.



The implementation of the ISP generally requires very few external circuit auxiliary implementations, and the implementation of IAP is more flexible, usually can use the serial port of the microcontroller to the RS232 port of the computer, through a specially designed firmware program to program internal Memory, Remote upgrades and maintenance can be easily achieved through existing Internet or other communication methods.



2.3 Product Analysis



At present, many SCM has ISP and IAP function on the market.



St Company's ΜPSD32XX series SCM chip with 128KB/256KB flash memory and 32KB Boot ROM, through the JTAG serial port can easily realize the ISP function. The IAP feature can be implemented by the user in the application.



Atmel's microcontroller at89s8252 provides an SPI serial interface to internal program memory programming (ISP). SST Company's microcontroller SST89C54, its biggest feature has two independent flash memory, with IAP (in-app online programming) function, for the 8052 series of other companies of the microcontroller (ATMEL, Winbond, ISSI) can be directly substituted, There is no need to make any changes to hardware.



Philips ' P89C51RX2XX Series is a 8-bit flash single-chip microcomputer with ISP/IAP. In order to promote ISP technology and IAP Technology, Philips has provided the boot ROM firmware free of charge on chip, and solved the problem of address covering of firmware and flash and some specific implementation details, which makes their implementation simple.



In addition, in the peripheral devices St company's PSD series of products with large capacity memory, support ISP and IAP functions.






Isp,in System Programing



Mainly refers to the chip of the burning way, in the past to write films need to take down the film, leaving the circuit, with



The programmer burns, in other words, the chip cannot be written out of the application system.



The ISP primarily addresses this issue by using a JTAG or serial port (the internal MCU has a boot Loader,



Activated by the specified way, it can be connected with the PC or other host computer through the serial port, without making the monolithic



Application and update the internal programs/settings) for program write-down operations.



Therefore, an MCU with ISP functionality can be programmed without using a programmer. Of course, implementing an ISP



Can require some hardware circuit support, specific in the data sheet is described.



Iap,in Application Programing



There are some erasable non-volatile memory, such as Flash, inside the microcontroller. When single-chip microcomputer is running independently,



The MCU does not have the IAP function can not modify the flash data, for example, to one of its own



The code of the module, the data is modified.



An MCU with IAP capability, capable of repairing itself by using the technology developed by the respective company



Change.



In short:isp=> modifying the MCU internal data need to have external intervention;



Iap=> Modifying the MCU internal data can be used without external intervention.



The two can be said to be an implementation mechanism of data updating.



Usually have ISP function, do not have the programmer, but use the download line to do the programming work.



But not that they must not support the programmer, specific model specific analysis.



Whether the emulator needs to be emulated and whether the ISP and IAP are not necessarily connected.



Only with the IAP function, you can write the monitor in the MCU, simulate an emulator,



Of course, this monitoring program is to consume resources, and the use of hardware emulator has a certain difference.



IAP application, in 51 may be more, is the SST out of that SoftICE function.



His MCU does not actually have an ISP function and needs to use a programmer to burn a boot loader in,



Then, using the IAP feature, you can download data through the serial port.



The SST one, uses a SoftICE software developed by itself, and Keil C's Mon51 interface.



Look datasheet said, first to use the programmer to burn boot loader in,



Then, use the serial port to burn SoftICE in, and then you can use it.



Isp:in system Programming,



Iap:in Applicatin Programming



But how do they work, and what is the difference between the results and the application?



Isp:



Use the writer to burn code, however, the chip can be on the target board, do not have to take out, in the design of the target board when the interface design on the above, so called "in the System programming", that is, do not leave the system;



Iap:



In the application programming, there is the chip itself (or through the peripheral chip) can be written by a series of operations, such as a single chip support IAP, 3 program area, 1 as the boot program area, 2 for the running program area, 3 for the download area, the chip through the serial port to receive the download command, into the boot area to run the bootloader, Download the new code content to the download area under the bootloader, download and verify the contents of the download area and then copy it to Zone 2 to run the Reset program, then the IAP is completed;



Application:



1,isp program upgrade needs to be solved on site, but the better is not to dismantle the machine;



2,iap If there is a network management system, with the network management to download everything done, people do not run to run,



It might be their merit or application.



Typical Iap:ic card telephone



Contains v.xx modem chip, MCU comes with boot area, can download the update program remotely.



========================================================



There are two ways to implement online programming:

 in System Programming (ISP) and in application Programming (IAP). ISP is generally through the SCM dedicated serial programming interface to the SCM internal flash memory programming, and IAP technology is from the structure of flash memory mapped to two storage, when running a user program on a storage body, the other storage body can be reprogrammed, The control then shifts from one storage body to another. The implementation of the ISP generally requires very few external circuit auxiliary implementations, and the implementation of IAP is more flexible, usually can use the serial port of the microcontroller to the RS232 port of the computer, through a specially designed firmware program to program internal memory.



Summary

simple Drip said, is the ISP in the design of the board Time left a download program of the mouth out, through the mouth and the PC to write software communication, and then directly download the program to the circuit board MCU. (MCU's entire program system has been changed OH) and, IAP requires two parts of the MCU program, part of the firmware program is called Boot, the other part of the Flash (save user Code OH), the microcontroller first run boot and then execute flash (so say, this request is high Oh, Require the MCU inside has the firmware, can carry on the program renewal to burn writes the Flash, the brush machine ah ~~!! )



The difference between an ISP and an IAP


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.