Holtek HT46R62 User manual

HT46R62, HT46R63,
HT46R64, HT46R65
A/D with LCD Type MCU
Handbook
October 2004
Copyright Ó2004 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-
copying, recording or otherwise without the prior written permission of HOLTEK SEMICONDUCTOR INC.

Contents
Part I Microcontroller Profile ................................................................... 1
Chapter 1 Hardware Structure ......................................................................................... 3
Introduction ....................................................................................................................3
Features ......................................................................................................................... 4
Technology Features ............................................................................................... 4
Kernel Features ....................................................................................................... 4
Peripheral Features ................................................................................................. 5
Selection Table .............................................................................................................. 5
Block Diagram ............................................................................................................... 6
Pin Assignment .............................................................................................................. 7
Pin Description ............................................................................................................... 9
Absolute Maximum Ratings ......................................................................................... 17
D.C. Characteristics ..................................................................................................... 17
A.C. Characteristics ..................................................................................................... 21
System Architecture ..................................................................................................... 23
Clocking and Pipelining ......................................................................................... 23
Program Counter ................................................................................................... 24
Stack ..................................................................................................................... 25
Arithmetic and Logic Unit -ALU ............................................................................ 26
Program Memory ......................................................................................................... 27
Organization .......................................................................................................... 27
Special Vectors ..................................................................................................... 28
Look-up Table ........................................................................................................ 29
Table Program Example ........................................................................................ 29
Data Memory ............................................................................................................... 31
Organization .......................................................................................................... 31
General Purpose Data Memory ............................................................................ 32
Special Purpose Data Memory ............................................................................. 32
LCD Memory ......................................................................................................... 33
Contents
i

Special Function Registers .......................................................................................... 34
Indirect Addressing Registers -IAR0, IAR1 .......................................................... 34
Memory Pointers -MP0, MP1 ............................................................................... 34
Bank Pointer -BP.................................................................................................. 35
Accumulator -ACC................................................................................................ 35
Program Counter Low Register -PCL ......................................................................... 35
Look-up Table Registers -TBLP, TBLH ................................................................ 35
Real Time Clock -RTCC ....................................................................................... 36
Status Register -STATUS ..................................................................................... 37
Interrupt Control Registers -INTC0, INTC1 ......................................................... 37
Timer/Event Counter Registers ............................................................................ 38
Input/Output Ports and Control Registers ............................................................. 38
Pulse Width Modulator Registers -PWM0, PWM1, PWM2, PWM3 ..................... 39
A/D Converter Registers -ADR, ADRL, ADRH, ADCR, ADSR ............................ 39
Input/Output Ports ........................................................................................................ 39
Pull-high Resistors ................................................................................................ 39
Port A Wake-up ..................................................................................................... 39
I/O Port Control Registers .................................................................................... 40
Pin-shared Functions ............................................................................................ 40
Programming Considerations ................................................................................ 43
Comparator .................................................................................................................. 44
Liquid Crystal Display (LCD) Driver ............................................................................. 44
LCD Memory ......................................................................................................... 44
LCD Clock ............................................................................................................. 46
LCD Driver Output ................................................................................................. 46
LCD Voltage Source and Biasing .......................................................................... 53
Programming Considerations ................................................................................ 55
Timer/Event Counters .................................................................................................. 57
Configuring the Timer/Event Counter Input Clock Source .................................... 57
Timer Registers -TMR, TMRL/TMRH, TMR0L/TMR0H, TMR1L/TMR1H ............ 59
Timer Control Registers -TMRC, TMR0C, TMR1C ............................................. 60
Configuring the Timer Mode .................................................................................. 62
Configuring the Event Counter Mode .................................................................... 63
Configuring the Pulse Width Measurement Mode ................................................ 63
Programmable Frequency Divider -PFD ............................................................. 64
Prescaler ................................................................................................................ 65
I/O Interfacing ........................................................................................................ 65
Programming Considerations ................................................................................ 65
Pulse Width Modulator ................................................................................................. 66
6+2 PWM Mode .................................................................................................... 67
7+1 PWM Mode .................................................................................................... 68
PWM Output Control ............................................................................................. 69
ii
A/D with LCD Type MCU

