Small Package 8-Bit OTP MCU
HT48R006/HT46R006
Revision: 1.00
October 24, 2011
HT48R006/HT46R006
Table of Contents
Features ...............................................................................................5
CPU Features ........................................................................................................5
Peripheral Features ................................................................................................5
General Description ............................................................................5
Selection Table ....................................................................................6
Block Diagram .....................................................................................6
Pin Assignment ...................................................................................6
Pin Description ....................................................................................7
HT46R006..............................................................................................................7
HT48R006..............................................................................................................8
Absolute Maximum Ratings ...............................................................9
D.C. Characteristics ............................................................................9
A.C. Characteristics ..........................................................................10
ADC Characteristics..........................................................................12
Power-on Reset Characteristics ......................................................12
System Architecture .........................................................................13
Clocking and Pipelining ........................................................................................13
Program Counter..................................................................................................14
Stack ....................................................................................................................14
Arithmetic and Logic Unit
-
ALU ...........................................................................14
Program Memory...............................................................................15
Structure...............................................................................................................15
Special Vectors.....................................................................................................15
Look-up Table.......................................................................................................15
Table Program Example.....................................................................................16
Data Memory......................................................................................17
Structure...............................................................................................................17
Special Purpose Data Memory .............................................................................17
Special Function Registers ..............................................................18
Indirect Addressing Registers
-
IAR0, IAR1 .........................................................18
Memory Pointers
-
MP0, MP1..............................................................................18
Accumulator
-
ACC ..............................................................................................18
Program Counter Low Register
-
PCL..................................................................19
Status Register
-
STATUS ...................................................................................19
Input/Output Ports and Control Registers .............................................................20
Rev. 1.00
ii
October 24, 2011
HT48R006/HT46R006
System Control Registers
-
CTRL0, CTRL1.........................................................20
Wake-up Function Register
-
PAWK ....................................................................20
Pull-high Registers
-
PAPU ..................................................................................20
Oscillator............................................................................................22
System
Oscillator Overview.............................................................................................................22
System Clock Configurations................................................................................22
External Crystal/Resonator Oscillator
-
HXT ........................................................22
External RC Oscillator
-
ERC ...............................................................................22
Internal RC Oscillator
-
HIRC ...............................................................................23
External 32768Hz Crystal Oscillator
-
LXT ...........................................................23
LXT Oscillator Low Power Function ......................................................................23
Internal Low Speed Oscillator
-
LIRC ...................................................................23
Operating Modes ...............................................................................24
Mode Types and Selection ...................................................................................24
Mode Switching ....................................................................................................24
Standby Current Considerations...........................................................................25
Wake-up...............................................................................................................25
Watchdog Timer ................................................................................26
Watchdog Timer Operation...................................................................................26
Reset and Initialisation .....................................................................27
Reset Functions ...................................................................................................27
Reset Initial Conditions .........................................................................................28
HT46R006............................................................................................................29
HT48R006............................................................................................................30
Input/Output Ports.............................................................................31
Pull-high Resistors................................................................................................31
Port A Wake-up ....................................................................................................31
I/O Port Control Registers.....................................................................................32
Pin-shared Functions............................................................................................32
I/O Pin Structures .................................................................................................34
Programming Considerations ...............................................................................34
Timer/Event Counters .......................................................................34
Configuring the Timer/Event Counter Input Clock Source .....................................34
Timer Registers
-
TMR0, TMR1 ...........................................................................34
Timer Control Registers
-
TMR0C, TMR1C..........................................................38
Timer Mode ..........................................................................................................38
Event Counter Mode.............................................................................................38
Pulse Width Capture Mode...................................................................................39
Prescaler ..............................................................................................................40
Buzzer Function -- HT48R006 ..............................................................................40
PFD Function -- HT46R006 ..................................................................................41
I/O Interfacing.......................................................................................................41
Rev. 1.00
iii
October 24, 2011
HT48R006/HT46R006
Programming Considerations ...............................................................................41
Timer Program Example.......................................................................................42
Time Base ............................................................................................................42
Pulse Width Modulator
-
HT46R006 ................................................43
PWM Operation....................................................................................................43
6+2 PWM Mode ...................................................................................................43
7+1 PWM Mode ...................................................................................................43
PWM Output Control ............................................................................................45
Analog to Digital Converter
-
HT46R006 ........................................46
A/D Overview .......................................................................................................46
A/D Converter Register Description ......................................................................46
A/D Converter Data Registers
-
ADRL, ADRH .....................................................46
A/D Converter Control Registers
-
ADCR, ACSR.................................................47
A/D Operation.......................................................................................................49
A/D Input Pins ......................................................................................................50
Summary of A/D Conversion Steps ......................................................................50
Programming Considerations ...............................................................................50
A/D Transfer Function...........................................................................................50
A/D Programming Example ..................................................................................51
Interrupts............................................................................................53
Interrupt Register..................................................................................................53
Interrupt Operation ...............................................................................................53
Interrupt Priority.....................................................................................................54
External Interrupt ..................................................................................................54
Timer/Event Counter Interrupt ..............................................................................56
Time Base Interrupt ..............................................................................................56
Programming Considerations ...............................................................................56
Configuration Options ......................................................................57
Application Circuits ..........................................................................57
Instruction Set ...................................................................................58
Introduction ..........................................................................................................58
Instruction Timing .................................................................................................58
Moving and Transferring Data ..............................................................................58
Arithmetic Operations ...........................................................................................58
Logical and Rotate Operations .............................................................................58
Branches and Control Transfer.............................................................................58
Table Read Operations.........................................................................................59
Instruction Set Summary ......................................................................................59
Instruction Definition ........................................................................61
Package Information .........................................................................71
10-pin MSOP Outline Dimensions ........................................................................71
Rev. 1.00
iv
October 24, 2011
HT48R006/HT46R006
Features
CPU Features
·
Operating voltage:
·
All instructions executed in one or two instruction
cycles
·
Table read instructions
·
63 powerful instructions
·
2~6-level subroutine nesting
·
Bit manipulation instruction
·
Low voltage reset function
f
SYS
= 4MHz: 2.2V~5.5V
f
SYS
= 8MHz: 3.0V~5.5V
f
SYS
= 12MHz: 4.5V~5.5V
·
Up to 0.33ms instruction cycle with 12MHz system
clock at V
DD
= 5V
·
Sleep mode and wake-up functions to reduce
power consumption
·
Oscillator types:
Peripheral Features
·
6 bidirectional I/O lines
·
3 channel 12-bit ADC
·
1 channel 8-bit PWM
·
External interrupt input shared with an I/O line
·
1~2 8-bit programmable Timer/Event
External high freuency Crystal -- HXT
External RC -- ERC
Internal RC -- HIRC
External low frequency crystal -- LXT
·
Three operational modes: Normal, Slow, Sleep
·
Fully integrated internal 4MHz, 8MHz and 12MHz
Counter with overflow interrupt and prescaler
·
Time-Base function
·
Programmable Frequency Divider - PFD
·
Buzzer driving pair supported
·
10-pin MSOP package
oscillator requires no external components
·
OTP Program Memory: 1K´14 or 1K´15
·
RAM Data Memory: 64´8 ~ 96´8
·
Watchdog Timer function
·
LIRC oscillator function for watchdog timer
General Description
The HT48R006 and HT46R006 are a series of 8-bit high
performance, RISC architecture microcontrollers spe-
cifically designed for a wide range of applications. The
usual Holtek microcontroller features of low power con-
sumption, I/O flexibility, timer functions, oscillator op-
tions, power down and wake-up functions, watchdog
timer and low voltage reset, combine to provide devices
with a huge range of functional options while still main-
taining a high level of cost effectiveness. The fully inte-
grated system oscillator HIRC, which requires no
external components and which has three frequency
selections, opens up a huge range of new application
possibilities for these devices, some of which may in-
clude industrial control, consumer products, household
appliances subsystem controllers, etc.
Rev. 1.00
5
October 24, 2011