Technical Support

Technical Support

8051 Series issues

What are ISP and ICP?(In System Programming & In Circuit Programming)

ISP & ICP are the device that can do firmware upgrade and don*t need get IC from your target board, more detail as below:

ISP: You need a pre-program (ISP) code in your IC (Megawin 8051 IC have already born ISP code when you get IC), when HWBS has enable, MCU will run ISP code at the IC boot, the ISP code will detect if you have insert to target board, if yes, ISP code will waiting update, if not, the program will jump to AP.

ICP: The purpose same as ISP, and ICP don*t need pre-program code and can update direct don*t reset your MCU, but only can use at MPC82G516.

Can I use RS232 to update my firmware?

Yes, please refer 8051 ISP via COM port user manual.

Specially need to notice, you must follow the step as below:

1. Born ISP code to your IC. (ISP_by_COM_v1.00.BIN)

2. Connect circuit correctly. (RS232 Rx -> 8051 P3.0 and RS232 Tx -> 8051 P3.1)

3. Run AP, turn off your target board.

4. Push Update Target, then turn on your target board.

Which pins need use when I use ISP or ICP?

ISP only needs P3.1, use ICP need SDA and SCL, of course VDD and GND is necessary!

How long can I use ISP (ICP) line?

We recommend the ISP(ICP) line is 30cm, but I test as below:

Test line is FLAT CABLE STYLE:2651 VW-1 (same as IDE line)


Length ISP3.0 ISP4.0 ICP4.0
30cm Pass Pass Pass
1m  Pass Pass Pass
2m Pass Pass Pass
3m Pass Pass Fail
4m Pass Pass  
5m Pass Pass  
6m Fail Pass  
7m   Fail  


Why I can*t use ISP upgrade firmware to MCU?

Please try solve this issue by method as below:

     1. Update step is correct or not?

ISP update step as below:

Plug in ISP Programmer to USB of computer ->

Load Hex or Binary file ->

Push ※Update Programmer§ ->

Plug in ISP Programmer to target board ->

Turn on power of target board ->

Push update bottom

Or as step as below:

Plug in ISP Programmer to USB of computer and target board ->

Load Hex or Binary file ->

Turn on power of target board­ ->

Push ※Updata Target§

     2. Make sure circuit is correct and hardware setup is ok?

Make sure Vcc, Dat, Gnd tied to Vcc, P3.1, Gnd of MCU, and MCU voltage is right and Crystal have frequency output.

If P3.1 have tied to other circuit please refer the section 6(special note for ISP) of ISP/ICP Programmer User Manual to design your circuit.

If you have oscilloscope, please check Vcc and Rst, if Vcc not stable or Rst have reset signal will make MCU Reset and ISP fail.

     3. Make sure IC have ISP code.

If you can*t sure IC have ISP code or not, you can use writer to write ISP code again, and please note when write ISP need set ISP memory is 1K, Enable HWBS and program ISP code(ISP_Code_vx.xx.BIN) to ISP memory address,(ISP memory is finial 1K address of IC)

     4. Test does ISP Programmer broken?

Plug ISP Programmer to computer , check LED is light yellow and green? If not, means ISP is broken.

If correct please try load a hex and push ※Update Programmer§, if update fail means ISP is broken.

If update ok can try push update bottom and check Dat pin by oscilloscope to Dat pin, if Dat pin always stop in high or low means ISP is broken.

What mean when ISP Programmer light red and green at same time?

ISP Programmer light mean show as below:

Light green : Initial light and program success.

Light red and green at same time : Programmer was erase IC content.

Flash red and green : Programmer was programming IC content.

Light red : Program fail.


BTW, after 2009*s MCU ISP code will do while chip erase before program.(Red and green will light a while)

What is IAP?

IAP (In Application Program) is a flash space of Megawin*s 8051 IC; you can save data just like EEPROM.

Megawin*s 8051 IC have 1K space at least except for MPC89x53 and MPC89x515, the only one different with EEPROM is the erase unit is a page (512Bytes), read and write are same as EEPROM.

How to use IAP?

Megawin has provide sample function(Erase_IAP, Write_IAP,Read_IAP) for user, More detail please refer the Sample Code (MPC89_IAP_Vxx.rar)

How much time will spend when I read/write the IAP space?

Please refer the table as below:

IC Type Erase Page(512Bytes) Program(Byte) Read(Byte)
89 Series 21ms ~ 49ms 100us ~ 300us 30us ~ 71us
82 Series  23ms ~ 41ms 66us ~ 112us 1.8us ~ 7.8us



我們的網站會透過瀏覽器 Cookies 提供您客製化操作體驗、社群媒體功能,並會透過其分析網站流量等統計數據,若繼續使用本網站,代表您同意我們使用瀏覽器 Cookies 為您提供服務。《了解更多