Analog to Digital Converter .......................................................................................... 70
A/D Converter Data Registers -ADR, ADRL/ADRH ............................................ 70
A/D Converter Control Register -ADCR .............................................................. 71
A/D Converter Clock Source Register -ACSR ..................................................... 73
A/D Input Pins ....................................................................................................... 74
Summary of A/D Conversion Steps ...................................................................... 74
A/D Transfer Function ........................................................................................... 77
Interrupts ......................................................................................................................78
External Interrupt ................................................................................................... 83
Timer/Event Counter Interrupt ............................................................................... 84
Time Base Interrupt ............................................................................................... 84
Real Time Clock Interrupt -RTC .......................................................................... 85
A/D Interrupt .......................................................................................................... 85
Interrupt Priority ..................................................................................................... 86
Programming Considerations ................................................................................ 87
Reset and Initialization ................................................................................................. 87
Reset ..................................................................................................................... 88
Oscillator ......................................................................................................................95
System Clock Configurations ................................................................................ 95
System Crystal/Ceramic Oscillator ........................................................................ 95
System RC Oscillator ............................................................................................ 96
RTC Oscillator........................................................................................................ 97
Watchdog Timer Oscillator .................................................................................... 98
Internal Clock Source............................................................................................. 99
HALT and Wake-up in Power Down Mode ................................................................ 100
Low Voltage Detector -LVD ...................................................................................... 100
Watchdog Timer ......................................................................................................... 101
Buzzer ........................................................................................................................ 103
Configuration Options ................................................................................................ 105
Application Circuits .....................................................................................................107
Part II Programming Language ........................................................... 111
Chapter 2 Instruction Set Introduction ........................................................................ 113
Instruction Set ............................................................................................................ 113
Instruction Timing ................................................................................................ 113
Moving and Transferring Data ............................................................................. 114
Arithmetic Operations .......................................................................................... 114
Logical and Rotate Operations ............................................................................ 114
Branches and Control Transfer ........................................................................... 114
Bit Operations ...................................................................................................... 114
Table Read Operations ........................................................................................ 115
Other Operations ................................................................................................. 115
Contents
iii

Instruction Set Summary ............................................................................................ 115
Convention .......................................................................................................... 115
Chapter 3 Instruction Definition ................................................................................... 119
Chapter 4 Assembly Language and Cross Assembler .............................................. 131
Notational Conventions .............................................................................................. 131
Statement Syntax ...................................................................................................... 132
Name ................................................................................................................... 132
Operation ............................................................................................................ 132
Operand .............................................................................................................. 132
Comment ............................................................................................................. 133
Assembly Directives .................................................................................................. 133
Conditional Assembly Directives ......................................................................... 133
File Control Directives ......................................................................................... 134
Program Directives .............................................................................................. 135
Data Definition Directives .................................................................................... 138
Macro Directives ................................................................................................. 140
Assembly Instructions ................................................................................................ 142
Name ................................................................................................................... 142
Mnemonic ............................................................................................................ 142
Operand, Operator and Expression .................................................................... 142
Miscellaneous ........................................................................................................... 144
Forward References ............................................................................................ 144
Local Labels ........................................................................................................ 144
Reserved Assembly Language Words ................................................................ 145
Cross Assembler Options .......................................................................................... 146
Assembly Listing File Format ..................................................................................... 146
Source Program Listing ....................................................................................... 146
Summary of Assembly ........................................................................................ 147
Miscellaneous ..................................................................................................... 147
Part III Development Tools .................................................................. 149
Chapter 5 MCU Programming Tools ............................................................................ 151
HT-IDE Development Environment ............................................................................ 151
Holtek In-Circuit Emulator -HT-ICE .......................................................................... 152
HT-ICE Interface Card ......................................................................................... 152
OTP Programmer ................................................................................................ 153
OTP Adapter Card .............................................................................................. 153
System Configuration ................................................................................................ 153
HT-ICE Interface Card Settings ........................................................................... 154
iv
A/D with LCD Type MCU

Installation .................................................................................................................. 155
System Requirement ........................................................................................... 155
Hardware Installation .......................................................................................... 155
Software Installation ............................................................................................ 155
Chapter 6 Quick Start ................................................................................................... 159
Step 1 -Create a New Project ........................................................................... 159
Step 2 -Add Source Program Files to the Project ............................................ 159
Step 3 -Build the Project ................................................................................... 159
Step 4 -Programming the OTP Device ............................................................. 159
Step 5 -Transmit Code to Holtek ...................................................................... 160
Chapter 7 LCD Simulator................................................................................................161
Introduction .................................................................................................................161
LCD Panel Configuration File .....................................................................................161
Relationship Between the Panel File and the Current Project .............................162
Selecting the HT-LCDS ........................................................................................162
LCD Panel Picture File ...............................................................................................163
Setup the LCD Panel Configuration File .....................................................................163
Setup the Panel Configurations ...........................................................................163
Select the Patterns and their Positions ................................................................164
Add a New Pattern ...............................................................................................164
Delete a Pattern ...................................................................................................165
Change the Pattern ..............................................................................................165
Change the Pattern Position ................................................................................165
How to Add a User-defined Matrix .......................................................................166
Define the Pattern Using the Panel Editor ...........................................................166
Add New Pattern Items Using a Batch File ..........................................................167
Selecting Color for an LCD Panel ........................................................................167
Simulating the LCD .....................................................................................................167
Stop the Simulation ..............................................................................................167
Appendix ................................................................................................. 169
Appendix A Device Characteristic Graphics .............................................................. 171
Appendix B Package Information ................................................................................ 181
Contents
v

