8051 ISP by COM Port
Nuvoton
8051 ISP by COM Port
User Manual
Revision 7.15, 2015/Apr/24
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
8051 ISP by COM Port
Table of Contents
Revision History ...................................................................................................... 3
1 Introduction ........................................................................................................ 4
2 Hardware ........................................................................................................... 4
2.1 With an RS232 Transceiver in the Target System ....................................................................... 6
2.2 Without an RS232 Transceiver in the Target System .................................................................. 7
2.3 Requirement on the MCU Operating Frequency .......................................................................... 8
3 Software ............................................................................................................ 9
3.1 Installing the Application Program ............................................................................................... 9
3.2 Introduction to the GUI ................................................................................................................ 9
3.3 Auto Synchronization of Buffer Data .......................................................................................... 10
4 Operation Steps ............................................................................................... 11
4.1 With Reset Control .................................................................................................................... 11
4.2 Without Reset Control ............................................................................................................... 11
4.3 Production Mode ....................................................................................................................... 12
5 Reset Control ................................................................................................... 13
6 Tool Project File (TPJ) ..................................................................................... 14
7 Advanced Functions ........................................................................................ 15
7.1 Serial Number Programming ..................................................................................................... 15
7.2 Fast Protocol Mode ................................................................................................................... 17
7.3 Chip Counter ............................................................................................................................. 18
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
8051 ISP by COM Port
Revision History
Revision
Description
Date
v1.00
The first released version.
2009/07/15
v5.00
(1) Improved data security of the Nuvoton standard ISP code for N78E366A,
N78E055A, N78E059A and N78E517A. (Updated the ISP code version to v3.13.)
(2) Updated the PC-site AP to v5.00. (The GUI display for "CONFIG Setting" becomes
more user-friendly.)
2010/08/13
v5.02
(1) Fixed the HEX-to-BIN conversion error when the hex input file has a binary code
size more than 64K. (The application program is updated to v5.02.)
(2) Modified all the ISP code to prevent from hanging in LDROM when powered on in
an RS-485 application. (Updated the ISP code version to v3.20.)
2010/11/15
v5.05
(1) Supported Tool Project (TPJ) file for management of GUI settings.
(2) Fixed the ISP code bug when using 3.6864 MHz XTAL for ISP by COM Port
function. (Updated the ISP code version to v3.21.)
(3) 3.6864 MHz is the lowest XTAL frequency instead of 3 MHz in v3.20.
2011/01/18
v5.31
(1) Fixed some software bugs.
(2) Updated the ISP code version to v3.23.
2011/04/08
v5.50
(1) Supported N79E855/4/3, N79E845/4/3 and N79E815/4/3.
(2) Updated the PC-site AP version to v5.50.
2011/06/15
v5.51
Fixed minor bugs in the PC-site AP of v5.50.
2011/07/26
v5.60
(1) Renamed the parts W78E051D~W78E516D.
(2) Supported N79E8432 and N79E8132.
2011/10/20
v5.70
Supported N79A8211A.
2011/11/07
v6.00
(1) Supported production mode. (cf. Section 4.3)
(2) Supported serial number programming. (cf. Section 7.1)
(3) Supported fast protocol mode to reduce ISP operation time. (cf. Section 7.2)
(4) Supported chip counter for successfully programmed chips. (cf. Section 7.3)
2011/12/26
v6.02
Fixed some minor software bugs.
2012/02/01
v6.04
Updated the document version to v6.03.
2012/02/29
v6.10
Updated the serial number programming function. (cf. Section 7.1)
2012/03/26
v6.12
v7.10
v7.15
Fixed a software bug that makes Auto Synchronization of Buffer Data failed. (cf.
Section 3.3)
Removed support for W78E051D, W78E(L)648, W78E(L)649, N79E813, N79E843,
N79E853 and N79A8211A.
Supported N79E715, N76E885 and N76E616
2015 Nuvoton Technology Corporation. All Rights Reserved.
2012/04/26
2014/01/15
2015/04/24
< Revision 7.15 >
8051 ISP by COM Port
1 Introduction
ISP is the acronym of In-System Programming, which makes it possible that the user can update the program
memory under the software control without removing the mounted MCU chip from the actual end product. For the
8051 MCU products, we provide an ISP solution through the COM port of PC. As long as the LDROM of the MCU is
pre-programmed with the Nuvoton Standard ISP Code and CONFIG bits are properly configured, the user can easily
update the APROM of the MCU through the COM port of PC.
Note:
The ISP function can work only when the ISP code has resided in LDROM of the MCU. To let users easily use the ISP function,
some of the 8051 MCU products have the Nuvoton Standard ISP Code pre-programmed in LDROM and CONFIG bits properly
configured before shipping. Please contact Nuvoton for detailed product information. (The Nuvoton Standard ISP Code is also
included in the folder [(3) Nuvoton Standard ISP Code]. The user may program it with a universal programmer.)
2 Hardware
To make the 8051 MCU boot from LDROM after reset to run the ISP code, some specific I/O pins need to be tied to
ground and the CONFIG needs to be properly configured. The following table shows the specific I/O pins and the
proper CONFIG setting used for booting from LDROM after reset. In addition, to directly connect to the COM port of
PC, there needs an RS232 transceiver (e.g. MAX232) in the target system. The following sub-sections will show the
hardware connection.
I/O Pins and CONFIG Bit for Booting from LDROM after Reset
Part No.
I/O Pins Tied to Ground for
Booting from LDROM
CONFIG Setting for
Booting from LDROM
W78E052D
W78E054D
N78I054DFN
(Not Need)
CBS
configured as LDROM
P2.6 & P2.7 (for 40-pin package)
(Not Need)
P4.3 (for 44-pin package)
(Not Need)
P2.6 & P2.7 (for 40-pin package)
Reboot P2.6/P2.7
configured as Enabled
P4.3 (for 44/68/100-pin package)
Reboot P4.3
Enabled
W79E217A
W79E225A
W79E226A
W79E227A
P3.6 & P3.7 (for 44-pin package)
Reboot P3.6/P3.7
configured as Enabled
P4.3 (for 48/100-pin package)
Reboot P4.3
configured as Enabled
W79E201A
P4.0
Reboot P4.0
configured as Enabled
W925EP01
P4.7
Reboot P4.7
configured as Enabled
W78E058D
W78E516D
W78E(L)365A
W78E065A
W78E858A
W78E(I)RD2A
W77E(L)516A
W77E(L)532A
W79E(L)632A
W79E(L)633A
W79E(L)658A
W79E(L)659A
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
8051 ISP by COM Port
Part No.
I/O Pins Tied to Ground for
Booting from LDROM
CONFIG Setting for
Booting from LDROM
(Not Need)
CBS
configured as LDROM
N78E366A
N78E055A
N78E059A
N78E517A
N79E814A
N79E815A
N79E844A
N79E845A
N79E854A
N79E855A
N79E8132A
N79E8432A
N79E715
N76E885
N76E616
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
8051 ISP by COM Port
2.1 With an RS232 Transceiver in the Target System
In this design, each target system has an RS232 transceiver (e.g. MAX232) inside, and so only one RS232 cable is
needed during the ISP operation, as shown below.
Target System (with RS232 Transceiver)
VCC
C3
10p
/EA
XTAL1
X1
Fosc
C4
1u/16V
XTAL2
C5
1u/16V
UART
Interface
VCC
R1
47K
C1
2u
P3.0(RXD)
RST
P3.1(TXD)
RXD
TXD
VCC
P2.6
P2.7
TXD
11
10
RXD
12
9
C1+
16
U2
1
VCC
VCC
U1
15
R2
10K
RS232
Transceiver
GND
8051 MCU
C2
10p
C6
1u/16V
VCC
V+
V-
2
6
C7
1u/16V
C1-
C2-
R1_OUT
R2_OUT
R3 MAX232
4.7K
T1_OUT
T2_OUT
R1_IN
R2_IN
P1
GND 5
RI 9
DTR 4
CTS 8
TD 3
RTS 7
RD 2
DSR 6
DCD 1
C2+
T1_IN
T2_IN
RS232
Connector
14
7
13
8
Male DB9
R4
10K
Q1
2N3906
GND
To boot from LDROM.
(See Note 1)
RST
For reset control.
(See Note 2)
PC
COM Port
RS232 Cable
Note 1:
The I/O pins used for booting from LDROM may be P2.6&P2.7, P4.3, P3.6&P3.7, P4.0 or none.
(See the above table.)
Note 2:
For "With Reset Control" configuration, Q1, R3 and R4 are needed.
For "Without Reset Control" configuration, Q1, R3 and R4 are not needed.
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
8051 ISP by COM Port
2.2 Without an RS232 Transceiver in the Target System
To save an RS232 transceiver (e.g. MAX232) built in each target system, the user may use the RS232 Cable
Adaptor with an RS232 transceiver inside, as shown below.
Target System (without RS232 Transceiver)
RS232 Cable Adaptor
VCC
C3
10p
R1
47K
/EA
XTAL1
X1
Fosc
VCC
P2.6
P2.7
XTAL2
VCC
C1
2u
RST
P2.6
P2.7
To boot from LDROM.
(See Note 1)
RST
UART
Interface
RST
P3.0(RXD)
P3.1(TXD)
P2.6
P2.7
VCC
C4
1u/16V
R5
100
(PL)
Pulled low
4
C5
1u/16V
RST
VCC
P3.0
RXD
P3.1
TXD
GND
GND
TXD
11
10
RXD
12
9
VCC
C1+
2
6
C7
1u/16V
C2T1_IN
T2_IN
R1_OUT
R2_OUT
T1_OUT
T2_OUT
R1_IN
R2_IN
RS232
Connector
P1
GND 5
RI 9
DTR 4
CTS 8
TD 3
RTS 7
RD 2
DSR 6
DCD 1
C2+
Q1
2N3906
RST
V+
V-
C1-
R3 MAX232
4.7K
GND
16
15
U2
1
VCC
C2
10p
RS232
Transceiver
General
Connector
U1
R2
10K
C6
1u/16V
VCC
GND
8051 MCU
14
7
13
8
Male DB9
R4
10K
For reset control.
(See Note 2)
PC
COM Port
RS232 Cable
Note 1:
The I/O pins used for booting from LDROM may be P2.6&P2.7, P4.3, P3.6&P3.7, P4.0 or none.
(See the above table.)
Note 2:
For "With Reset Control" configuration, Q1, R3 and R4 are needed.
For "Without Reset Control" configuration, Q1, R3 and R4 are not needed.
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
8051 ISP by COM Port
2.3 Requirement on the MCU Operating Frequency
For ISP operation through COM port, there is no special restriction on the MCU operating frequency as long as the
frequency is higher than or equal to 3.6864 MHz. The 8051 MCU will automatically choose a proper baudrate
according to its operating frequency to communicate with the host (PC). It is recommended that the user uses the
following specific frequencies: 3.6864 MHz, 11.0592 MHz, 18.432 MHz, 22.1184 MHz or 36.864 MHz, for the 8051
MCU to generate a standard baudrate. All the listed frequencies can be used to generate an exact baudrate of
115200bps, which will shorten the data transmission time during ISP operation.
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
8051 ISP by COM Port
3 Software
3.1 Installing the Application Program
The application program setup file is contained in the folder [(2) Application Program]. Using the default installation
setting, you will find the item Nuvoton Tools \ Nuvoton ISP-ICP Utility, v?.?? appears in the Windows START-menu
after the application program is successfully installed.
Note:
ISP-ICP means this application program is used for both the ISP Programmer and the ICP Programmer.
In addition, also for the ISP by COM Port.
3.2 Introduction to the GUI
Select 'ISP by COM Port'
Select wanted Part No.
Load file for APROM buffer
and DataFlash buffer (See Note)
Update the MCU chip
Production Mode
Select
updated items
when
'Update chip'
is clicked
Set CONFIG bits
Select the COM port
to which the MCU chip
is connected
Click to show
APROM buffer
Click to show
DataFlash buffer
Information of
the loaded file
Processing
status
Serial number
to be programmed
Chip counter
Note:
To load code file, click 'APROM Buffer', then click 'Load File'
To load data file, click 'DataFlash Buffer', then click 'Load File'
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
8051 ISP by COM Port
3.3 Auto Synchronization of Buffer Data
The buffer contents will be automatically synchronized with the physical file in the hard disk when the function button
'Update Chip' is clicked, as shown below. Thus, the user does not need to manually reload the files for APROM
buffer and Data Flash buffer when the physical files are updated externally.
Click 'Update Chip' will make
the buffers synchronized.
Buffer Contents
Physical file in
the hard disk
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
10
8051 ISP by COM Port
4 Operation Steps
4.1 With Reset Control
For the With Reset Control configuration, the user should follow the steps to do ISP.
Step 1: Connect the target system to the COM port of PC through an RS232 cable.
Step 2: Run the PC-site AP, select wanted part no., select correct COM port to which the target system is connected,
and load the code/data file into APROM/Data Flash Buffer.
Step 3: Click the Update Chip button when the target system is in power-on state.
Step 4: Now, the 8051 MCU will automatically reboot from LDROM, and will be successfully detected and updated.
Note: If possible, With Reset Control is strongly recommended for ISP operation.
4.2 Without Reset Control
For the Without Reset Control configuration, the user should follow the steps to do ISP.
Step 1: Connect the target system to the COM port of PC through an RS232 cable.
Step 2: Run the PC-site AP, select wanted part no., select correct COM port to which the target system is connected,
and load the code/data file into APROM/Data Flash Buffer.
Step 3: Click Update Chip button.
Step 4: Manually have the 8051 MCU reboot from LDROM during Detect chip, as shown below, by the following
two methods:
(1) Send a reset pulse to the RST-pin of the MCU when the target system is in power-on state, or
(2) Power off the target system and then power on again.
During detecting 8051, do the thing as Step4 describes.
Step 5: Now, the 8051 MCU will be successfully detected and updated.
Note:
(1) Step 4 shows the Without Reset Control is somewhat inconvenient for the user to have the 8051 MCU reboot
from LDROM. This is why we strongly recommend the user to adopt the With Reset Control configuration.
(2) If any failed condition happens, repeat steps 3 and 4.
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
11
8051 ISP by COM Port
4.3 Production Mode
In the production mode, the user should follow the steps to do ISP.
Step 1: Connect the target system to the COM port of PC through an RS232 cable.
Step 2: Run the PC-site AP, select wanted part no., select correct COM port to which the target system is connected,
load the code/data file into APROM/Data Flash Buffer, and click the P.M. check box to enable production
mode.
Step 3: Click the Update Chip button to start programming of production mode.
Step 4: Refer to Step 4 in Section 4.1 & 4.2 to make the 8051 MCU boot from LDROM.
Step 5: The 8051 MCU will be detected and updated.
If pass, the PASS message will be displayed for 1 second and then automatically disappear.
If fail, the FAIL message will be displayed until the user closes it.
Step 6: Now, detecting 8051 MCU will automatically restart. The user may place the next chip to be programmed
and go to Step 4.
To stop the production mode, click the P.M. check box to be un-checked state.
Enable Production Mode
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
12
8051 ISP by COM Port
5 Reset Control
Normally, the RST-pin of the MCU with external RC reset circuit (see Figure 5a) can be controlled by the PNP
transistor Q1 (see the figures in Sections 2.1 and 2.2). At this time, the user may adopt the With Reset Control
configuration for ISP operation. However, the RST-pin cannot be controlled when it is connected to a reset IC (such
as MAX810, ADM810, AIC810 and FP6810, etc., see Figure 5b). Now the user should adopt the Without Reset
Control configuration for ISP operation.
External RC Reset Circuit
The general external RC reset circuit is shown in Figure 5a. The resistance of R should be larger than 47k to have
the RST-pin be successfully controlled by the PNP transistor. Normally, {47k, 2.2uF} and {100k, 1uF} are
recommended for {R, C}.
Figure 5a. External RC Reset Circuit
8051 MCU
External RC reset circuit
VDD
C
RST
R
GND
Reset Circuit with a Reset-IC
In this condition, the RST-pin cannot be controlled by the PNP transistor Q1.
Figure 5b. Reset Circuit with a Reset-IC
8051 MCU
VDD
Reset IC (active High)
VCC
RESET
RST
GND
GND
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
13
8051 ISP by COM Port
6 Tool Project File (TPJ)
The user may save all the GUI settings to the Tool Project (TPJ) file, and retrieve the GUI settings by loading the
TPJ file previously saved. It is much helpful to the user to manage a variety of programming data by the project
type.
The GUI settings or the contents of the TPJ file include:
(1)
(2)
(3)
(4)
(5)
(6)
(7)
Programmer type
Part number
Items to be updated
APROM buffer data if APROM is one of the updated items
Data Flash buffer data if Data Flash is one of the updated items
CONFIG setting if CONFIG is one of the updated items
Advanced functions setting
Save GUI setting
to a TPJ file
Restore GUI setting
from a TPJ file
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
14
8051 ISP by COM Port
7 Advanced Functions
7.1 Serial Number Programming
The serial number programming is supported in ISP by COM Port. The serial number is BCD coded and 8 bytes
long, which supports 16 decimal digits. Only APROM area can be programmed with the serial number. The following
figure shows how to open the configuration dialog box for serial number programming.
Click right button of the mouse
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
15
8051 ISP by COM Port
As shown in the above figure, 2468000012345678 is to be programmed at address 0x3FF8 in APROM area. The
BCD-coded serial number programmed in the chip has a what you see is what you get format, as shown below.
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
16
8051 ISP by COM Port
7.2 Fast Protocol Mode
To greatly reduce the operation time of ISP by COM Port, the Fast Protocol mode is supported. In most conditions,
the user can use this mode to do ISP. In some cases, for example, the XTAL frequency is 3.6864 MHz, the user
may select the Normal Protocol mode to prevent communication problems from occurring during ISP operation.
Click right button of the mouse
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
17
8051 ISP by COM Port
7.3 Chip Counter
The chip counter is used to calculate the successfully programmed chips. The user may configure the counter as up
counter or down counter, and set the initial counter value. The following figure shows how to open the configuration
dialog box for chip counter.
Click right button of the mouse
2015 Nuvoton Technology Corporation. All Rights Reserved.
< Revision 7.15 >
18