HT-2CWriter User`s Guide

HT-2CWriter User¢s Guide
September 2005
Copyright Ó 2005 by HOLTEK SEMICONDUCTOR INC. All rights reserved. Printed in Taiwan. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form by any means, electronic, mechanical photocopying, recording, or otherwise without the prior written permission of HOLTEK SEMICONDUCTOR INC.
Contents
Contents
Introduction ..................................................................................................1
Installation ....................................................................................................1
Accompanying Hardware ............................................................................5
Programming a 2-Chip-1-Package Device with the HT-MWriter .............6
Prepare the OTP & MEM File Before Programming the 2-Chip-1-Package Device........6
Running the HT-MWriter Software Utility .........................................................................6
MCU Type and Driver Type for Programming..................................................................6
On-Line Programming Mode .......................................................................6
Basic Functions ...............................................................................................................6
Additional Functions ......................................................................................................13
Stand-Alone Programming Mode .............................................................17
Programming Steps .......................................................................................................17
LED Indicator Description ..............................................................................................18
Using the Adapter Card .............................................................................18
System Messages ......................................................................................19
i
HT-2CWriter User¢s Guide
ii
HT-2CWriter User¢s Guide
Introduction
The Holtek HT-2CWriter was specifically developed to program the range of Holtek
2-Chip-1-Package (2 chips in one package) microcontroller devices allowing users to easily and efficiently burn their program code and data into 2-Chip-1-Package devices. The HT-2CWriter offers
the advantages of a small and easy to manage size, in addition to easy to use special features.
Other additional advantages include the ability to operate both connected to a PC in an on-line programming mode as well as being able to operate in a stand-alone programming mode. After downloading the program code and data from PC to HT-2CWriter, the stand-alone mode allows the user
to program 2-Chip-1-Package devices without connection to a PC.
In the on-line programming mode, the HT-2CWriter is connected to the PC via the supplied RS232
cable. In the stand-alone programming mode, no connection is required to the PC. As the Holtek
range of 2-Chip-1-Package devices are supplied in many different package types, a range of
adapters is supplied by Holtek to match the appropriate package type and pin count being used.
The correct adapter must therefore also be selected and plugged into the HT-2CWriter.
The HT-2CWriter writes both program code and data to 2-Chip-1-Package MCU device. The data
can be initialized under HT-IDE3000 or HT-MWriter software utility.
The requirements for using the HT-2CWriter are:
· 16V power adapter with minimum current rating of 500mA. For best purpose use the power
adapter supplied.
· The correct adapter to match the 2-Chip-1-Package device package type and pin count
· IBM 386 compatible or higher specification PC
· Win95/98/NT/2000/XP Windows operating system
· HT-MWriter software utility
Installation
For connection to the PC, use the supplied cable to connect the HT-2CWriter¢s 9-pin D-type connector to the RS232 port of the PC as shown in Figure 1.
R S 2 3 2 C a b le
H T - 2 C W r ite r
P C
Figure 1
1
HT-2CWriter User¢s Guide
To install the writer software utility, run the HT-MWriterSetup.exe file as supplied with the
HT2CWriter, after which the following instructions should be followed. Note, if the HT-MWriter software utility has been installed already, then ignore this software installation.
Figure 2
Figure 3
2
HT-2CWriter User¢s Guide
Figure 4
Figure 5
3
HT-2CWriter User¢s Guide
Figure 6
4
HT-2CWriter User¢s Guide
Accompanying Hardware
The outline of the HT-2CWriter is shown in Figure 7:
S u p p lie d
R e m o v a b le
A d a p te r
P in 2 0
P in 1 9
2 0 - P in
H e a d e r
P in 1
P in 2
O K
R e a d y
F a il
P r o g r a m m in g S w itc h
R S 2 3 2 C o n n e c to r
Figure 7
Component
Description
DC16V
DC JACK, DC 16V socket
20-Pin Header
Programming signal connector
OK
Green LED to indicate normal conditions
Ready
Yellow LED to indicate ready conditions
Fail
Red LED to indicate error conditions
Programming Switch
Programming key for stand-alone mode
RS232 Connector
9-pin D-type connector for PC RS232 port connection
4P DIP Switch
DIP switch on rear side of the HT-2CWriter
2-Chip-1-Package device Pin Name
Programming Signal
20-Pin Header Position
PA0
AD0
8
PA1
AD1
6
PA2
AD2
4
PA3
AD3
2
PA4
CLK
10
PA5
CS
12
PA6
RW
14
OSC1
Ground (Direct connection)
¾
OSC3
Ground (Direct connection)
¾
VDD
VDD
18
RES
VPP
20
VSS
Ground (Direct connection)
11, 13, 15, 16, 17, 19
Programming Signal/2-Chip-1-Package Device Pin-out Cross-reference Table
5
HT-2CWriter User¢s Guide
Programming a 2-Chip-1-Package Device with the HT-MWriter
Prepare the OTP & MEM File Before Programming the 2-Chip-1-Package
Device
Before the 2-Chip-1-Package device can be programmed, an OTP data file, with the file extension
.OTP, must first be generated using the Build command of project menu under the HT-IDE3000 development environment. An optional data file, with the file extension .MEM, may be generated under HT-IDE3000 for data initialization. After finishing the build procedure, the HT-2CWriter
hardware and the HT-MWriter software can then be used to program the 2-Chip-1-Package device.
Running the HT-MWriter Software Utility
After running the HT-MWriter software utility from under the Holtek HT-MWriter item in the main
Windows program group, the window as shown in Figure 8 will be displayed.
MCU Type and Driver Type for Programming
The MCU box indicates the present MCU type that is to be programmed. Either of the following
commands determines the MCU type:
· Open an OTP file by selecting the Open button, the OTP file contains MCU type of
2-Chip-1-Package device that is to be programmed
· Set the MCU type by selecting the MCU command in the Settings menu
Note
If a 2-Chip-1-Package device blank check is required, then it is not necessary to open an OTP file.
After the HT-2CWriter is connected to the PC, the HT-2CWriter software utility will reads the driver
type from the HT-2CWriter and displays it in the Driver box as shown in Figure 8. If no driver type is
read out, the HT-MWriter software utility will download the corresponding driver data to the writer
according to the last MCU type or default MCU type. Therefore, the MCU type and the Driver type
should be the same unless the connection between the PC and the HT-2CWriter is broken or the
HT-2CWriter is powered off. The functions that can be executed by the HT-2CWriter depend upon
the driver type in its flash memory. An incorrect driver type will induce programming errors. The
user has to ensure that the MCU type and Driver type are the same.
On-Line Programming Mode
In Figure 8, the Program window contains/displays the program code read either from the OTP file
or from a 2-Chip-1-Package device. The data window contains/displays the data read either from
the MEM file or from the Data EEPROM of the 2-Chip-1-Package device. The Status Bar displays
the result of executing a basic function.
Basic Functions
There are 9 function keys or control buttons as shown at the right hand side of the window shown
in Figure 8, with each button representing an instruction, the functions of which are explained below.
6
HT-2CWriter User¢s Guide
®
Open
This opens two files with the same base file name, one has an .OTP suffix and the other has an
.MEM suffix if it exists in the same folder as the OTP file. These are the contents of the memory
which will be accessed when programming the relevant 2-Chip-1-Package device. After selecting
²Open² the file dialogue box will be displayed from which the correct folder and file name can be
chosen, as Figure 9. Only select the .OTP file, then .MEM file will be opened automatically by the
HT-MWriter software program. The file contents of the .OTP file will be displayed in the Program
window after being opened, the checksum of the opened file will be shown in Checksum box, and
the contents of MEM file will be displayed in the Data window, as Figure 10. All zeros are displayed
in the Data window if .MEM file does not exist in the same folder as that of .OTP file.
Program Window
Data Window
Status Bar
Figure 8
7
HT-2CWriter User¢s Guide
After opening an OTP/MEM file, the value in the Data window can be modified directly. Any modification is not written to the writer before executing the Download command.
Figure 9
8
HT-2CWriter User¢s Guide
Figure 10
®
Download
This instruction downloads the contents of the presently opened OTP file, MEM file and driver information to the writer¢s flash memory, as Figure 11. There must have been an already opened OTP
file and MEM file before using this instruction. User can edit or modify the initial value in the Data
window before issuing this instruction.
®
Blank Check
This instruction checks that the presently loaded 2-Chip-1-Package device has not previously
been written to. The results of this check will be displayed in the message window.
9
HT-2CWriter User¢s Guide
®
Program
This instruction encompasses two functions. The first is to program the data already in the writer¢s
flash memory into the 2-Chip-1-Package device, the second is a verification check to ensure that
the actual data burned into the 2-Chip-1-Package device is the same as the data in the writer¢s
flash memory, as Figure 12. Before this instruction is used the relevant OTP file and MEM file must
have been previously downloaded.
®
Verify
The contents of the presently loaded 2-Chip-1-Package device will be read and checked that it is
the same as the data loaded into the writer¢s flash memory, the results of which will be displayed in
the Program window. Before this instruction is used the relevant OTP file and MEM file must have
been previously downloaded.
Figure 11
10
HT-2CWriter User¢s Guide
®
Lock
This instruction will implement a protect function in the 2-Chip-1-Package device preventing the
contents of this 2-Chip-1-Package device from being read. After programming a
2-Chip-1-Package device, this instruction can be used to protect its contents.
Figure 12
®
Auto
This instruction will execute up to four instructions consecutively: Blank Check, Program, Verify
and Lock, as Figure 13. If any of the instructions do not execute correctly, the process will be
halted with any following remaining instructions not being executed. The instructions to be executed by the ²Auto² command can be selected from the Auto option under the Settings menu.
11
HT-2CWriter User¢s Guide
Figure 13
®
Chip Info
This instruction will read the power-on ID, the software IC, the ROM size and option size from the
2-Chip-1-Package device and display the results in the Program window as shown in Figure 14. If
an 2-Chip-1-Package device does not contain this data or the HT-Mwriter software utility does not
recognize the ID, then the message ²Failed to get chip info or the chip info is null² will be displayed
in the message window as shown in Figure 15.
®
Read
This instruction will read from the 2-Chip-1-Package device and display on the Program window
and Data window as Figure 10. Then user can store it to a new OTP file and a MEM file individually. The content of writer¢s flash memory is not changed. If it is required to program a new
2-Chip-1-Package device from this read data, then the writer¢s flash memory should be updated
by pressing Download key first, then press the Program key. This instruction will fail if the
2-Chip-1-Package device is locked already.
12
HT-2CWriter User¢s Guide
Figure 14
Figure 15
The relationship between function commands and programming resource.
D o w n lo a d
O p e n
W r ite r
( F la s h M e m o r y )
H a r d D is k
P C
( H T - M w r ite r )
N o te : "
P ro g ra m /L o c k
M C U
V e r ify
R e a d /B la n k /C h ip - In fo
" D e n o te s th e d ir e c tio n o f d a ta flo w
Additional Functions
®
Setting
This menu contains four setup commands for the basic configuration of the HT-2CWriter which determines the way in which the HT-2CWriter is configured and operated. A detailed explanation of
each command is shown below:
· Detect Connect
This command will detect for a connection between the HT-2CWriter hardware and the PC and
display the result in the Status Bar.
13
HT-2CWriter User¢s Guide
· MCU
This command specifies a specific MCU type for following operations. The driver data for the
specified MCU will be downloaded to the HT-2CWriter hardware if the writer has been connected to the PC and is powered on.
· Auto
This command will setup which programming instructions are to be automatically and sequentially executed by the Auto button.
· Check ID
Before executing any of the Blank Check, Program, Verify, Lock or Auto instructions, the writer
can be setup to first check the 2-Chip-1-Package device type. This compares the
2-Chip-1-Package device type with the driver type in the writer¢s flash memory. If these two
types are different, then the requested instructions will be aborted. The user can enable or disable this function.
®
Option
Two commands exist in this menu. The first of these is the option command which will display the
configuration options for the presently opened 2-Chip-1-Package file as shown in the window in
Figure 16. The other is the Print command, which will printout the configuration options for the presently opened OTP file.
14
HT-2CWriter User¢s Guide
Figure 16
®
S/N - Serial Number Writing
The serial number function allows a user specified serial number to be written into each
2-Chip-1-Package device. This serial number, the address of which is specified by the user, is written into the Lower Byte address of Program ROM for each 2-Chip-1-Package device. After a serial
number is written into an 2-Chip-1-Package device, an auto-incrementing function ensures that
subsequently programmed devices will contain serial number incremented by one each time. It is
first required to setup the initial data and fixed address of the first serial number. ²Selecting Setup²
from the ²S/N² menu will display the window as shown in Figure 17, which can be used to input the
initial serial number¢s data and its corresponding address.
Figure 17
15
HT-2CWriter User¢s Guide
After the initial data and address information has been setup, selecting ²Enable² from the ²S/N²
menu will activate the serial number function. When the serial number function is activated, the
present serial number¢s corresponding address and data will be displayed at the lower right hand
side of the main window as shown in Figure 18. During the programming stage the first device to
be programmed will contain the previously setup serial number data in its Program ROM at the indicated address. Subsequent devices will contain serial numbers incremented by one for each additional device. To reset the order of serial numbers, again select ²Setup² from the ²S/N² menu.
Figure 18
16
HT-2CWriter User¢s Guide
Stand-Alone Programming Mode
Before the stand-alone programming mode is used it is essential that the following steps have
been first implemented:
· The program code must have been already been downloaded into the writer.
When this happens the yellow LED will illuminate to indicate that the system is ready, if there is
an error then the red LED will illuminate.
· Select the programming commands by adjusting the DIP Switch. The following table lists the
DIP switch functions. Note that the DIP switches are only used for stand-along operation.
DIP Position
Function
Description
If DIP switch #1 is on, the writer will check if the ID type of the 2-Chip-1-Package
device to be programmed has the same ID type as the program code which was
downloaded to the writer
DIP1
Check ID
DIP2
If DIP switch #2 is on, the writer will run a blank check on the 2-Chip-1-Package
Blank Check to check if its contents are empty before programming. If DIP switch #2 is off,
the writer will start programming without blank check.
DIP3
Lock
If DIP switch #3 is on, after programming the data into the 2-Chip-1-Package,
the data will be locked and prevented from being read out in the future.
DIP4
Buzzer
If DIP switch #4 is on, then after programming, whether successful or not, an
audible reminder signal will be generated.
Programming Steps
®
Step 1
Connect the supplied 16V power adapter, the writer will check whether the programming data in
flash memory is correct or not. The system will be in a standby state if the programming data is
valid. Otherwise, the writer must be connected to the PC using the supplied RS232 cable to download the program code to the writer.
®
Step 2
Place a 2-Chip-1-Package device that is compatible with the data in the writer, into the Textool
socket.
®
Step 3
Press the programming switch to begin the programming cycle.
®
Step 4
Check the indicator LEDs to verify that the programming operation was successful.
®
Step 5
If successful, remove the programmed 2-Chip-1-Package device to allow the writer to return to its
standby state. If the programming operation has failed, press the programming key again to allow
the writer to go back to its standby state.
®
Step 6
Repeat step 2~step 5.
17
HT-2CWriter User¢s Guide
LED Indicator Description
The HT-2CWriter contains 3 LED indicators to display the status of the programming operation.
The following table lists the meaning behind each of the LED indicators:
LED Type
Red LED - Failure Status
Green LED - OK Status
Yellow LED - Ready Status
Status
Description
Flash once then stop
2-Chip-1-Package device is locked
Flash twice then stop
Data in HT-2CWriter incompatible with present
2-Chip-1-Package device
Flash 3-times then stop
2-Chip-1-Package device already contains data,
device not blank
Flash 4-times then stop
Programming failed
Flash 5-times then stop
Programming complete but error detected during
verification process
Flash 6-times then stop
Fail to lock the present 2-Chip-1-Package device
Rapid flashing*
Data in HT-2CWriter is invalid
LED illuminated
Programming successful
Slow flashing
System is ready and awaiting programming
instruction
Rapid flashing
Programming operation in progress
* If the Red LED flashed rapidly, which indicates the content of the writer¢s flash memory is invalid.
To repair this, just to connect the HT-2Cwriter to the PC and execute the HT-Mwriter software
utility, then open an OTP file and download to the writer.
Using the Adapter Card
The HT-2CWriter is supplied with an adapter card which contains a 40-pin Textool socket. Before
programming the 2-Chip-1-Package MCU device, be sure that the jumper selection on the rear of
adapter card is correct. The front view, rear view and jumper selection of adapter cards are listed
in the following.
®
Adapter Card CADPDIP40B
F r o n t V ie w
R e a r V ie w
18
HT-2CWriter User¢s Guide
The following table lists the jumper selection, Ö denotes the jumper must be shorted.
Jumper for CADPDIP40B
MCU Type Package
HT46R46E
HT46R47E
DIP18
HT45R04E
®
J1
J2
J3
J4
J5
J6
J7
J8
J9
J10 J11 J12 J13 J14 J15
Ö
¾
¾
Ö
¾
Ö
¾
¾
¾
¾
Ö
¾
Ö
¾
¾
¾
Ö
Ö
¾
¾
Ö
¾
¾
¾
¾
Ö
¾
Ö
¾
Ö
Adapter Card CADPSOP28B
F r o n t V ie w
R e a r V ie w
The following table lists the jumper selection, Ö denotes the jumper must be shorted.
Jumper for CADPSOP28B
MCU Type Package
HT46R46E
HT46R47E
HT45R04E
SOP18
J1
J2
J3
J4
J5
J6
J7
J8
J9
J10 J11 J12 J13 J14 J15
Ö
¾
¾
Ö
¾
Ö
¾
¾
¾
¾
Ö
¾
Ö
¾
¾
¾
Ö
Ö
¾
¾
Ö
¾
¾
¾
¾
Ö
¾
Ö
¾
Ö
System Messages
®
Download Driver OK!
The PC has downloaded the MCU programming information to the writer¢s flash memory.
®
Disconnected from the Writer
The PC has failed to connect to the Writer, to rectify check the power supply and the RS232 cable.
®
Connected with Writer!
The PC has connected to the writer.
19
HT-2CWriter User¢s Guide
®
Failed to Open File!
The present OTP file cannot be opened, either this file has errors or the file format is invalid.
®
Load File Failed!
Can¢t load the present OTP file. Check the specified file.
®
Not Support the Type of MCU!
The software utility does not support the MCU type in the present OTP file or the driver in the
writer.
®
Not Support the of File!
The software utility does not support the file format, it may not be the OTP file.
®
Failed to Read OTP File Record!
The file format of the present OTP file has errors or the file format is invalid.
®
Failed to Allocate Memory!
Failed to allocate memory for the present OTP file.
®
Invalid Checksum for the OTP File!
The checksum of the OTP file is incorrect.
®
Writer is Busy.
The writer cannot execute the requested command as it is still executing other operations.
®
Failed to Write to Flash ROM!
The writer is unable to download the contents of the OTP file or Driver data into the writer.
®
Device is Locked!
The 2-Chip-1-Package device has been locked.
®
ID Error!
The Driver is not consistent with the ID in the 2-Chip-1-Package device
®
Not Blank!
The 2-Chip-1-Package device is not empty.
®
Programming Failed!
Failed to program the 2-Chip-1-Package device.
®
Verify Failed!
The contents of the present 2-Chip-1-Package device is not consistent with the data in the writer¢s
flash memory.
®
Lock Failed!
Cannot lock the present 2-Chip-1-Package device.
20
HT-2CWriter User¢s Guide
®
ROM Format Error!
The record format in writer¢s flash memory is incorrect. This error may be caused by incomplete
downloading or because the contents of the flash memory is not valid for the present Driver in the
writer.
®
Writer Time-out!
The writer does not respond after a command has been issued.
®
Checksum of Received Data Error!
The checksum returned from the writer is incorrect. Restart the writer and the software utility.
®
Unknown Error!
The software utility cannot recognize the message returned from the writer. Restart the writer and
software utility.
®
Not Blank!
The result message for the Blank Check instruction indicating that the 2-Chip-1-Package device is
not empty.
®
Failed to Write to Program ROM!
The writer has failed to write to the program ROM.
®
Write OK!
The writer has successfully programmed the program ROM.
®
Verify Data Failed!
The writer has failed to verify the contents of the data EEPROM.
®
Verify OK!
The writer has successfully verified the program ROM.
®
S/N Address Exceeds the Program ROM Size, Set to Default Address: 1, 2, 3, 7
The address specified for the serial number exceeds the program memory¢s range. The system
will set the addresses to the default addresses 1,2, 3,7.
®
S/N Addresses are not Blank in the OTP File!
In the present OTP file, there is data already written to the address specified for the serial number.
®
No Status Return from Writer
The PC can not receive the return status from the writer. To rectify check the power supply and the
RS232 cable.
®
Unknown Status
This is an internal error.
21
Headquarters & Subsidiaries
Holtek Semiconductor Inc. (Headquarters)
No.3, Creation Rd. II, Science Park, Hsinchu, Taiwan
Tel: 886-3-563-1999
Fax: 886-3-563-1189
http://www.holtek.com.tw
Holtek Semiconductor Inc. (Taipei Sales Office)
4F-2, No. 3-2, YuanQu St., Nankang Software Park, Taipei 115, Taiwan
Tel: 886-2-2655-7070
Fax: 886-2-2655-7373
Fax: 886-2-2655-7383 (International sales hotline)
Holtek Semiconductor Inc. (Shanghai Sales Office)
7th Floor, Building 2, No.889, Yi Shan Rd., Shanghai, China 200233
Tel: 021-6485-5560
Fax: 021-6485-0313
http://www.holtek.com.cn
Holtek Semiconductor Inc. (Shenzhen Sales Office)
5/F, Unit A, Productivity Building, Cross of Science M 3rd Road and Gaoxin M 2nd Road, Science Park, Nanshan District,
Shenzhen, China 518057
Tel: 0755-8616-9908, 8616-9308
Fax: 0755-8616-9533
Holtek Semiconductor Inc. (Beijing Sales Office)
Suite 1721, Jinyu Tower, A129 West Xuan Wu Men Street, Xicheng District, Beijing, China 100031
Tel: 010-6641-0030, 6641-7751, 6641-7752
Fax: 010-6641-0125
Holtek Semiconductor Inc. (Chengdu Sales Office)
709, Building 3, Champagne Plaza, No.97 Dongda Street, Chengdu, Sichuan, China 610016
Tel: 028-6653-6590
Fax: 028-6653-6591
Holmate Semiconductor, Inc. (North America Sales Office)
46729 Fremont Blvd., Fremont, CA 94538
Tel: 510-252-9880
Fax: 510-252-9885
http://www.holmate.com
Copyright Ó 2005 by HOLTEK SEMICONDUCTOR INC.
The information appearing in this Data Sheet is believed to be accurate at the time of publication. However, Holtek assumes no responsibility arising from the use of the specifications described. The applications mentioned herein are used
solely for the purpose of illustration and Holtek makes no warranty or representation that such applications will be suitable
without further modification, nor recommends the use of its products for application that may present a risk to human life
due to malfunction or otherwise. Holtek¢s products are not authorized for use as critical components in life support devices
or systems. Holtek reserves the right to alter its products without prior notification. For the most up-to-date information,
please visit our web site at http://www.holtek.com.tw.