vi
A/D with LCD Type MCU

Preface
Since the founding of the company, Holtek Semiconductor has concentrated much of its design ef-
forts in the area of microcontroller development. Although supplying a wide range of semiconduc-
tor devices, the microcontroller category has always been a key product category within the Holtek
range, and one which will continue to expand as their devices increase in functionality and matu-
rity. By capitalizing on the substantial accumulated skills within its dedicated microcontroller devel-
opment department, Holtek has been able to release a comprehensive range of high quality
low-cost microcontroller devices for a wide range of application areas. Many important application
areas have the need to digitize analog input signals, such as those which interface to external sen-
sors, and to display the result on a Liquid Crystal Display. Applications that fall into this category
will all require an A/D converter to digitize the signals and an LCD driver function to display the re-
sults. To address these needs, Holtek has developed its range of A/D with LCD microcontrollers,
which in addition to having all the features and functions of the A/D range of devices, also include
an LCD driver function that can directly interface to a custom Liquid Crystal Display, providing re-
lated users with a fully integrated solution with which to measure and display analog signals. This
high level of device integration and consequent reduction in need for external components there-
fore provide a high function low cost solution for any users with applications that require both ana-
log signal processing and Liquid Crystal Display functions.
This handbook is divided into three parts for user convenience. Most details regarding general
datasheet information and device specification is located within Part I. Information related to
microcontroller programming such as device instruction set, instruction definition, and assembly
language directives is found within Part II. Part III relates to the Holtek range of Development Tools
where information can be found on their installation and use.
By compiling all relevant data together in one handbook, we hope users of the Holtek range of A/D
with LCD Type microcontroller devices will have at their fingertips a useful, complete and simple
means to efficiently implement their microcontroller applications. Holtek's efforts to combine infor-
mation on device specifications, programming and development tools into one publication have
produced a handbook which with careful use by the user should result in trouble free designs and
the maximum benefit being gained from the many features of Holtek microcontroller devices.
Holtek welcomes feedback and comments from our customers regarding further improvements.
Preface
vii

viii
A/D with LCD Type MCU

Part I
Microcontroller Profile
Part I Microcontroller Profile
1

2
A/D with LCD Type MCU

Chapter 1
Hardware Structure
This section is the main datasheet section of the A/D with LCD Type microcontroller handbook and
contains all the parameters and information related to the hardware. The information contained
provides designers with details on all the main hardware features of the A/D with LCD Type
microcontroller range which together with the programming section contains the information to en-
able swift and successful implementation of user microcontroller applications. By proper consulta-
tion of the relevant parts of this section, users can ensure that they make the most efficient use of
the flexible and multi-function features within the A/D with LCD Type microcontroller series.
Introduction
The HT46R62/HT46C62, HT46R63/HT46C63, HT46R64/HT46C64 and HT46R65/HT46C65
form the series of 8-bit high performance RISC architecture microcontrollers, designed especially
for product applications that interface directly to analog signals and which require to display the
measured data on a Liquid Crystal Display. Device flexibility is enhanced with the usual features of
the other microcontroller range such as HALT and wake-up functions, integrated timer functions,
oscillator options, programmable frequency divider in addition to Pulse Width Modulator outputs
etc. These features combine to ensure applications require a minimum of external components
and therefore reduce overall product costs. Having the benefits of integrated analog to digital con-
version functions which together with integrated LCD driver circuits and, in addition to the usual
Holtek advantages of low power consumption, high performance, I/O flexibility, as well as low cost,
these devices have the versatility to suit a wide range of application possibilities in areas such as
sensor signal processing and displaying, electronic metering, motor driving etc., for both industrial
and home appliance application areas. Many features are common to all devices however, they dif-
fer in areas such as I/O pin count, RAM and ROM capacity, timer number and size, A/D channels,
PWM outputs, LCD outputs etc.
The HT46R62, HT46R63, HT46R64 and HT46R65 are OTP devices offering the advantages of
easy and effective program updates, using the Holtek range of development and programming
tools. These devices provide the designer with the means for fast and low cost product develop-
ment cycles. However, for applications that are at a mature state in their design process, the
HT46C62, HT46C63, HT46C64 and HT46C65 mask version devices offer a complementary de-
vice for products with high volume and low cost demands. Fully pin and functionally compatible
with their OTP sister devices, such mask version devices provide the ideal substitute for products
which have gone beyond their development cycle and are facing cost down demands.
Chapter 1 Hardware Structure
3
1

