Page 1
Handbook September 2003 Copyright Ó 2003 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 photo-...
Page 5
Contents Part II Programming Language ............. 55 Chapter 2 Instruction Set Introduction ................ 57 Instruction Set ......................57 Instruction Timing ....................57 Moving and Transferring Data ................58 Arithmetic Operations .................... 58 Logical and Rotate Operations ................58 Branches and Control Transfer ................58 Bit Operations .......................
Page 6
Step 2 - Add Source Program Files to the Project ..........105 Step 3 - Build the Project ................... 105 Step 4 - Transmit Code to Holtek ..............105 Step 5 - Programming the OTP Device ............. 106 Appendix ....................107 Appendix A Device Characteristic Graphics ..............
Page 7
By compiling all relevant data together in one handbook we hope users of the Holtek range of I/O Type microcontroller devices will have at their fingertips a useful, complete and simple means to ef- ficiently implement their microcontroller applications.
The HT48R10A-1, HT48R30A-1, HT48R50A-1 and HT48R70A-1 are OTP devices offering the ad- vantages of easy and effective program updates, using the Holtek range of development and pro- gramming tools. These devices provide the designer with the means for fast and low cost product development cycles.
· Temperature Range: Operating Temperature -40°C to 85°C (Industrial Grade) Storage Temperature -50°C to 125°C Kernel Features · Program Memory: 1K´14 OTP/Mask ROM (HT48R10A-1/HT48C10-1) 2K´14 OTP/Mask ROM (HT48R30A-1/HT48C30-1) 4K´15 OTP/Mask ROM (HT48R50A-1/HT48C50-1) 8K´16 OTP/Mask ROM (HT48R70A-1/HT48C70-1) · Data Memory: 64´8 SRAM (HT48R10A-1/HT48C10-1) 96´8 SRAM (HT48R30A-1/HT48C30-1)
To assist users in their selection of the most appropriate device for their applica- tion, the following table, which summarizes the main features of each device, is provided. Program Data Package Part No. Timer Interrupt Stack Memory Memory Types HT48R10A-1 2.2V~5.5V 1K´14 64´8 8-bit´1 24SKDIP/SOP HT48C10-1 HT48R30A-1 24SKDIP/SOP, 2.2V~5.5V 2K´14 96´8...
I/O Type MCU Block Diagram The following block diagram illustrates the main functional blocks of the I/O Type microcontroller series of devices. Note This block diagram represents the OTP devices, for the mask device there is no Device Programming Circuitry.
Chapter 1 Hardware Structure Pin Assignment H T 4 8 R 1 0 A - 1 / H T 4 8 C 1 0 - 1 H T 4 8 R 3 0 A - 1 / H T 4 8 C 3 0 - 1 H T 4 8 R 3 0 A - 1 / H T 4 8 C 3 0 - 1 2 4 S K D I P - A / S O P - A 2 4 S K D I P - A / S O P - A...
6 4 Q . P - A Note The pin compatibility features of the microcontroller SKDIP/SOP packages allow for straightfor- ward upgrading to devices of higher functionality with minimal changes to application hardware. Pin Description HT48R10A-1/HT48C10-1 Configuration Pin Name I/O Description Option Bidirectional 8-bit input/output port.
Page 17
Chapter 1 Hardware Structure Configuration Pin Name I/O Description Option Bidirectional 3-bit input/output port. Software instructions de- termine if the pin is a CMOS output or Schmitt Trigger input. PC0/INT A configuration option determines if all pins on this port have PC1/TMR Pull-high pull-high resistors.
Page 18
I/O Type MCU Configuration Pin Name Description Option Bidirectional 6-bit input/output port. Software instructions determine if the pin is a CMOS output or Schmitt Trigger in- PC0/TMR Pull-high put. A configuration option determines if all pins on this port PC1~PC5 have pull-high resistors.
Page 19
Chapter 1 Hardware Structure Configuration Pin Name Description Option Bidirectional 8-bit input/output port. Software instructions PB0/BZ determine if the pin is a CMOS output or Schmitt Trigger in- Pull-high PB1/BZ put. A configuration option determines if all pins on this port I/O or BZ/BZ PB2~PB7 have pull-high resistors.
Page 20
I/O Type MCU HT48R70A-1/HT48C70-1 Configuration Pin Name I/O Description Option Bidirectional 8-bit input/output port. Each bit can be config- ured as a wake-up input by configuration option. Software Pull-high instructions determine if the pin is a CMOS output or input. PA0~PA7 Wake-up Configuration options determine if all pins on this port have...
Chapter 1 Hardware Structure Absolute Maximum Ratings -0.3V to V Supply Voltage ................... V +6.0V -0.3V to V Input Voltage ..................... V +0.3V Storage Temperature ................... -50°C to 125°C Operating Temperature ..................-40°C to 85°C These are stress ratings only. Stresses exceeding the range specified under Absolute Maximum Ratings may cause substantial damage to the device.
I/O Type MCU Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions ¾ Pull-high Resistance ¾ A.C. Characteristics Ta=25°C Test Conditions Symbol Parameter Min. Typ. Max. Unit Conditions ¾ 2.2V~5.5V ¾ 4000 System Clock (Crystal OSC) SYS1 ¾ 3.3V~5.5V ¾ 8000 ¾...
Chapter 1 Hardware Structure System Architecture A key factor in the high performance features of the Holtek range of I/O Type microcontrollers is at- tributed to the internal system architecture. The range of devices take advantage of the usual fea- tures found within RISC microcontrollers providing increased speed of operation and enhanced performance.
I/O Type MCU For instructions involving branches, such as jump or call instructions, two machine cycles are re- quired to complete instruction execution. An extra cycle is required as the program takes one cy- cle to first obtain the actual jump or call address and then another cycle to actually execute the branch.
7. For the HT48R30A-1/HT48C30-1, since its Program Counter is 11 bits wide, the b11 and b12 columns in the table are not applicable. 8. For the HT48R10A-1/HT48C10-1, since its Program Counter is 10 bits wide, the b10, b11 and b12 columns in the table are not applicable.
I/O Type MCU Note 1. For the HT48R10A-1/HT48C10-1 and HT48R30A-1/HT48C30-1, N=4, i.e. 4 levels of stack available. 2. For the HT48R50A-1/HT48C50-1, N=6, i.e. 6 levels of stack available. 3. For the HT48R70A-1/HT48C70-1, N=16, i.e. 16 levels of stack available. Arithmetic and Logic Unit - ALU The arithmetic-logic unit or ALU is a critical area of the microcontroller that carries out arithmetic and logic operations of the instruction set.
Chapter 1 Hardware Structure Organization The Program Memory has a capacity of 1K by 14 to 8K by 16 bits depending upon which device is selected. The Program Memory is addressed by the Program Counter and also contains data, ta- ble information and interrupt entries.
1K Program Memory of the HT48R10A-1 microcontroller. The table pointer is setup here to have an initial value of 06 hex. This will ensure that the first data read from the data table will be at the Program Memory address 306 hex or 6 locations after the start of the last page.
4. For HT48R50A-1/HT48C50-1, the Table address location is 12 bits, i.e. from b11~b0. 5. For HT48R30A-1/HT48C30-1, the Table address location is 11 bits, i.e. from b10~b0. 6. For HT48R10A-1/HT48C10-1, the Table address location is 10 bits, i.e. from b9~b0. Data Memory The Data Memory is a volatile area of 8-bit wide RAM internal memory and is the location where temporary information is stored.
The start address of the Data Memory for all devices is the address 00H. The last Data Memory address is 7FH for the HT48R10A-1/HT48C10-1 and HT48R30A-1/HT48C30-1 devices, and FFH for the HT48R50A-1/ HT48C50-1 and HT48R70A-1/HT48C70-1 devices. Registers which are common to all microcontrollers, such as ACC, PCL, etc., have the same Data Memory address.
Chapter 1 Hardware Structure Special Purpose Data Memory This area of Data Memory is where registers, necessary for the correct operation of the microcontroller, are stored. Most of the registers are both readable and writable but some are pro- tected and are read only, the details of which are located under the relevant Special Function Reg- ister section.
Any action on the Indirect Addressing Registers will result in corresponding read/write operations to the mem- ory location specified by the corresponding memory pointer. For the HT48R10A-1/HT48C10-1 and HT48R30A-1/HT48C30-1 devices, one Indirect Addressing Register, IAR, and one Memory Pointer, MP, is provided.
Chapter 1 Hardware Structure Accumulator - ACC The Accumulator is central to the operation of any microcontroller and is closely related with opera- tions carried out by the ALU. The Accumulator is the place where all intermediate results from the ALU are stored.
I/O Type MCU With the exception of the TO and PDF flags, bits in the status register can be altered by in- structions like most other registers. Any data written into the status register will not change the TO or PDF flag. In addition, operations related to the status register may give different re- sults due to the different instruction operations.The TO flag can be affected only by a system power-up, a WDT time-out or by executing the ²CLR WDT²...
Input/Output Ports Holtek microcontrollers offer considerable flexibility on their I/O ports. With the input or output des- ignation of every pin fully under user program control, pull-high options for all pins and wake up op- tions on certain pins, the user is provided with an I/O structure to meet the needs of a wide range of application possibilities.
I/O Type MCU pull-high resistors are selectable via configuration option and are implemented using a weak PMOS transistor. Note that if the pull-high option is selected, then all I/O pins on that port will be connected to pull-high resistors, individual pins cannot be selected for pull-high resistor options. Port A Wake-up Each device has a HALT feature enabling the microcontroller to enter a power down mode and pre- serve power, a feature that is important for battery and other low power applications.
Page 37
Chapter 1 Hardware Structure ® External Timer Clock Input Each device contains either one or two timers depending upon which one is chosen. Each timer has an external input pin, which in the case of devices with a single timer, is known as TMR and in the case of devices with two timers are known as TMR0 and TMR1.
Oscillator The system oscillator pins OSC1 and OSC2 are pin-shared with PC3 and PC4 on the HT48R10A-1/HT48C10-1 and pins PG1 and PG2 on the HT48R30A-1/HT48C30-1 and HT48R50A-1/HT48C50-1. On the HT48R70A-1/HT48C70-1 the oscillator pins are not pin-shared. The pin-shared functions are selected via configuration option. If chosen to function as I/O pins, then full pull-high options remain.
The timer clock source can be configured to come from the internal clock source or from the external timer pin. The accompanying table lists the associated timer register names. HT48R10A-1 HT48R30A-1 HT48R50A-1 HT48R70A-1...
For the 8-bit timer, this register is known as TMR for the HT48R10A-1/HT48C10-1 and HT48R30A-1/HT48C30-1 devices and TMR0 for the HT48R50A-1/HT48C50-1 devices. In the case of the 16-bit timers, a pair of 8-bit registers is re- quired to store the 16-bit timer value.
Timer Control Registers - TMRC, TMR0C, TMR1C The flexible features of the Holtek microcontroller Timer/Event Counters enable them to operate in three different modes, the options of which are determined by the contents of their respective con- trol register.
Chapter 1 Hardware Structure P r e s c a l e r O u t p u t I n c r e m e n t T i m e r + 1 T i m e r + 2 T i m e r + N T i m e r + N + 1 T i m e r C o n t r o l l e r...
I/O Type MCU reset to zero and the timer will stop counting. If the TE bit is high, the timer will begin counting once a low to high transition has been received on the external timer pin and stop counting when the ex- ternal timer pin returns to its original low level.
Chapter 1 Hardware Structure Using this method of frequency generation, and if a crystal oscillator is used for the system clock, very precise values of frequency can be generated. Prescaler For the 8-bit Timer/Event Counter, bit 0~2 of the timer control register can be used to define the pre-scaling stages of the internal clock sources of the Timer/Event Counter.
I/O Type MCU Interrupts The I/O series microcontrollers provide both external interrupt and internal Timer/Event Counter in- terrupt functions. The Interrupt Control Register (INTC;0BH) contains the interrupt control bits to set the enable/disable and the interrupt request flags. Once an interrupt subroutine is serviced, all the other interrupts will be blocked (by clearing the EMI bit).
HT48R70A-1/ HT48C70-1 and HT48R50A-1/HT48C50-1 devices, which have two tim- ers. For the HT48R10A-1/ HT48C10-1 and HT48R30A-1/HT48C30-1, which only have one timer, the Timer/Event Counter 0 represents the single timer, known as TMR and has an interrupt re- quest flag known as TF and an interrupt enable bit known as ETI.
The table is applicable for the HT48R70A-1/ HT48C70-1 and HT48R50A-1/HT48C50-1 devices which have two timers, known as TMR0 and TMR1. For the HT48R30A-1/HT48C30-1 and HT48R10A-1/HT48C10-1, which only have one timer, the Timer/Event Counter 0 represents the single timer, known as TMR.
Chapter 1 Hardware Structure Reset and Initialization A reset function is a fundamental part of any microcontroller ensuring that the device can be set to some predetermined condition irrespective of outside parameters. The most important reset condi- tion is after power is first applied to the microcontroller. In this case, internal circuitry will ensure that the microcontroller, after a short delay, will be in a well defined state and ready to execute the first program instruction.
Page 50
I/O Type MCU ® RES Pin Reset This type of reset occurs when the microcontroller is already running and the RES pin is forcefully pulled low by external hardware such as an external switch. In this case as in the case of other re- set, the Program Counter will reset to zero and program execution initiated from this point.
Page 51
Chapter 1 Hardware Structure ® Watchdog Time-out Reset during HALT The Watchdog Time-out Reset during HALT is a little different from other kinds of reset. Most of the conditions remain unchanged except that the Program Counter and the Stack Pointer will be cleared to 0 and the TO flag will be set to 1.
Page 52
To ensure reliable continuation of normal program execution after a reset occurs, it is important to know what condition the microcontroller is in after a particular reset occurs. The following table de- scribes how each type of reset affects each of the microcontroller internal registers. HT48R10A-1/HT48C10-1 Reset RES or LVR...
Page 53
Chapter 1 Hardware Structure HT48R30A-1/HT48C30-1 Reset RES or LVR WDT Time-out WDT Time-out Register (Power On) Reset (Normal Operation) (HALT) - x x x x x x x - u u u u u u u - u u u u u u u - u u u u u u u x x x x x x x x u u u u u u u u...
Page 54
I/O Type MCU HT48R50A-1/HT48C50-1 Reset RES or LVR WDT Time-out WDT Time-out Register (Power On) Reset (Normal Operation) (HALT) x x x x x x x x u u u u u u u u u u u u u u u u u u u u u u u u x x x x x x x x u u u u u u u u...
Page 55
Chapter 1 Hardware Structure HT48R70A-1/HT48C70-1 Reset RES or LVR WDT Time-out WDT Time-out Register (Power On) Reset (Normal Operation) (HALT) x x x x x x x x u u u u u u u u u u u u u u u u u u u u u u u u x x x x x x x x u u u u u u u u...
I/O Type MCU Oscillator Various oscillator options offer the user a wide range of functions according to their various applica- tion requirements. Three types of system clocks can be selected while various clock source op- tions for the Watchdog Timer as well as a real time clock function are provided for maximum flexibility.
Chapter 1 Hardware Structure System RC Oscillator Using the external RC network as an oscillator requires that a resistor, with a value between 24kW and 1MW, is connected between OSC1 and VDD, and a 470pF capacitor is connected to ground. The generated system clock divided by 4 will be provided on OSC2 as an output which can be used for external synchronization purposes.
HALT state. However, to do this, another clock, independent of the system clock, must be pro- vided. To provide this feature, all of Holtek¢s I/O range of microcontrollers incorporate a Real Time Clock or RTC. This clock source has a fixed frequency of 32768Hz and requires a 32768Hz crystal to be connected between pins OSC1 and OSC2.
Chapter 1 Hardware Structure place. If an interrupt request flag is set to ²1² before entering the HALT mode, the wake-up func- tion of the related interrupt will be disabled. Once a wake-up event occurs, it takes 1024 system clock periods to resume normal operation. In other words, a dummy period will be inserted after a wake-up.
I/O Type MCU ¸ Watchdog Timer ware reset (a low level on the RES pin), the second is via software instructions and the third is via a ²HALT² instruction. There are two methods of using software instructions to clear the Watchdog Timer, one of which must be chosen by configuration option.
Chapter 1 Hardware Structure Application Circuits The following application circuits although based around the HT48R50A-1 device equally apply to all devices in the I/O type range. 0 . 0 1 m F V D D P A 0 ~ P A 7 1 0 0 k W P B 2 ~ P B 7 P C 0 ~ P C 7...
In the case of Holtek microcontrollers, a comprehensive and flexible set of over 60 instructions is provided to en- able programmers to implement their application with the minimum of programming overheads.
The standard logical operations such as AND, OR, XOR and CPL all have their own instruction within the Holtek microcontroller instruction set. As with the case of most instructions involving data manipulation, data must pass through the Accumulator which may involve additional pro- gramming steps.
To overcome this problem, Holtek microcontrollers allow an area of Program Memory to be setup as a table where data can be directly stored. A set of easy to use instructions provides the means by which this fixed data can be referenced and retrieved from the Program Memory.
Page 68
I/O Type MCU Mnemonic Description Cycles Flag Affected Logic Operation AND A,[m] Logical AND Data Memory to ACC OR A,[m] Logical OR Data Memory to ACC XOR A,[m] Logical XOR Data Memory to ACC note ANDM A,[m] Logical AND ACC to Data Memory Note ORM A,[m] Logical OR ACC to Data Memory...
Page 69
Chapter 2 Instruction Set Introduction Mnemonic Description Cycles Flag Affected Branch JMP addr Jump unconditionally None Note SZ [m] Skip if Data Memory is zero None note SZA [m] Skip if Data Memory is zero with data movement to ACC None Note SZ [m].i...
Chapter 3 Instruction Definition C h a p t e r 3 Instruction Definition ADC A,[m] Add Data Memory to ACC with Carry Description The contents of the specified Data Memory, Accumulator and the carry flag are added. The result is stored in the Accumulator. ACC ¬...
Page 72
I/O Type MCU AND A,[m] Logical AND Data Memory to ACC Description Data in the Accumulator and the specified Data Memory perform a bitwise logical AND op- eration. The result is stored in the Accumulator. ACC ¬ ACC ²AND² [m] Operation Affected flag(s) AND A,x...
Page 73
Chapter 3 Instruction Definition CLR WDT Clear Watchdog Timer Description The TO, PDF flags and the WDT are all cleared. Operation WDT cleared TO ¬ 0 PDF ¬ 0 Affected flag(s) TO, PDF CLR WDT1 Pre-clear Watchdog Timer Description The TO, PDF flags and the WDT are all cleared. Note that this instruction works in conjunc- tion with CLR WDT2 and must be executed alternately with CLR WDT2 to have effect.
Page 74
I/O Type MCU DAA [m] Decimal-Adjust ACC for addition with result in Data Memory Description Convert the contents of the Accumulator value to a BCD ( Binary Coded Decimal) value re- sulting from the previous addition of two BCD variables. If the low nibble is greater than 9 or if AC flag is set, then a value of 6 will be added to the low nibble.
Page 75
Chapter 3 Instruction Definition INCA [m] Increment Data Memory with result in ACC Description Data in the specified Data Memory is incremented by 1. The result is stored in the Accumu- lator. The contents of the Data Memory remain unchanged. ACC ¬...
Page 76
I/O Type MCU OR A,x Logical OR immediate data to ACC Description Data in the Accumulator and the specified immediate data perform a bitwise logical OR op- eration. The result is stored in the Accumulator. ACC ¬ ACC ²OR² x Operation Affected flag(s) ORM A,[m]...
Page 77
Chapter 3 Instruction Definition RLA [m] Rotate Data Memory left with result in ACC Description The contents of the specified Data Memory are rotated left by 1 bit with bit 7 rotated into bit 0. The rotated result is stored in the Accumulator and the contents of the Data Memory re- main unchanged.
Page 78
I/O Type MCU RRC [m] Rotate Data Memory right through Carry Description The contents of the specified Data Memory and the carry flag are rotated right by 1 bit. Bit 0 replaces the Carry bit and the original carry flag is rotated into bit 7. [m].i ¬...
Page 79
Chapter 3 Instruction Definition SDZA [m] Skip if decrement Data Memory is zero with result in ACC Description The contents of the specified Data Memory are first decremented by 1. If the result is 0, the following instruction is skipped. The result is stored in the Accumulator but the specified Data Memory contents remain unchanged.
Page 80
I/O Type MCU SNZ [m].i Skip if bit i of Data Memory is not 0 Description If bit i of the specified Data Memory is not 0, the following instruction is skipped. As this re- quires the insertion of a dummy instruction while the next instruction is fetched, it is a two cycle instruction.
Page 81
Chapter 3 Instruction Definition SZ [m] Skip if Data Memory is 0 Description If the contents of the specified Data Memory is 0, the following instruction is skipped. As this requires the insertion of a dummy instruction while the next instruction is fetched, it is a two cycle instruction.
Page 82
I/O Type MCU XOR A,[m] Logical XOR Data Memory to ACC Description Data in the Accumulator and the specified Data Memory perform a bitwise logical XOR op- eration. The result is stored in the Accumulator. ACC ¬ ACC ²XOR² [m] Operation Affected flag(s) XORM A,[m]...
Cross Assembler Assembly-Language programs are written as source files. They can be assembled into object files by the Holtek Cross Assembler. Object files are combined by the Cross Linker to generate a task file. A source program is made up of statements and look up tables, giving directions to the Cross As- sembler at assembly time or to the processor at run time.
I/O Type MCU Example of Convention Description of Convention Three dots following an item signify that more items with the same form may be entered. For example, the directive PUB- LIC has the following form: Repeating elements... PUBLIC name1 [,name2 [,...]] In the above form, the three dots following name2 indicate that many names can be entered as long as each is pre- ceded by a comma.
Chapter 4 Assembly Language and Cross Assembler Comment Comments are the descriptions of codes. They are used for documentation only and are ignored by the Cross Assembler. Any text following a semicolon is considered a comment. Assembly Directives Directives give direction to the Cross Assembler, specifying the manner in which the Cross Assem- bler generates object code at assembly time.
I/O Type MCU File Control Directives ® Syntax INCLUDE file-name INCLUDE ²file-name² · Description This directive inserts source codes from the source file given by file-name into the current source file during assembly. Cross Assembler supports at most 7 nesting levels. ·...
Chapter 4 Assembly Language and Cross Assembler ® Syntax .LISTINCLUDE .NOLISTINCLUDE · Description The directive .LISTINCLUDE inserts the contents of all included files into the program listing. The directive .NOLISTINCLUDE suppresses the addition of included files. The default is .NOLISTINCLUDE. ®...
Page 88
I/O Type MCU For DATA sections, the byte address is in one byte units (8 bits/byte). BYTE aligns the section at any byte address, WORD aligns the section at any even address, PARA aligns the section at any address which is a multiple of 16, and PAGE aligns the section at any address which is a multiple of 256.
Page 89
Chapter 4 Assembly Language and Cross Assembler ® Syntax ORG expression · Description This directive sets the location counter to expression. The subsequent code and data offsets begin at the new offset specified by expression. The code or data offset is relative to the be- ginning of the section where the directive ORG is defined.
I/O Type MCU ® Syntax PROC name ENDP name · Description The PROC and ENDP directives mark a block of code which can be called or jumped to from other modules. The PROC creates a label name which stands for the address of the first instruction of a procedure.
Page 91
Chapter 4 Assembly Language and Cross Assembler ® Syntax [name] DB value1 [,value2 [, ...]] [name] DW value1 [,value2 [, ...]] [name] DBIT [name] DB repeated-count DUP(?) [name] DW repeated-count DUP(?) · Description These directives reserve the number of bytes/words specified by the repeated-count or reserve bytes/words only.
I/O Type MCU Macro Directives Macro directives enable a block of source statements to be named, and then that name to be re-used in the source file to represent the statements. During assembly, the Cross Assembler auto- matically replaces each occurrence of the macro name with the statements in the macro definition. A macro can be defined at any place in the source file as long as the definition precedes the first source line that calls this macro.
Page 93
Chapter 4 Assembly Language and Cross Assembler The following source program refers to the macro Delay ... T . A S M S a m p l e p r o g r a m f o r M A C R O . .
I/O Type MCU Assembly Instructions The syntax of an instruction has the following form: [name:] mnemonic [operand1[,operand2]] [;comment] where ® label name name: ® instruction name (keywords) mnemonic ® registers operand1 memory address ® registers operand2 memory address immediate value Name A name is made up of letters, digits, and special characters, and is used as a label.
Page 95
Chapter 4 Assembly Language and Cross Assembler The values of these shift bit operators are all constant values. The expression is shifted right SHR or left SHL by the number of bits specified by count. If bits are shifted out of position, the corresponding bits that are shifted in are zero-filled.
Chapter 4 Assembly Language and Cross Assembler Reserved Assembly Language Words The following tables list all reserved words used by the assembly language. · Reserved Names (directives, operators) INCLUDE LABEL OFFSET ELSE .LIST .LISTINCLUDE ENDIF .LISTMACRO PAGE ENDM LOCAL PARA ENDP PROC MACRO...
I/O Type MCU Cross Assembler Options The Cross Assembler options can be set via the Options menu Project command in HT-IDE3000. The Cross Assembler Options is located on the center part of the Project Option dialog box. The symbols could be defined in the Define Symbol edit box. ®...
Chapter 4 Assembly Language and Cross Assembler · Summary l l l l ® line number (4 digits, right alignment) oooo ® offset of code (4 digits) hhhh ® two 4-digits for opcode E ® external reference C ® statement from included file R ®...
Page 100
I/O Type MCU ® Example of assembly listing file . i l e : S A M P L E . A S M H o l t e k C r o s s - A s s e m b l e r V e r s i o n 2 .
To ease the process of application development, the importance and availability of supporting tools for microcontrollers cannot be underestimated. To support its range of MCUs, Holtek is fully committed to the development and release of easy to use and fully functional tools for its full range of devices.
Central to the system is the in-circuit hardware emulator, capable of emulating all of Holtek¢s 8-bit devices in real-time, while also providing a range of powerful debugging and trace fa- cilities. Regarding software functions, the system incorporates a user-friendly Windows based workbench which integrates together functions such as program editor, Cross Assembler, Cross Linker and library manager.
The Holtek OTP programmers are supplied with a standard Textool chip socket. The OTP Adapter Card is used to connect the Holtek OTP programmers to the various sizes of available OTP chip packages that are unable to use this supplied socket.
Page 106
The four external signal trace inputs, marked as ET0 to ET3 at jumper location JP3, provide a means for external signals to trigger the internal breakpoint and trace functions. For more informa- tion, refer to the chapters on Breakpoint and Trace the Application Program within the Holtek HT-IDE3000 User¢s Guide.
Exercise care when using the power adapter. Do not use a power adapter whose output voltage is not 9V, otherwise the HT-ICE may be damaged. It is strongly recommended that only the power adapter supplied by Holtek be used. First plug the power adapter to the power connector of the HT-ICE.
Page 108
I/O Type MCU Click <HT-IDE3000> button and the following dialog will be shown. Click <HT-IDE3000> or <Service Pack> as you want. Here¢s an Example of installing HT-IDE3000 Click <HT-IDE3000> button. · Step 2 Press the <Next> button to continue setup or press <Cancel> button to abort.
Page 109
Chapter 5 MCU Programming Tools · Step 3 The following dialog will be shown to ask the user to enter a directory name. · Step 4 Specify the path you want to install the HT-IDE3000 and click <Next> button. · Step 5 SETUP will copy all files to the specified directory.
Page 110
(EXE), dynamic link libraries (DLL) and configuration files (CFG, FMT) for all supported MCU. The INCLUDE subdirectory contains all the include files (.H, .INC) provided by Holtek. The LIB subdirectory contains the library files (.LIB) provided by Holtek. The SAMPLE subdirectory con- tains some sample programs.
Chapter 5 MCU Programming Tools OTP HandyWriter The Holtek HandyWriter was specifically developed to program the range of Holtek OTP (One Time Programmable) MCU devices allowing users to easily and efficiently burn their programming code into the OTP devices. The advantages of this writer include its small and easy to manage size, ease of installation and easy to use special features.
Page 112
I/O Type MCU Installation of the HandyWriter: · To directly connect to a PC, use the printer cable to connect from the HandyWriter¢s 25-pin D-type connector to the printer port of the PC as shown in the figure below. · To connect via the HT-ICE, first connect the HandyWriter to the VME 96-pin socket CN1 on the HT-ICE then connect the HT-ICE to the PC¢s printer port using the printer cable as shown in the figure below.
· You may repeat this step before you finish debugging your programs Step 4 - Transmit Code to Holtek · Click on Project menu and select Print Option Table command · Send the .COD file and the Option Approval Sheet to Holtek...
I/O Type MCU Step 5 - Programming the OTP Device · Build the project for creating the .OTP file · Click on Tools menu and select HandyWriter command or use HT-HandyWriter in program group to program the OTP devices The Programming and data flow is illustrated by the following diagram: .
Appendix A Device Characteristic Graphics A p p e n d i x A Device Characteristic Graphics The following characteristic graphics depicts typical device behavior. The data presented here is a statistical summary of data gathered on units from different lots over a period of time. This is for in- formation only and the figures were not tested during manufacturing.
Page 118
I/O Type MCU Typical RC OSC vs. Temperature ° Typical RC Oscillator Frequency vs. V...
Page 119
Appendix A Device Characteristic Graphics vs. V ° ° ° ° vs. V ° ° ° °...
Page 120
I/O Type MCU vs. V ° ° ° ° vs. V ° ° ° °...
Page 121
Appendix A Device Characteristic Graphics Typical R vs. V ° ° ° ° Typical V vs. V in -40°C to +85°C...
Page 122
I/O Type MCU Typical I vs. V Watchdog Enable ° ° ° ° Typical t vs. V WDTOSC ° ° ° °...
Page 123
Appendix A Device Characteristic Graphics Typical Internal RC OSC vs. V ° ° ° ° Typical I vs. Frequency (External Clock, Ta=-40°C)
Page 124
I/O Type MCU Typical I vs. Frequency (External Clock, Ta=0°C) Typical I vs. Frequency (External Clock, Ta=+25°C)
Page 125
Appendix A Device Characteristic Graphics Typical I vs. Frequency (External Clock, Ta=+85°C) Typical V vs. Temperature °...
Page 135
Copyright Ó 2003 by HOLTEK SEMICONDUCTOR INC. The information appearing in this handbook 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...
Need help?
Do you have a question about the HT48R10A-1 and is the answer not in the manual?
Questions and answers