(EN) 8051 ISP Programmer User Manual v7.32.0.1
(EN) 8051 ISP Programmer User Manual v7.32.0.1
Megawin
8051 ISP Programmer
&
8051 ISP Writer U2
User Manual
This document information is the intellectual property of Megawin Technology Co., Ltd. 1
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
Contents
1 Introduction .................................................................................................... 3
1.1 ISP Functions .......................................................................................................................... 4
2 Chip Configuration for ISP ............................................................................. 5
3 Install the ISP Programmer ............................................................................ 6
3.1 Install the Driver ...................................................................................................................... 6
4 Use the ISP Programmer / ISP Writer U2 ...................................................... 7
4.1 Download the target code to ISP Programmer or ISP Writer U2 .............................................. 8
4.1.1 Step 1: Choose the chip model number ............................................................................................8
4.1.2 Step 2: Click on “Load” to select HEX or BIN ...................................................................................9
4.1.3 Step 3: Hardware Options (Only for MPC89/ few of MG82 Serials) ................................................10
4.1.4 Step 4: Update Programmer/ Off Line Mode ...................................................................................12
4.1.5 Dump the Contents in the Information Zone ..................................................................................13
4-2 Operation Modes................................................................................................................... 14
4.2.1 Mode-1: Connected between host and target system ...................................................................14
4.2.2 Mode-2: Connected to host only ....................................................................................................15
4.2.3 Mode-3: Connected to target system only .....................................................................................15
4.3 ISP Writer U2 Cascade Mode................................................................................................ 16
5 Information Zone .......................................................................................... 17
5.1 Definition of the Information Zone .......................................................................................... 17
5.2 Dump the Information Data ................................................................................................... 18
6 Special Notes for ISP ................................................................................... 19
7 Special Notes for “Auto Reload Code” ......................................................... 21
Revision History ................................................................................................ 22
This document information is the intellectual property of Megawin Technology Co., Ltd. 2
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
1 Introduction
ISP is the acronym of In-System Programming. This programming methods make it possible that the user can
update the application code under the software control without removing the mounted MCU chip from the actual
end product. The tool “Megawin 8051 ISP Programmer”, see the following picture. That is it can function as an
ISP Programmer. In addition, because the programming data to be programmed to the target can be saved in the
programmer’s non-volatile storage, this programmer is able to work stand-alone without host (PC) intervention.
This feature is especially useful in the field without a PC.
This document information is the intellectual property of Megawin Technology Co., Ltd. 3
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
The tool of “Megawin 8051 ISP Writer U2”, see the following picture, can be treated as an ISP Programmer with
Target System. It is used for mass production (Cascade to Gang4 or Gang8 mode) to update the MCU chip
application code before mount to the end product.
This document information is the intellectual property of Megawin Technology Co., Ltd. 4
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
Note:
To let users easily use the ISP function, the Megawin 8051 products will have the following factory setting:
(1) ISP-memory is configured with 1K (or 1.5K) bytes and “HWBS” option is enabled.
(2) The Megawin-provided standard ISP-code is pre-programmed.
(3) The “Lock” option is enabled to prevent customize code copy by others. Although, the “Lock” option has
been enabled, user still can use ISP Programmer to download the code into the target chip. But after the
code downloaded, it can’t be read out by any tools (for example, Megawin U1 writer, Megawin ICP
Programmer).
So, the user has no need to do the chip configuration before using the ISP function.
This document information is the intellectual property of Megawin Technology Co., Ltd. 5
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
To check if the Programmer was correctly installed, follow the listed steps:
If the installation was completed successfully, you may find an entry, Megawin 8051 ISP (U2) Programmer, in
the listing.
This document information is the intellectual property of Megawin Technology Co., Ltd. 6
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
When using “ISP Writer U2” to download the code for the DIP package ICs in the following list can be used
without a socket board:
MPC89X52/53/54/58/515
MPC82X52/54
MG87FE52
MG87FX2051/4051/6051
MG86FX508
Note that the DIP16/20/40 pins should be aligned up and the DIP 28 Pins should be aligned downwards, as
shown on the back of the U2 Writer.
For the latest IC serials, it is needed a transfer socket board between U2 and chip. Please contact Megawin or
your agent for detail.
This document information is the intellectual property of Megawin Technology Co., Ltd. 7
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd. 8
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd. 9
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
4.1.3 Step 3: Hardware Options (Only for MPC89/ few of MG82 Serials)
4.1.3.1 MPC89-series
The user should always configure proper H/W Option before clicking “Update Target” or “Update Programmer”.
FZWDTCR:
[enabled]: The WDTCR register will be initialized to its reset value (0x00) only by power-on reset.
(For example, if WDTCR=0x2D, it still keeps at 0x2D rather than 0x00 after RST-pin, S/W or WDT
reset.)
[disabled]: The WDTCR register will be initialized to its reset value (0x00) by all reset (including power-on,
RST-pin, S/W and WDT reset).
OSCDN:
[enabled]: If the XTAL frequency is less than 25MHz, this option can be enabled to reduce the internal
oscillating gain for lower EMI.
[disabled]: Normal oscillating gain.
EN6T:
[enabled]: MCU runs at 6T mode (6 clocks per machine-cycle, double speed compared to a traditional 8051)
[disabled]: MCU runs at 12T mode (12 clocks per machine-cycle, like a traditional 8051)
This document information is the intellectual property of Megawin Technology Co., Ltd. 10
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
4.1.3.2 Partial models of MG82 series support hardware options (MG82FG2XX Series)
MPC82/MG84/MG87-series, the user can not update the H/W Option by ISP.
Users should set hardware options before clicking "Update Target" or "Update Programmer (For off-line mode)"
ENLVRC:
[Enable]: When the V30 pin voltage drops to 2.4V, the hardware will generate a low voltage reset.
[disabled]: Low voltage reset is disabled
ENLVRO:
[Enable]: When the VDD pin voltage drops to 3.7V, the hardware will generate a low voltage reset.
[disabled]: Low voltage reset is disabled
OSCDN:
[Enable]: If the frequency is less than 25MHz, this option can be used to reduce internal gain to reduce EMI
[disabled]: Normal gain.
ENROSC:
[Enable]: Enable internal RC oscillation
[disabled]: Disable internal RC oscillation
This document information is the intellectual property of Megawin Technology Co., Ltd. 11
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
E.g.:
If HWWIDL and HWPS [2:0] are set to 1 and 5, respectively, the WDTCR will be initially 0x2D after the MCU is
powered up. As follows:
WDTCR (Watchdog Register)
7 6 5 4 3 2 1 0
WRF - ENW CLRW WIDL PS2 PS1 PS0
1 HWWIDL HWPS[2:0]
Prohibited: Do not access the watchdog at power-on
This document information is the intellectual property of Megawin Technology Co., Ltd. 12
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd. 13
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
The user should select correct “Part No.”, then click “Load File” to load the new application code, and configure
the H/W options (if have) before clicking the “Update Programmer” or “Update Target” button. The ISP-key can
also be used to start the ISP processing after the “Update Programmer” is completed.
The following figures show the connection diagram:
When the Programmer acts as an ISP Programmer, don’t power on the target system before connection is ready.
After connection has been done, then the user’s system can be powered on. After power up, the target MCU
keeps running in the ISP-memory for ISP processing. When ISP processing is finished, it needs to disconnect
this Programmer from the target system to let the target MCU run the new application code.
The LEDs show the result. If ISP processing succeeds, the green LED will be turned on, otherwise the red LED
will be turned on.
This document information is the intellectual property of Megawin Technology Co., Ltd. 14
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
When acting as an ISP Programmer, connect the Programmer to the target system before the system is powered
up. Then, power on the system, and press the ISP-key to start ISP processing. The green and red LEDs show
the processing result. Now, the user can disconnect the Programmer to let the system start running the new
application code.
This document information is the intellectual property of Megawin Technology Co., Ltd. 15
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
Step 1: To download the target code to each ISP Writer U2. Please reference “
Reference “4.1 Download the target code to ISP Programmer or ISP Writer U2”
Step 2: To use the cable cascade each ISP Writer U2 in series as showed in following.
Please note 4 of “ISP Writer U2” in series is suggested.
Step 3: Put the target IC into socket, and then press one of “ISP-Key” to download multi-chip at one time.
To check the LED indicators to know the download result.
This document information is the intellectual property of Megawin Technology Co., Ltd. 16
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
5 Information Zone
When the H/W option LOCK or SB is enabled for code security, there is no way to read out the contents of the
target by neither a universal programmer nor the ISP Programmer. For the purpose of user’s product failure
analysis in the future, a special Flash area called Information Zone is defined to be readable by only the ISP
Programmer even the target is locked or scrambled. The user may put some useful product information there for
future failure analysis, such as Product version, F/W version, manufacturing date code, .. and etc.
Note:
The Information Zone is just the name of the range where the ISP Programmer can read out data even the target
is locked or scrambled.
This document information is the intellectual property of Megawin Technology Co., Ltd. 17
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd. 18
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
The following figures show the restriction on typical applications of P3.1 if P3.1 also functions for DTA-pin of ISP.
This document information is the intellectual property of Megawin Technology Co., Ltd. 19
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
Figure 1: Figure 2:
P3.1 is used to drive an NPN transistor. P3.1 is used to drive a PNP transistor.
Restriction: Restriction:
R>=1K R>=750
R_pull_up:~10K VCC VCC
8051MCU
1
R_pull_up R_Load R 2
P3.1 PNP
8051MCU
3
3
R 2
P3.1 NPN
R_Load
1
DTA DTA
Figure 3: Figure 4:
P3.1 is used to drive an LED. P3.1 is used as it original TXD function.
Restriction: (No restriction)
R>=510 if VCC=5.0V RS232
R>=330 if VCC=3.3V VCC 8051MCU Transceiver
UART's TXD
P3.1
8051MCU LED
R
P3.1
DTA DTA
Figure 5: Figure 6:
P3.1 is pulled low. P3.1 is used to drive a high-impedance input.
Restriction: (No restriction)
R_pull_low>300K
8051MCU
8051MCU
P3.1 High-Z
P3.1 DTA Input
R_pull_low
DTA
This document information is the intellectual property of Megawin Technology Co., Ltd. 20
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd. 21
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
Revision History
Revision Description Date
(1) Fix the AP bug: Firmware upgrade will fail if host uses OHCI chip set.
v5.30 (2) For ICP Programmer, the user can select whether to update the hardware option 2007/10/05
or not.
(1) Fix the AP bug: Wrong display in the H/W Option area when “MPC89E58.MPJ” is
loaded.
v5.30a (2) Modify description for HWENW. (Section 3-3-3 & 3-3-4) 2008/01/24
(3) Correct description for ENLVRO, from 3.8V to 3.7V. (Section 3-3-3)
(4) Update Section 2.1.
v5.40 Add support for MG87FL51/52 and MG87FE51/52 in the ISP Programmer. 2008/07/09
(1) In the Programming Area, the radio button name of “AP+IAP+ISP” changes to
“Whole-chip.”
V5.41 2008/11/13
(2) When operate “Update Target” and “Update Programmer” functions, the only
default option of “Update H/W Option” is “Yes.”
V5.42 Add support for MG87FL(E)2051/4051/6051 in the ISP Programmer. 2009/01/06
V5.43 Add support for MG82FG216/232/248 in the ISP Programmer. 2009/02/04
(1) Add the “Set Max count “ variable in Update Programmer function.
V5.44 2009/02/27
(2) Add the “8051 ISP Writer U2” tool description
MG82FG216, MG82FG232, and MG82FG248 now have following option bit available
V5.45 2009/03/16
for user to configure: ENLVRC, ENLVRO, OSCDN, ENROSC, HWENW
V5.50 Add support for MG87FL(E)04 and MG82FL(E)308/316 in the ISP Programmer. 2009/09/01
1. Supported the Multi-Load file function.
V5.51 2010/01/20
2. Available in Windows 7 operation system.
V5.60 Add support for MG82FL(E)532/564 in the ISP Programmer. 2010/03/26
V5.61 Special Release 2010/06/02
V5.70 Add support for MG82FE216 in the ISP Programmer. 2010/07/05
V5.80 Add support for MG82FE632/664 in the ISP Programmer. 2010/12/22
V5.81 Modify auto-upgrade function for the firmware of the Programmer's MCU. 2011/01
V5.82 The ISP-ICP programmer supports Serial Number function when operate in Mode-3 2011/02
V5.83 Correct the IAP setting error on ICP programmer 2011/04
1. Add support for MG86FL(E)104 in the ISP Programmer.
V5.90 2011/05
2. Remove the MG84FL516 in ISP and ICP Programmer.
V5.91 Support new function on U2 Writer 2012/05
V6.00 Add support for MG86FL(E)508 in the ISP Programmer. 2012/07
1. Add “Auto Reload Code” function.
V6.01 2012/09
2. Add version information on the title of the main window.
V6.01a Fix a bug on tip function when load MPJ file 2012/09/11
V6.02 Fix a bug on “Auto Reload Code” function. 2012/10/23
V6.10 Add support MG82FG5A64 in ISP Programmer. 2012/12/06
V6.20 Update “PC-site Driver “ support Windows 8 2013/06/14
1. Add support MG82FG5B(32/16) in ISP Programmer.
V6.30 2013/11/15
2. Add support MG20FL(E)809 in ISP Programmer.
V6.40 Add support MG82FG5B(24/08) in ISP Programmer. 2014/04/09
V7.00 Support new H/W, TH079F 2014/06/01
This document information is the intellectual property of Megawin Technology Co., Ltd. 22
Megawin Technology Co., Ltd. 2016 All rights reserved.
8051 ISP Programmer
User Manual, v7.32.0.1
This document information is the intellectual property of Megawin Technology Co., Ltd. 23
Megawin Technology Co., Ltd. 2016 All rights reserved.