Features
Technology Features
·High-performance RISC Architecture
·Low-power Fully Static CMOS Design
·Operating Voltage:
fSYS=4MHz: 2.2V~5.5V
fSYS=8MHz: 3.3V~5.5V
·Power Consumption:
3mA Typical at 5V 8MHz (for Crystal Oscillator with ADC Disabled)
Maximum of 1mA Standby Current at 3V with WDT Disabled
·Cycle Time:
Up to 0.5ms Instruction Cycle with 8MHz System Clock
·Temperature Range:
Operating Temperature -40°Cto85°C (Industrial Grade)
Storage Temperature -50°Cto125°C
Kernel Features
·Program Memory:
2K´14 OTP/Mask ROM (HT46R62/HT46C62)
4K´15 OTP/Mask ROM (HT46R63/HT46C63, HT46R64/HT46C64)
8K´16 OTP/Mask ROM (HT46R65/HT46C65)
·Data Memory:
88´8 RAM (HT46R62/HT46C62)
192´8 RAM (HT46R64/HT46C64)
208´8 RAM (HT46R63/HT46C63)
384´8 RAM (HT46R65/HT46C65)
·LCD Driver:
20´2, 20´3or19´4 Segments (HT46R62/HT46C62)
20´3or19´4 Segments (HT46R63/HT46C63)
33´2, 33´3or32´4 Segments (HT46R64/HT46C64)
41´2, 41´3or40´4 Segments (HT46R65/HT46C65)
·Table Read Function
·Multi-level Hardware Stack:
6-level (HT46R62/HT46C62)
8-level (HT46R63/HT46C63, HT46R64/HT46C64)
16-level (HT46R65/HT46C65)
·Direct and Indirect Data Addressing Mode
·Bit Manipulation Instructions
·63 Powerful Instructions
·Most Instructions Implemented in 1 Machine Cycle
4
A/D with LCD Type MCU

Peripheral Features
·From 20 to 32 Bidirectional I/O with Pull-high Options
·Port A Wake-up Options
·Multi-channel 8, 9 or 10-bit A/D Converter
·Internal LCD Driver
·Internal Dedicated LCD Memory
·Pulse Width Modulator Outputs
·Comparator (HT46R63/HT46C63 only)
·Two External Interrupt Inputs
·Event Counter Input
·Full Timer Functions with Prescaler and Interrupt
·Watchdog Timer (WDT)
·HALT and Wake-up Feature for Power Saving Operation
·PFD Output (except HT46R63/HT46C63)
·Buzzer Drivers Outputs (except HT46R63/HT46C63)
·On-chip Crystal and RC Oscillator
·32768Hz Real Time Clock (RTC) Function
·Low Voltage Reset (LVR) Feature for Brown-out Protection (except HT46R63/HT46C63)
·Low Voltage Detector (except HT46R63/HT46C63)
·Programming Interface with Code Protection
·Mask Version Devices Available for High Volume Production
·Full Suite of Supported Hardware and Software Tools Available
Selection Table
The series of A/D with LCD microcontrollers include a comprehensive range of features, some of
which are standard and some of which are device dependent. Most features are common to all de-
vices, the main features distinguishing them are Program Memory, Data Memory capacity, I/O
count, timer functions, A/D channels, LCD outputs and PWM outputs. To assist users in their selec-
tion of the most appropriate device for their application, the following table, which summarizes the
main features of each device, is provided.
Part No. Prog.
Mem.
Data
Mem. I/O LCD Timer Interrupt A/D PWM PFD Buzzer Stack Package
Types
HT46R62
HT46C62 2K´14 88´820
20´2,
20´3or
19´4
8-bit´169-bit´6 8-bit´3ÖÖ 6 56SSOP
HT46R63
HT46C63 4K´15 208´832 20´3or
19´416-bit´168-bit´8 8-bit´4¾¾ 856SSOP,
100QFP
HT46R64
HT46C64 4K´15 192´824
33´2,
33´3or
32´4
8-bit´1
16-bit´1710-bit´8 8-bit´4ÖÖ 856SSOP,
100QFP
HT46R65
HT46C65 8K´16 384´824
41´2,
41´3or
40´4
16-bit´2710-bit´8 8-bit´4ÖÖ16 56SSOP,
100QFP
Note 1. Part numbers including ²C²are mask version devices while ²R²are OTP devices.
2. For devices that exist in two package formats, the table reflects the situation for the larger
package.
Chapter 1 Hardware Structure
5

