HT-PLWriter User`s Guide

Partial Lock Writer
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.
NOTICE
The information appearing in this User¢s Guide 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 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.
Contents
Contents
Introduction ..........................................................................................................................1
Installation ............................................................................................................................2
Accompanying Hardware ....................................................................................................5
Programming an OTP Device with the HT-MWriter ...........................................................6
Prepare the OTP File Before Programming the Partial-lock OTP Device ...................... 6
Running the HT-MWriter Software Utility ........................................................................ 6
MCU Type and Driver Type for Programming................................................................. 6
On-Line Programming Mode...............................................................................................7
Basic Functions .............................................................................................................. 7
Additional Functions ..................................................................................................... 12
Notes for Programming the Partial-lock OTP Device .....................................................16
Stand-Alone Programming Mode .....................................................................................16
Programming Steps ...................................................................................................... 17
LED Indicator Description ............................................................................................. 17
Using the Adapter Card .....................................................................................................18
System Messages ..............................................................................................................18
i
Partial Lock Writer User¢s Guide
Partial Lock Writer User¢s Guide
Introduction
The Holtek HT-PLWriter was specifically developed to program the range of Holtek OTP
microcontroller devices allowing users to easily and efficiently burn their program code into OTP
devices which support partial lock function.
The HT-PLWriter 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 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 from PC to the HT-PLWriter, the stand-alone mode allows the user to program the OTP devices without connection to a PC.
In the on-line programming mode, the HT-PLWriter 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 OTP 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 OTP
adapter must therefore also be selected and plugged into the HT-PLWriter.
The partial lock function allows the program memory of an OTP device to be locked by one page or
multiple pages, and in different programming steps. For example, the user can lock page 0, 1, 2 at
the first programming step, then lock pages 4 and 5 at the second programming step. The
HT-PLWriter supports a partial lock function to lock part or all of the OTP device program memory.
The locked unit is a page with a size of 256 words. Some OTP devices may lock more than one
page at one time.
The requirements for using the HT-PLWriter are:
· 16V power adapter with minimum current rating of 500mA. It is recommended that only the supplied power adapter is used.
· The correct OTP adapter to match the OTP 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
1
Partial Lock Writer User¢s Guide
Installation
For connection to the PC, use the supplied cable to connect the HT-PLWriter 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 - P L W r ite r
P C
Figure 1
To install the writer software utility, run the ²HT-MwriterSetup.exe² file as supplied with the
HT-PLWriter, 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
2
Partial Lock Writer User¢s Guide
Figure 3
Figure 4
3
Partial Lock Writer User¢s Guide
Figure 5
Figure 6
4
Partial Lock Writer User¢s Guide
Accompanying Hardware
The outline of the HT-PLWriter 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
R S 2 3 2
C o n n e c to r
P r o g r a m m in g
S w itc h
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 RS-232 port connector
4P DIP Switch
DIP switch on rear side of HT-PLWriter
5
Partial Lock Writer User¢s Guide
OTP 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/OTP Device Pin-Out Cross-Reference Table
Programming an OTP Device with the HT-MWriter
Prepare the OTP File Before Programming the Partial-lock OTP Device
Before the OTP device can be programmed, an OTP data file, with the file extension .OTP, must
first be generated using the Build command in the Project menu within the HT-IDE3000 development environment. After finishing the build procedure, the HT-PLWriter hardware and the
HT-MWriter software can then be used to program the OTP device.
Running the HT-MWriter Software Utility
After running the HT-MWriter software utility, 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 information about the
MCU type of OTP device that is to be programmed
· Set the MCU type by selecting the MCU command in the Settings menu
6
Partial Lock Writer User¢s Guide
Note
If an OTP device blank check is required, then it is not necessary to open an OTP file. After the
HT-PLWriter is connected to the PC, the HT-MWriter software utility will read the driver type from
the HT-PLWriter and displays it in the Driver box as shown in Figure 8. Therefore, the MCU type
and the Driver type should be the same unless the connection between the PC and the
HT-PLWriter is broken or the HT-PLWriter is powered off. The functions that can be executed by
the HT-PLWriter 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
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:
Figure 8
7
Partial Lock Writer User¢s Guide
®
Open
This instruction opens a file which has an .OTP suffix and reads the contents of this file. It is these
contents which will be accessed when programming the relevant OTP device. After selecting
²Open² the file dialogue box, as shown in Figure 9, will be displayed from which the correct folder
and file name can be chosen. The file contents will be displayed in the message window after being opened, as shown in Figure 10, and the checksum of the opened file will be shown in
Checksum box.
Figure 9
8
Partial Lock Writer User¢s Guide
Figure 10
®
Download
This instruction downloads the contents of the presently opened OTP file, driver information and
locked page information to the writer¢s flash memory. An OTP file must have been already opened
before using this instruction.
At first, this instruction will display a dialog box ²Setting for partial lock² as shown in Figure 11. The
following selections have to be set before download.
· ²Previous², if this is not the first programming step of the OTP device, the user must select those
pages having been locked already for this column. Otherwise, don¢t select any page.
· ²Current², to select any page or pages being locked in this step. If no page is being locked, then
don¢t select.
· ²Program Options², if this is the last programming step of the OTP device, then it must be selected it. It must not be selected for other programming steps.
9
Partial Lock Writer User¢s Guide
The information is downloaded to the HT-PLWriter for programming the OTP device. If the OTP
device has no locked pages, no pages should be selected, press the <OK> key. Figure 12 shows
the result of selecting Previous and Current locked pages.
If it is required to change the locked page information after download, then use this instruction
again, select new lock pages and press <OK>.
Figure 11
Figure 12
Note that the lock information and the pages to be locked will be saved, and download to the
writer¢s flash memory when [OK] is selected. However the OTP device is still unchanged. The user
should select ²Program² key to Program the OTP device and select the ²Lock² key to lock the
specified pages on the OTP device.
®
Blank Check
This instruction checks that the presently loaded OTP device has not previously been written to.
The results of this check will be displayed in the message window.
®
Program
This instruction encompasses two functions. The first is to program the data already in the writer¢s
flash memory into the OTP device, the second is a verification check to ensure that the actual data
burned into the OTP device is the same as the data in the writer¢s flash memory. Before this instruction is used, the relevant OTP file must have been previously downloaded then ascertain
which programming step the OTP device is. If it is the last programming step, ²Program Option²
should be selected. Otherwise, ²Program Option² should not be selected.
®
Verify
The contents of the presently loaded OTP device will be read and checked to ensure that it is the
same as the data loaded into the writer¢s flash memory, the results of which will be displayed in the
HT-MWriter window. Before this instruction is used the relevant OTP file must have been previously downloaded.
10
Partial Lock Writer User¢s Guide
®
Lock
This instruction will implement a protect function in the OTP device preventing the contents of this
OTP device from being read. After programming an OTP device, this instruction can be used to
protect its contents. According to the locked pages which are selected during the Download procedure, there is also following process.
· If there is at least one page selected in the ²Current² column as shown in Figure 11, then the
writer will lock these selected page(s) when the Lock key is pressed.
· If no page is selected in the ²Current² column as shown in Figure 11, the writer will lock all pages
when this key is pressed, i.e, it will lock the whole program memory.
· If it is not required to lock any other page except those pages already locked, then this key
should not be pressed after pressing the Program key.
®
Chip Info
This instruction will read the power-on ID, the software ID, the ROM size, option size and lock information from the OTP device and display the results in the message window as shown in Figure
13. If an OTP 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 14.
Figure 13
Figure 14
11
Partial Lock Writer User¢s Guide
®
Auto
This instruction will execute up to four instructions consecutively: Blank Check, Program, Verify
and Lock. 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.
®
Read
This instruction will read from the OTP device and display the results on the window as shown in
Figure 10. The user can then store it to a new OTP file. The contents of the writer¢s flash memory
will not be changed. If it is required to program a new OTP device from this read data, then the
writer¢s flash memory should be updated by pressing the Download key first, then press the Program key. This instruction will fail if the OTP device is already locked.
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-PLWriter, which
determines the way in which the HT-PLWriter is configured and operated. A detailed explanation
of each command is shown below:
· Detect Connect
This command will look for a connection between the HT-PLWriter hardware and the PC and
display the result in the message window.
· MCU
This command specifies a specific MCU type for the following operations. The driver data for the
specified MCU will be downloaded to the HT-PLWriter hardware if the writer has been connected to the PC and is powered on.
12
Partial Lock Writer User¢s Guide
· 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
HT-PLWriter can be setup to first check the OTP device type. This compares the OTP 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 OTP file as shown in the window in Figure 15. The
other is the Print command, which will printout the configuration options for the presently opened
OTP file.
Figure 15
13
Partial Lock Writer User¢s Guide
®
S/N - Serial Number Writing
The serial number function allows a user specified serial number to be written into each OTP 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 OTP device. After a serial number is written into an OTP
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 16, which can be used to input the initial serial number¢s data and its corresponding address.
Figure 16
14
Partial Lock Writer 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 17. 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 17
15
Partial Lock Writer User¢s Guide
Notes for Programming the Partial-lock OTP Device
Programming Partial-lock OTP device at the first step (No page is locked):
· Do not select ²Program Options² in Figure 11
· Do not select any page in the ²Previous² column of Figure 11
· Select pages being locked in the ²Current² column of Figure 11
Programming a Partial-lock OTP device at another step, apart from the last:
· Do not select ²Program Options² in Figure 11
· Select pages which have been already locked in the ²Previous² column in Figure 11
· Select pages being locked in the ²Current² column of Figure 11
Programming a Partial-lock OTP device at the last step:
· ²Program Options² must be selected in Figure 11
· Select pages which have been already locked in the ²Previous² column of Figure 11
· Select pages being locked in the ²Current² column of Figure 11
The suggested programming procedure is:
·
·
·
·
Open an OTP file
Set/Unset ²Program Options²
Download after selecting locked and being locked pages
Program and/or Lock
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 HT-PLWriter. 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 using the DIP Switch. The following table lists the DIP
switch functions. Note that the DIP switches are only used for stand-alone operation.
DIP Position
DIP1
Function
Description
If DIP switch #1 is on, the writer will check if the ID type of the OTP
Check ID device to be programmed has the same ID type as the program
code which was downloaded to the HT-PLWriter.
DIP2
Blank
Check
If DIP switch #2 is on, the writer will run a blank check on the OTP to
check if its contents are empty before programming. If DIP switch #2
is off, the writer will start programming without a blank check.
DIP3
Lock
If DIP switch #3 is on, after programming the data into the OTP, 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.
16
Partial Lock Writer User¢s Guide
Programming Steps
®
Step 1
Connect the supplied 16V power adapter, the HT-PLWriter will check whether the programming
data in Flash memory is correct or not. The system will remain in a standby state if the programming data is valid. Otherwise, the HT-PLWriter must be connected to the PC using the supplied
RS232 cable to download the program code to the HT-PLWriter.
®
Step 2
Place an OTP device that is compatible with the data into the Textool socket on the HT-PLWriter
®
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 OTP device to allow the HT-PLWriter to return to its
standby state. If the programming operation has failed, press the programming key again to allow
the HT-PLWriter to go back to its standby state.
®
Step 6
Repeat step 2~step 5.
LED Indicator Description
The HT-PLWriter contains 3 LED indicators to display the status of the programming operation.
The following table lists the function of each of the LED indicators:
LED Type
Status
Description
Flash once then stop
OTP device is locked
Flash twice then stop
Data in the HT-PLWriter is incompatible with the present OTP device
Flash 3-times then stop OTP device already contains data, device not blank
Red LED Flash 4-times then stop Programming failed
Failure Status
Programming complete but error detected during the
Flash 5-times then stop
verification process
Flash 6-times then stop Failed to lock the present OTP device
Green LED OK Status
Rapid flashing*
Data in the HT-PLWriter is invalid
LED illuminated
Programming successful
Yellow LED - Slow flashing
Ready Status Rapid flashing
System is ready and awaiting programming instruction
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-PLwriter to the PC and execute the HT-Mwriter software
utility, then open an OTP file and download to the writer.
17
Partial Lock Writer User¢s Guide
Using the Adapter Card
The HT-PLWriter is supplied with an adapter card which contains a 40-pin Textool socket. If it is
necessary to program OTP devices whose package types are unable to use the supplied Textool
socket there are two alternative possibilities:
· Remove the supplied adapter card and replace it with another type of HT-PLWriter adapter card
that can accommodate the different OTP. These other adapter cards for the HT-PLWriter will
have a C prefix next to their adapter card product name.
· Use the existing supplied adapter card in conjunction with one of the OTP writer alternative
adapter cards. These alternative OTP writer adapter cards can be plugged directly into the
40-pin Textool socket of the supplied HT-PLWriter adapter card. These other adapter cards for
the OTP writer will have a T prefix next to their adapter card product name.
System Messages
· Failed to Erase Flash ROM!
The HT-PLWriter has failed to clear the flash memory before downloading the driver data or an
OTP file.
· Disconnected from the HT-PLWriter
The PC has failed to connect to the HT-PLWriter, to rectify check the power supply and the
RS232 cable.
· Failed to Open File!
The present OTP file cannot be opened, either this file has errors or the file format is invalid.
· Invalid File Format!
The file format of the present OTP file is invalid.
· Not Support the Type of MCU!
The HT-MWriter software utility does not support the MCU type in the present OTP file or the
driver in the HT-PLWriter.
· Duplicated Program Record!
The file format of the OTP file is incorrect.
· Duplicated Option Record!
The file format of the OTP file is incorrect.
· 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.
18
Partial Lock Writer User¢s Guide
· Writer is Busy.
The HT-PLWriter cannot execute the requested command as it is still executing other operations.
· Failed to Write to Flash ROM!
The HT-PLWriter is unable to download the contents of the OTP file or Driver data into the writer.
· Device is Locked!
The OTP device has been locked.
· ID Error!
The Driver is not consistent with the ID in the OTP device
· Not Blank!
The OTP device is not empty.
· Programming Failed!
Failed to program the OTP device.
· Verify Failed!
The contents of the present OTP device is not consistent with the data in the HT-PLWriter¢s
flash memory.
· Lock Failed!
Cannot lock the present OTP device.
· ROM Format Error!
The record format in HT-PLWriter¢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 HT-PLWriter.
· Writer Time-out!
The HT-PLWriter does not respond after a command has been issued.
· Error in Checksum of Received Data!
The checksum returned from the HT-PLWriter is incorrect. Restart the HT-PLWriter and the
software utility.
· Unknown Error!
The software utility cannot recognize the message returned from the HT-PLWriter. Restart the
HT-PLWriter and software utility.
· No Options Exist!
When selecting the Option menu commands (Option & Print), an OTP file has to be first opened
or the options have to be read first from the OTP device.
· Fail to load Option DLL!
This is an internal error caused by incomplete installation.
· Fail to GetProcAddress!
This is an internal error caused by incomplete installation.
19
Partial Lock Writer User¢s Guide
· There is no Data in the PC Buffer
An OTP file must be opened before executing the Program or Verify instructions.
· The Current File has not been Downloaded, Download It?
The OTP data shown in the main window has not been downloaded into the flash memory of the
HT-PLWriter, select <Yes> to download the OTP data and process the present instruction. Otherwise, select <No> to terminate the instruction.
· Program ROM not Blank!
The result message for the Blank Check instruction indicating that the OTP device is not empty.
· Program ROM Blank!
The result message for the Blank Check instruction indicating that the OTP device is empty.
· Failed to Write to Program ROM!
The HT-PLWriter has failed to write to the program ROM.
· Write OK!
The HT-PLWriter has successfully programmed the program ROM.
· Failed to Verify Program ROM!
The HT-PLWriter has failed to verify the contents of the program ROM.
· Verify OK!
The HT-PLWriter 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.
· MCU: Cannot Identify
The software utility does not recognize the ID that is read from the OTP device when executing
the [Chip Info] instruction.
20
Partial Lock Writer User¢s Guide
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 User¢s Guide 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.
21