Block Diagram
The following block diagram illustrates the main functional blocks of the A/D with LCD Type
microcontroller series of devices.
Note 1. This block diagram represents the OTP device, for the mask device there is no Device
Programming Circuitry.
2. The Comparator function only exists in the HT46R63/HT46C63 devices.
3. The LVR/LVD, Buzzer driver and PFD do not exist in the HT46R63/HT46C63.
6
A/D with LCD Type MCU
T i m i n g
G e n e r a t o r
S y s t e m R C /
X ' t a l O s c i l l a t o r I n s t r u c t i o n
D ecoder
I n s t r u c t i o n
R e g i s t e r
W D T
O s c i l l a t o r L C D
M e m o r y
A d d r e s s D e c o d e r
M e m o r y
o i n t e r
M U X A C C
Look-up
T a b l e
R e g i s t e r
C o n f i g .
R e g i s t e r
W a t c h d o g
T i m e r
R e s e t &
L V R / L V D
B u z z e r
D r i v e r
C o n f i g .
R e g i s t e r
I n t e r r u p t
C i r c u i t
C o n f i g .
R e g i s t e r
I/O
o r t s
D e v i c e
r o g r a m m i n g
C i r c u i t r y
C o n f i g u r a t i o n
O p t i o n
r o g r a m
M e m o r y
A d d r e s s D e c o d e r
S t a c k
S t a c k o i n t e r
r o g r a m
C o u n t e r
Look-up
T a b l e
o i n t e r
T o r o g r a m
M e m o r y
A L U
S h i f t e r
MUX
R T C
O S C
C O M
SEG
D a t a
M e m o r y B a n k
o i n t e r
L C D D r i v e r s
A / D
C o n v e r t e r
C o n f i g .
R e g i s t e r W M
C o m p a r a t o r
C o n f i g .
R e g i s t e r
T i m e r ( s ) /
C ounter F D

Pin Assignment
Chapter 1 Hardware Structure
7
H T 4 6 R 6 4 / H T 4 6 C 6 4
1 0 0 Q F P - A
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
2 0
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
2 9
3 0
3 1
3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 5 0
81828384858687888990919293949596979899100
8 0
7 9
7 8
7 7
7 6
7 5
7 4
7 3
7 2
7 1
7 0
6 9
6 8
6 7
6 6
6 5
6 4
6 3
6 2
6 1
6 0
5 9
5 8
5 7
5 6
5 5
5 4
5 3
5 2
5 1
A 5
N C
N C
N C
N C
N C
A 6
A 7
B 0 / A N 0
B 1 / A N 1
B 2 / A N 2
B 3 / A N 3
B 4 / A N 4
B 5 / A N 5
B 6 / A N 6
B 7 / A N 7
VSS
D 0 / W M 0
D 1 / W M 1
D 2 / W M 2
D 3 / W M 3
D 4 / I N T 0
D 5 / I N T 1
D 6 / T M R 0
D 7 / T M R 1
N C
N C
N C
N C
N C
S E G 2 2
S E G 2 3
S E G 2 4
S E G 2 5
S E G 2 6
S E G 2 7
S E G 2 8
S E G 2 9
S E G 3 0
S E G 3 1
C O M 3 / S E G 3 2
C O M 2
C O M 1
C O M 0
C 2
C 1
V 2
V 1
V M A X
V L C D
S E G 1
S E G 2
S E G 3
N C
N C
N C
S E G 4
S E G 5
S E G 6
S E G 7
S E G 8
S E G 9
S E G 1 0
S E G 1 1
S E G 1 2
S E G 1 3
S E G 1 4
S E G 1 5
S E G 1 6
S E G 1 7
S E G 1 8
S E G 1 9
S E G 2 0
S E G 2 1
N C
N C
N C
N C
N C
N C
S E G 0
N C
N C
N C
N C
N C
N C
N C
N C
O S C 4
O S C 3
V D D
O S C 2
O S C 1
R E S
A 0 / B Z
A 1 / B Z
A 2
A 3 / F D
A 4
5 6
5 5
5 4
5 3
5 2
5 1
5 0
4 9
4 8
4 7
4 6
4 5
4 4
4 3
4 2
4 1
4 0
3 9
3 8
3 7
3 6
3 5
3 4
3 3
3 2
3 1
3 0
2 9
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
2 0
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
H T 4 6 R 6 4 / H T 4 6 C 6 4
5 6 S S O P - A
A 0 / B Z
A 1 / B Z
A 2
A 3 / F D
A 4
A 5
A 6
A 7
B 0 / A N 0
B 1 / A N 1
B 2 / A N 2
B 3 / A N 3
B 4 / A N 4
B 5 / A N 5
V S S
D 0 / W M 0
D 1 / W M 1
D 2 / W M 2
D 4 / I N T 0
D 5 / I N T 1
D 6 / T M R 0
V L C D
V M A X
V 1
V 2
C 1
C 2
C O M 0
R E S
O S C 1
O S C 2
V D D
O S C 3
O S C 4
S E G 8
S E G 9
S E G 1 0
S E G 1 1
S E G 1 2
S E G 1 3
S E G 1 4
S E G 1 5
S E G 1 6
S E G 1 7
S E G 1 8
S E G 1 9
S E G 2 0
S E G 2 1
S E G 2 2
S E G 2 3
S E G 2 4
S E G 2 5
S E G 2 6
C O M 3 / S E G 3 2
C O M 2
C O M 1
5 6
5 5
5 4
5 3
5 2
5 1
5 0
4 9
4 8
4 7
4 6
4 5
4 4
4 3
4 2
4 1
4 0
3 9
3 8
3 7
3 6
3 5
3 4
3 3
3 2
3 1
3 0
2 9
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
2 0
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
H T 4 6 R 6 2 / H T 4 6 C 6 2
5 6 S S O P - A
A 0 / B Z
A 1 / B Z
A 2
A 3 / F D
A 4
A 5
A 6
A 7
B 0 / A N 0
B 1 / A N 1
B 2 / A N 2
B 3 / A N 3
B 4 / A N 4
B 5 / A N 5
V S S
D 0 / W M 0
D 1 / W M 1
D 2 / W M 2
D 4 / I N T 0
D 5 / I N T 1
D 6 / T M R
V L C D
V M A X
V 1
V 2
C 1
C 2
C O M 0
R E S
O S C 1
O S C 2
V D D
O S C 3
O S C 4
S E G 0
S E G 1
S E G 2
S E G 3
S E G 4
S E G 5
S E G 6
S E G 7
S E G 8
S E G 9
S E G 1 0
S E G 1 1
S E G 1 2
S E G 1 3
S E G 1 4
S E G 1 5
S E G 1 6
S E G 1 7
S E G 1 8
C O M 3 / S E G 1 9
C O M 2
C O M 1
5 6
5 5
5 4
5 3
5 2
5 1
5 0
4 9
4 8
4 7
4 6
4 5
4 4
4 3
4 2
4 1
4 0
3 9
3 8
3 7
3 6
3 5
3 4
3 3
3 2
3 1
3 0
2 9
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
2 0
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
H T 4 6 R 6 3 / H T 4 6 C 6 3
5 6 S S O P - A
C H G O
C M O
C M
C M N
V L C D
C O M 0
C O M 1
C O M 2
C O M 3 / S E G 1 9
S E G 1 4
S E G 1 3
S E G 1 2
S E G 1 1
S E G 1 0
S E G 9
S E G 8
S E G 7
S E G 6
S E G 5
S E G 4
S E G 3
S E G 2
S E G 1
S E G 0
D 7
D 6 / T M R
D 5 / I N T 1
D 4 / I N T 0
O S C 4
O S C 3
V D D
O S C 2
O S C 1
R E S
A 0
A 1
A 2
A 3
A 4
A 5
A 6
A 7
V S S
B 0 / A N 0
B 1 / A N 1
B 2 / A N 2
B 3 / A N 3
A V D D
C 0
C 1
C 2
C 3
D 0 / W M 0
D 1 / W M 1
D 2 / W M 2
D 3 / W M 3
H T 4 6 R 6 3 / H T 4 6 C 6 3
1 0 0 Q F P - A
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
2 0
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
2 9
3 0
3 1
3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 5 0
81828384858687888990919293949596979899100
8 0
7 9
7 8
7 7
7 6
7 5
7 4
7 3
7 2
7 1
7 0
6 9
6 8
6 7
6 6
6 5
6 4
6 3
6 2
6 1
6 0
5 9
5 8
5 7
5 6
5 5
5 4
5 3
5 2
5 1
N C
N C
N C
N C
A 0
A 1
A 2
A 3
A 4
A 5
A 6
A 7
VSS
B 0 / A N 0
B 1 / A N 1
B 2 / A N 2
B 3 / A N 3
B 4 / A N 4
B 5 / A N 5
B 6 / A N 6
B 7 / A N 7
A V D D
N C
N C
N C
N C
N C
N C
N C
N C
N C
N C
N C
N C
D 7
D 6 / T M R
D 5 / I N T 1
D 4 / I N T 0
D 3 / W M 3
D 2 / W M 2
D 2 / W M 1
D 0 / W M 0
C 7
C 6
C 5
C 4
C 3
C 2
C 1
C 0
N C
N C
N C
N C
N C
N C
C O M 0
C O M 1
C O M 2
C O M 3 / S E G 1 9
S E G 1 8
S E G 1 7
S E G 1 6
S E G 1 5
S E G 1 4
S E G 1 3
S E G 1 2
S E G 1 1
S E G 1 0
S E G 9
S E G 8
S E G 7
S E G 6
S E G 5
S E G 4
S E G 3
S E G 2
S E G 1
S E G 0
N C
N C
N C
V L C D
C M N
C M
C M O
C H G O
O S C 4
O S C 3
V D D
O S C 2
O S C 1
R E S
N C
N C
N C
N C
N C
N C
N C

Note The pin compatibility features of the microcontroller packages allow for straightforward upgrading
to devices of higher functionality with minimal changes to application hardware.
8
A/D with LCD Type MCU
H T 4 6 R 6 5 / H T 4 6 C 6 5
1 0 0 Q F P - A
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
2 0
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
2 9
3 0
3 1
3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 5 0
81828384858687888990919293949596979899100
8 0
7 9
7 8
7 7
7 6
7 5
7 4
7 3
7 2
7 1
7 0
6 9
6 8
6 7
6 6
6 5
6 4
6 3
6 2
6 1
6 0
5 9
5 8
5 7
5 6
5 5
5 4
5 3
5 2
5 1
A 5
N C
N C
N C
N C
N C
A 6
A 7
B 0 / A N 0
B 1 / A N 1
B 2 / A N 2
B 3 / A N 3
B 4 / A N 4
B 5 / A N 5
B 6 / A N 6
B 7 / A N 7
VSS
D 0 / W M 0
D 1 / W M 1
D 2 / W M 2
D 3 / W M 3
D 4 / I N T 0
D 5 / I N T 1
D 6 / T M R 0
D 7 / T M R 1
N C
N C
N C
N C
N C
S E G 3 0
S E G 3 1
S E G 3 2
S E G 3 3
S E G 3 4
S E G 3 5
S E G 3 6
S E G 3 7
S E G 3 8
S E G 3 9
C O M 3 / S E G 4 0
C O M 2
C O M 1
C O M 0
C 2
C 1
V 2
V 1
V M A X
V L C D
S E G 9
S E G 1 0
S E G 1 1
N C
N C
N C
S E G 1 2
S E G 1 3
S E G 1 4
S E G 1 5
S E G 1 6
S E G 1 7
S E G 1 8
S E G 1 9
S E G 2 0
S E G 2 1
S E G 2 2
S E G 2 3
S E G 2 4
S E G 2 5
S E G 2 6
S E G 2 7
S E G 2 8
S E G 2 9
N C
N C
N C
N C
N C
N C
S E G 8
S E G 7
S E G 6
S E G 5
S E G 4
S E G 3
S E G 2
S E G 1
S E G 0
O S C 4
O S C 3
V D D
O S C 2
O S C 1
R E S
A 0 / B Z
A 1 / B Z
A 2
A 3 / F D
A 4
5 6
5 5
5 4
5 3
5 2
5 1
5 0
4 9
4 8
4 7
4 6
4 5
4 4
4 3
4 2
4 1
4 0
3 9
3 8
3 7
3 6
3 5
3 4
3 3
3 2
3 1
3 0
2 9
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
2 0
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
H T 4 6 R 6 5 / H T 4 6 C 6 5
5 6 S S O P - A
A 0 / B Z
A 1 / B Z
A 2
A 3 / F D
A 4
A 5
A 6
A 7
B 0 / A N 0
B 1 / A N 1
B 2 / A N 2
B 3 / A N 3
B 4 / A N 4
B 5 / A N 5
V S S
D 0 / W M 0
D 1 / W M 1
D 2 / W M 2
D 4 / I N T 0
D 5 / I N T 1
D 6 / T M R 0
V L C D
V M A X
V 1
V 2
C 1
C 2
C O M 0
R E S
O S C 1
O S C 2
V D D
O S C 3
O S C 4
S E G 1 6
S E G 1 7
S E G 1 8
S E G 1 9
S E G 2 0
S E G 2 1
S E G 2 2
S E G 2 3
S E G 2 4
S E G 2 5
S E G 2 6
S E G 2 7
S E G 2 8
S E G 2 9
S E G 3 0
S E G 3 1
S E G 3 2
S E G 3 3
S E G 3 4
C O M 3 / S E G 4 0
C O M 2
C O M 1

Pin Description
HT46R62/HT46C62
Pin Name I/O Configuration
Option Description
PA0/BZ
PA1/BZ
PA2
PA3/PFD
PA4~PA7
I/O
Pull-high
Wake-up
Buzzer
PFD
Bidirectional 8-bit input/output port. Each individual bit
on this port can be configured as a wake-up input by a
configuration option. Software instructions determine if
the pin is a CMOS output or Schmitt Trigger input. Con-
figuration options determine which pins on the port
have pull-high resistors. Pins PA0, PA1 and PA3 are
pin-shared with BZ, BZ and PFD respectively, the func-
tion of which is chosen via configuration options.
PB0/AN0
PB1/AN1
PB2/AN2
PB3/AN3
PB4/AN4
PB5/AN5
I/O Pull-high
Bidirectional 6-bit input/output port. Software instruc-
tions determine if the pin is a CMOS output or Schmitt
Trigger input. Configuration options determine which
pins on the port have pull-high resistors. PB is
pin-shared with the A/D input pins. The A/D inputs are
selected via software instructions. Once selected as an
A/D input, the I/O function and pull-high resistor func-
tions are disabled automatically.
PD0/PWM0
PD1/PWM1
PD2/PWM2
PD4/INT0
PD5/INT1
PD6/TMR
I/O
Pull-high
PWM
Interrupt
Bidirectional 6-bit input/output port. Software instruc-
tions determine if the pin is a CMOS output or Schmitt
Trigger input. Configuration options determine which
pins on the port have pull-high resistors. PD0~PD2 are
pin-shared with PWM0~PWM2, the function of each pin
is selected via a configuration option. Pins PD4 and
PD5 are pin-shared with external interrupt input pins
INT0 and INT1 respectively. Configuration options de-
termine the interrupt enable/disable and the interrupt
low/high trigger type. Pin PD6 is pin-shared with the ex-
ternal timer input pin TMR.
OSC1
OSC2
I
OCrystal or RC
OSC1 and OSC2 are connected to an external RC net-
work or external crystal (determined by configuration
option) for the internal system clock. For external RC
system clock operation, OSC2 is an output pin for 1/4
system clock. If an RTC oscillator on pins OSC3 and
OSC4 is used as a system clock, then the OSC1 and
OSC2 pins should be left floating.
OSC3
OSC4
I
O
RTC or
System Clock
OSC3 and OSC4 are connected to a 32768Hz crystal to
form a real time clock for timing purposes or to form a
system clock.
VLCD ¾¾LCD power supply
Chapter 1 Hardware Structure
9

Pin Name I/O Configuration
Option Description
VMAX ¾¾IC maximum voltage, connect to VDD,V
LCD or V1
V1, V2, C1, C2 I ¾LCD voltage pump
SEG0~SEG7 O SEG0~SEG7
CMOS Output
LCD driver outputs for LCD panel segments. A configu-
ration option can select all pins to be used as segment
drivers or all pins to be used as CMOS outputs.
SEG8~SEG15 O SEG8~SEG15
CMOS Output
LCD driver outputs for LCD panel segments. Configura-
tion options can select each pin to be used as either a
segment driver or each pin to be used as a CMOS out-
put.
SEG16~SEG18 O ¾LCD driver outputs for LCD panel segments
COM0~COM2
COM3/SEG19 O1/2, 1/3 or 1/4
Duty
An LCD duty-cycle configuration option determines if
SEG19 is configured as a segment driver or as a com-
mon output driver for the LCD panel. COM0~COM2 are
the LCD common outputs.
RES I ¾Schmitt Trigger reset input. Active low.
VDD ¾¾Positive power supply
VSS ¾¾Negative power supply, ground
Note 1. Each pin on Port A can be programmed through a configuration option to have a wake-up
function.
2. Individual pins can be selected to have a pull-high resistor.
10
A/D with LCD Type MCU

HT46R63/HT46C63
Pin Name I/O Configuration
Option Description
PA0~PA7 I/O Pull-high
Wake-up
Bidirectional 8-bit input/output port. Each individual bit
on this port can be configured as a wake-up input by a
configuration option. Software instructions determine if
the pin is a CMOS output or Schmitt Trigger input. Con-
figuration options determine whether the four pins
PA0~PA3 and PA4~PA7 have pull-high resistors. Indi-
vidual pins cannot be selected to have pull-high resis-
tors.
PB0/AN0
PB1/AN1
PB2/AN2
PB3/AN3
PB4/AN4
PB5/AN5
PB6/AN6
PB7/AN7
I/O Pull-high
Bidirectional 8-bit input/output port. Software instruc-
tions determine if the pin is a CMOS output or Schmitt
Trigger input. Configuration options determine whether
the four pins PB0~PB3 and PB4~PB7 have pull-high
resistors. Individual pins cannot be selected to have
pull-high resistors. PB is pin-shared with the A/D input
pins. The A/D inputs are selected via software instruc-
tions. Once selected as an A/D input, the I/O function
and pull-high resistor functions are disabled automati-
cally.
PC0~PC7 I/O Pull-high
Bidirectional 8-bit input/output port. Software instruc-
tions determine if the pin is a CMOS output or Schmitt
Trigger input. Configuration options determine whether
the four pins PC0~PC3 and PC4~PC7 have pull-high
resistors. Individual pins cannot be selected to have
pull-high resistors.
PD0/PWM0
PD1/PWM1
PD2/PWM2
PD3/PWM3
PD4/INT0
PD5/INT1
PD6/TMR
PD7
I/O
Pull-high
PWM
Interrupt
Bidirectional 8-bit input/output port. Software instruc-
tions determine if the pin is a CMOS output or Schmitt
Trigger input. Configuration options determine whether
the four pins PD0~PD3 and PD4~PD7 have pull-high
resistors. Individual pins cannot be selected to have
pull-high resistors. PD0~PD3 are pin-shared with
PWM0~PWM3, the function of each pin is selected via
a configuration option. Pins PD4 and PD5 are
pin-shared with external interrupt input pins INT0 and
INT1 respectively. Configuration options determine the
interrupt enable/disable and the interrupt low/high trig-
ger type. Pin PD6 is pin-shared with the external timer
input pin TMR.
OSC1
OSC2
I
OCrystal or RC
OSC1 and OSC2 are connected to an external RC net-
work or external crystal (determined by configuration
option) for the internal system clock. For external RC
system clock operation, OSC2 is an output pin for 1/4
system clock.
OSC3
OSC4
I
O¾32768Hz crystal connections for RTC clock generation.
Chapter 1 Hardware Structure
11
This manual suits for next models
3
Table of contents
Other Holtek Controllers manuals