Professional Documents
Culture Documents
HA0003E Communicating between the HT48 & HT46 Series MCUs and the HT93LC46 EEPROM
HA0004E HT48 & HT46 MCU UART Software Implementation Method
HA0013E HT48 & HT46 LCM Interface Design
HA0021E Using the I/O Ports on the HT48 MCU Series
HA0055E 2^12 Decoder (8+4 - Corresponds to HT12E)
Features
Operating voltage:
fSYS=4MHz: 2.2V~5.5V
fSYS=8MHz: 3.3V~5.5V
consumption
at VDD=5V
RC oscillator
63 powerful instructions
Watchdog Timer
General Description
The advantages of low power consumption, I/O flexibility, timer functions, oscillator options, HALT and
wake-up functions, watchdog timer, buzzer driver, as
well as low cost, enhance the versatility of these devices
to suit a wide range of application possibilities such as
industrial control, consumer products, subsystem controllers, etc.
The HT48R10A-1/HT48C10-1 are 8-bit high performance, RISC architecture microcontroller devices specifically designed for multiple I/O control product
applications. The mask version HT48C10-1 is fully pin
and functionally compatible with the OTP version
HT48R10A-1 device.
Rev. 1.90
November 4, 2005
HT48R10A-1/HT48C10-1
Block Diagram
IN T /P C 0
In te rru p t
C ir c u it
T M R C
S T A C K
P ro g ra m
R O M
P ro g ra m
C o u n te r
IN T C
T M R
T M R /P C 1
X
M P
D A T A
M e m o ry
W D T S
W D T P r e s c a le r
P C C
P C 3
P C 4
P O R T C
P C
P B C
S T A T U S
P O R T B
P B
S h ifte r
P A C
O S C 2 /
P C 4
O S
P
R
V
V
C 1 /
C 3
E S
D D
S S
fS
Y S
W D T
M
U
Y S
/4
R T C
X
O S C
W D T O S C
P C 0 ~ P C 4
B Z /B Z
A L U
T im in g
G e n e ra to r
M U X
In s tr u c tio n
D e c o d e r
fS
E N /D IS
U
P C 1
P C 0
In s tr u c tio n
R e g is te r
P r e s c a le r
P O R T A
P A
A C C
P B 0 ~ P B 7
P A 0 ~ P A 7
In te rn a l
R C O S C
Pin Assignment
P B 5
2 4
P B 6
P B 4
2 3
P B 7
P A 3
2 2
P A 4
P A 2
2 1
P A 5
P A 1
2 0
P A 6
P A 0
1 9
P A 7
P B 3
1 8
O S C 2 /P C 4
P B 2
1 7
O S C 1 /P C 3
P B 1 /B Z
1 6
V D D
P B 0 /B Z
1 0
1 5
R E S
V S S
1 1
1 4
P C 2
P C 0 /IN T
1 2
1 3
P C 1 /T M R
H T 4 8 R 1 0 A -1 /H T 4 8 C 1 0 -1
2 4 S K D IP -A /S O P -A
Rev. 1.90
November 4, 2005
HT48R10A-1/HT48C10-1
Pin Description
Pin Name
PA0~PA7
I/O
Options
Description
I/O
Pull-high*
Wake-up
CMOS/Schmitt
trigger Input
Bidirectional 8-bit input/output port. Each bit can be configured as wake-up input
by options. Software instructions determine the CMOS output or Schmitt trigger
or CMOS (dependent on options) input with a pull-high resistor (determined by
pull-high options).
Bidirectional 8-bit input/output port. Software instructions determine the CMOS
output or Schmitt trigger input with a pull-high resistor (determined by pull-high
options).
The PB0 and PB1 are pin-shared with the BZ and BZ, respectively. Once the PB0
and PB1 are selected as buzzer driving outputs, the output signals come from an
internal PFD generator (shared with timer/event counter).
PB0/BZ
PB1/BZ
PB2~PB7
I/O
Pull-high*
I/O or BZ/BZ
VSS
PC0/INT
PC1/TMR
PC2
I/O
Pull-high*
RES
VDD
OSC1/PC3
OSC2/PC4
* The pull-high resistors of each I/O port (PA, PB, PC) are controlled by an option bit.
Note: These are stress ratings only. Stresses exceeding the range specified under Absolute Maximum Ratings may
cause substantial damage to the device. Functional operation of this device at other conditions beyond those
listed in the specification is not implied and prolonged exposure to extreme conditions may affect device reliability.
Rev. 1.90
November 4, 2005
HT48R10A-1/HT48C10-1
D.C. Characteristics
Symbol
VDD
IDD1
Parameter
Operating Voltage
Ta=25C
Test Conditions
Conditions
VDD
Typ.
Max.
Unit
fSYS=4MHz
2.2
5.5
fSYS=8MHz
3.3
5.5
0.6
1.5
mA
mA
0.8
1.5
mA
2.5
mA
mA
mA
10
mA
mA
mA
mA
10
mA
3V
Operating Current (Crystal OSC)
No load, fSYS=4MHz
5V
IDD2
Min.
3V
Operating Current (RC OSC)
No load, fSYS=4MHz
5V
IDD3
Operating Current
(Crystal OSC, RC OSC)
ISTB1
Standby Current
(WDT Enabled RTC Off)
3V
Standby Current
(WDT Disabled RTC Off)
3V
Standby Current
(WDT Disabled, RTC On)
3V
VIL1
0.3VDD
VIH1
0.7VDD
VDD
VIL2
0.4VDD
VIH2
0.9VDD
VDD
VLVR
LVR enabled
2.7
3.0
3.3
IOL
3V
VOL=0.1VDD
mA
VOL=0.1VDD
10
20
mA
3V
VOH=0.9VDD
-2
-4
mA
5V
VOH=0.9VDD
-5
-10
mA
20
60
100
kW
10
30
50
kW
ISTB2
ISTB3
IOH
RPH
5V
No load, fSYS=8MHz
Pull-high Resistance
5V
Rev. 1.90
November 4, 2005
HT48R10A-1/HT48C10-1
A.C. Characteristics
Symbol
fSYS1
fSYS2
fSYS3
fTIMER
Parameter
Ta=25C
Test Conditions
Conditions
VDD
Min.
Typ.
Max.
Unit
2.2V~5.5V
400
4000
kHz
3.3V~5.5V
400
8000
kHz
2.2V~5.5V
400
4000
kHz
3.3V~5.5V
400
8000
kHz
3.2MHz
1800
5400
kHz
1.6MHz
900
2700
kHz
800kHz
450
1350
kHz
400kHz
225
675
kHz
5V
2.2V~5.5V
4000
kHz
3.3V~5.5V
8000
kHz
3V
45
90
180
ms
5V
32
65
130
ms
11
23
46
ms
17
33
ms
3V
tWDT1
5V
tWDT2
1024
tSYS
tWDT3
7.812
ms
tRES
ms
tSST
1024
tSYS
tINT
ms
Rev. 1.90
November 4, 2005
HT48R10A-1/HT48C10-1
Functional Description
Execution Flow
When executing a jump instruction, conditional skip execution, loading PCL register, subroutine call, initial reset, internal interrupt, external interrupt or return from
subroutine, the PC manipulates the program transfer by
loading the address corresponding to each instruction.
The lower byte of the program counter (PCL) is a readable and writable register (06H). Moving data into the
PCL performs a short jump. The destination will be
within 256 locations.
Program Counter - PC
The program counter (PC) controls the sequence in
which the instructions stored in program ROM are executed and its contents specify full range of program
memory.
After accessing a program memory word to fetch an instruction code, the contents of the program counter are
incremented by one. The program counter then points to
the memory word containing the next instruction code.
The program memory is used to store the program instructions which are to be executed. It also contains
data, table, and interrupt entries, and is organized into
102414 bits, addressed by the program counter and table pointer.
S y s te m
O S C 2 (R C
C lo c k
T 1
T 2
T 3
T 4
T 1
T 2
T 3
T 4
T 1
T 2
T 3
T 4
o n ly )
P C
P C
P C + 1
F e tc h IN S T (P C )
E x e c u te IN S T (P C -1 )
P C + 2
F e tc h IN S T (P C + 1 )
E x e c u te IN S T (P C )
F e tc h IN S T (P C + 2 )
E x e c u te IN S T (P C + 1 )
Execution Flow
Mode
Program Counter
*9
*8
*7
*6
*5
*4
*3
*2
*1
*0
Initial Reset
External Interrupt
@3
@2
@1
@0
Skip
Program Counter+2
Loading PCL
*9
*8
@7
@6
@5
@4
#9
#8
#7
#6
#5
#4
#3
#2
#1
#0
S9
S8
S7
S6
S5
S4
S3
S2
S1
S0
Program Counter
Note: *9~*0: Program counter bits
Rev. 1.90
November 4, 2005
HT48R10A-1/HT48C10-1
ferred to the lower portion of TBLH, and the remaining
2 bits are read as 0. The Table Higher-order byte
register (TBLH) is read only. The table pointer (TBLP)
is a read/write register (07H), which indicates the table
location. Before accessing the table, the location must
be placed in TBLP. The TBLH is read only and cannot
be restored. If the main routine and the ISR (Interrupt
Service Routine) both employ the table read instruction, the contents of the TBLH in the main routine are
likely to be changed by the table read instruction used
in the ISR. Errors can occur. In other words, using the
table read instruction in the main routine and the ISR
simultaneously should be avoided. However, if the table read instruction has to be applied in both the main
routine and the ISR, the interrupt is supposed to be
disabled prior to the table read instruction. It will not be
enabled until the TBLH has been backed up. All table
related instructions require two cycles to complete the
operation. These areas may function as normal program memory depending upon the requirements.
This area is reserved for the timer/event counter interrupt service program. If a timer interrupt results from a
timer/event counter overflow, and if the interrupt is enabled and the stack is not full, the program begins execution at location 008H.
Table location
0 0 4 H
0 0 8 H
E x te r n a l In te r r u p t S u b r o u tin e
T im e r /E v e n t C o u n te r In te r r u p t S u b r o u tin e
P ro g ra m
M e m o ry
n 0 0 H
L o o k - u p T a b le ( 2 5 6 w o r d s )
n F F H
L o o k - u p T a b le ( 2 5 6 w o r d s )
3 F F H
1 4 b its
N o te : n ra n g e s fro m
0 to 3
Program Memory
Instruction
Table Location
*9
*8
*7
*6
*5
*4
*3
*2
*1
*0
TABRDC [m]
P9
P8
@7
@6
@5
@4
@3
@2
@1
@0
TABRDL [m]
@7
@6
@5
@4
@3
@2
@1
@0
Table Location
Note: *9~*0: Table location bits
Rev. 1.90
November 4, 2005
HT48R10A-1/HT48C10-1
Data Memory - RAM
The special function registers include the indirect add re s s in g r egi s t er ( 00H ) , t i m er / e v ent c o u n t e r
(TMR;0DH), timer/event counter control register
(TMRC;0EH), program counter lower-order byte register (PCL;06H), memory pointer register (MP;01H), accumulator (ACC;05H), table pointer (TBLP;07H), table
higher-order byte register (TBLH;08H), status register
(STATUS;0AH), interrupt control register (INTC;0BH),
Watchdog Timer option setting register (WDTS;09H),
I/O registers (PA;12H, PB;14H, PC;16H) and I/O control
registers (PAC;13H, PBC;15H, PCC;17H). The remaining space before the 40H is reserved for future ex0 0 H
In d ir e c t A d d r e s s in g R e g is te r
0 1 H
M P
0 2 H
0 3 H
0 4 H
Accumulator
0 5 H
A C C
0 6 H
P C L
0 7 H
T B L P
0 8 H
T B L H
0 9 H
W D T S
0 A H
S T A T U S
0 B H
IN T C
0 C H
0 D H
T M R
0 E H
T M R C
0 F H
1 0 H
1 1 H
1 2 H
P A
1 3 H
P A C
1 4 H
P B
1 5 H
P B C
1 6 H
P C
1 7 H
P C C
1 8 H
1 9 H
: U n u s e d
1 A H
R e a d a s "0 0 "
1 B H
1 C H
1 D H
1 E H
1 F H
2 0 H
3 F H
4 0 H
G e n e ra l P u rp o s e
D A T A M E M O R Y
(6 4 B y te s )
7 F H
RAM Mapping
Rev. 1.90
November 4, 2005
HT48R10A-1/HT48C10-1
cuting the HALT or CLR WDT instruction or a
system power-up.
External interrupts are triggered by a high to low transition of INT and the related interrupt request flag (EIF; bit
4 of INTC) will be set. When the interrupt is enabled, the
stack is not full and the external interrupt is active, a subroutine call to location 04H will occur. The interrupt request flag (EIF) and EMI bits will be cleared to disable
other interrupts.
In addition, on entering the interrupt sequence or executing the subroutine call, the status register will not be
pushed onto the stack automatically. If the contents of
the status are important and if the subroutine can corrupt the status register, precautions must be taken to
save it properly.
Interrupt
The device provides an external interrupt and internal
timer/event counter interrupts. The Interrupt Control
Register (INTC;0BH) contains the interrupt control bits
to set the enable or disable and the interrupt request
flags.
During the execution of an interrupt subroutine, other interrupt acknowledgments are held until the RETI instruction is executed or the EMI bit and the related
interrupt control bit are set to 1 (of course, if the stack is
not full). To return from the interrupt subroutine, RET or
RETI may be invoked. RETI will set the EMI bit to enable an interrupt service, but RET will not.
Once an interrupt subroutine is serviced, all the other interrupts will be blocked (by clearing the EMI bit). This
scheme may prevent any further interrupt nesting. Other
interrupt requests may happen during this interval but
only the interrupt request flag is recorded. If a certain interrupt requires servicing within the service routine, the
EMI bit and the corresponding bit of INTC may be set to
allow interrupt nesting. If the stack is full, the interrupt request will not be acknowledged, even if the related interrupt is enabled, until the SP is decremented. If immediate
service is desired, the stack must be prevented from becoming full.
No.
Interrupt Source
Priority Vector
External Interrupt
04H
08H
Bit No.
Label
Function
C is set if the operation results in a carry during an addition operation or if a borrow does not
take place during a subtraction operation; otherwise C is cleared. C is also affected by a rotate
through carry instruction.
AC
AC is set if the operation results in a carry out of the low nibbles in addition or no borrow from
the high nibble into the low nibble in subtraction; otherwise AC is cleared.
OV
OV is set if the operation results in a carry into the highest-order bit but not a carry out of the
highest-order bit, or vice versa; otherwise OV is cleared.
PDF is cleared by system power-up or executing the CLR WDT instruction. PDF is set by
executing the HALT instruction.
TO
Rev. 1.90
November 4, 2005
HT48R10A-1/HT48C10-1
Bit No.
Label
Function
EMI
EEI
ETI
EIF
TF
The timer/event counter interrupt request flag (TF), external interrupt request flag (EIF), enable timer/event
counter bit (ETI), enable external interrupt bit (EEI) and
enable master interrupt bit (EMI) constitute an interrupt
control register (INTC) which is located at 0BH in the
data memory. EMI, EEI, ETI are used to control the enabling/disabling of interrupts. These bits prevent the requested interrupt from being serviced. Once the
interrupt request flags (TF, EIF) are set, they will remain
in the INTC register until the interrupts are serviced or
cleared by a software instruction.
O S C 1
O S C 1
4 7 0 p F
O S C 2
C r y s ta l O s c illa to r
( In c lu d e 3 2 7 6 8 H z )
D D
fS Y S /4
N M O S O p e n D r a in
O S C 2
R C
O s c illa to r
System Oscillator
All of them are designed for system clocks, namely the
external RC oscillator, the external Crystal oscillator and
the internal RC oscillator, which are determined by the
options. No matter what oscillator type is selected, the
signal provides the system clock. The HALT mode stops
the system oscillator and ignores an external signal to
conserve power.
Rev. 1.90
10
November 4, 2005
HT48R10A-1/HT48C10-1
S y s te m
R T C
C lo c k /4
O S C
W D T P r e s c a le r
O p tio n
S e le c t
8 - b it C o u n te r
7 - b it C o u n te r
W D T
O S C
8 -to -1 M U X
W S 0 ~ W S 2
W D T T im e - o u t
Watchdog Timer
one), any execution of the CLR WDT instruction will
clear the WDT. In the case that CLR WDT1 and CLR
WDT2 are chosen (i.e. CLRWDT times equal two),
these two instructions must be executed to clear the
WDT; otherwise, the WDT may reset the chip as a result
of time-out.
unchanged.
WDT and WDT prescaler will be cleared and re-
counted again (if the WDT clock is from the WDT oscillator).
WS1
WS0
Division Ratio
1:1
1:2
1:4
1:8
1:16
1:32
1:64
1:128
Rev. 1.90
11
November 4, 2005
HT48R10A-1/HT48C10-1
words, a dummy period will be inserted after wake-up. If
the wake-up results from an interrupt acknowledgment,
the actual interrupt subroutine execution will be delayed
by one or more cycles. If the wake-up results in the next
instruction execution, this will be executed immediately
after the dummy period is finished.
V D D
R E S
tS
S T
S S T T im e - o u t
C h ip
R e s e t
D D
0 .0 1 m F *
Reset
1 0 0 k W
R E S
1 0 k W
0 .1 m F *
Reset Circuit
Note:
H A L T
W a rm
R e s e t
W D T
RESET Conditions
* Make the length of the wiring, which is connected to the RES pin as short as possible, to
avoid noise interference.
R E S
O S C 1
C o ld
R e s e t
S S T
1 0 - b it R ip p le
C o u n te r
S y s te m
R e s e t
Reset Configuration
Note: u means unchanged
Program Counter
000H
Interrupt
Disable
Prescaler
Clear
WDT
Timer/Event Counter
Off
Input/Output Ports
Input mode
SP
Rev. 1.90
12
November 4, 2005
HT48R10A-1/HT48C10-1
The states of the registers is summarized in the table.
Register
Reset
(Power On)
WDT time-out
RES Reset
(Normal Operation) (Normal Operation)
RES Reset
(HALT)
WDT Time-out
(HALT)*
TMR
xxxx xxxx
xxxx xxxx
xxxx xxxx
xxxx xxxx
uuuu uuuu
TMRC
00-0 1000
00-0 1000
00-0 1000
00-0 1000
uu-u uuuu
000H
000H
000H
000H
000H
Program
Counter
MP
-xxx xxxx
-uuu uuuu
-uuu uuuu
-uuu uuuu
-uuu uuuu
ACC
xxxx xxxx
uuuu uuuu
uuuu uuuu
uuuu uuuu
uuuu uuuu
TBLP
xxxx xxxx
uuuu uuuu
uuuu uuuu
uuuu uuuu
uuuu uuuu
TBLH
--xx xxxx
--uu uuuu
--uu uuuu
--uu uuuu
--uu uuuu
STATUS
--00 xxxx
--1u uuuu
--uu uuuu
--01 uuuu
--11 uuuu
INTC
--00 -000
--00 -000
--00 -000
--00 -000
--uu -uuu
WDTS
0000 0111
0000 0111
0000 0111
0000 0111
uuuu uuuu
PA
1111 1111
1111 1111
1111 1111
1111 1111
uuuu uuuu
PAC
1111 1111
1111 1111
1111 1111
1111 1111
uuuu uuuu
PB
1111 1111
1111 1111
1111 1111
1111 1111
uuuu uuuu
PBC
1111 1111
1111 1111
1111 1111
1111 1111
uuuu uuuu
PC
---1 1111
---1 1111
---1 1111
---1 1111
---u uuuu
PCC
---1 1111
---1 1111
---1 1111
---1 1111
---u uuuu
Note:
Timer/Event Counter
A timer/event counters (TMR) is implemented in the
microcontroller. The timer/event counter contains an
8-bit programmable count-up counter and the clock may
come from an external source or from the system clock
or RTC.
Using the internal clock sources, there are 2 reference
Bit No.
0~2
Label
Function
TE
TON
6
7
TM0
TM1
Rev. 1.90
13
November 4, 2005
HT48R10A-1/HT48C10-1
fS
Y S
fR
T C
(1 /2 ~ 1 /2 5 6 )
U
X
8 - s ta g e P r e s c a le r
f IN
8 -1 M U X
D a ta B u s
T
T M 1
T M 0
O p tio n s
P S C 2 ~ P S C 0
T M R
T im e r /E v e n t C o u n te r
P r e lo a d R e g is te r
R e lo a d
T E
T M 1
T M 0
T O N
T im e r /E v e n t
C o u n te r
P u ls e W id th
M e a s u re m e n t
M o d e C o n tro l
O v e r flo w
to In te rru p t
1 /2
B Z
B Z
Timer/Event Counter
But in the other two modes the TON can only be reset by
instructions. The overflow of the timer/event counter is
one of the wake-up sources. No matter what the operation mode is, writing a 0 to ETI can disable the interrupt
service.
The timer/event counter can generate PFD signal by using external or internal clock and PFD frequency is determine by the equation fINT/[2(256-N)].
There are 2 registers related to the timer/event counter;
TMR ([0DH]), TMRC ([0EH]). Two physical registers are
mapped to TMR location; writing TMR makes the starting value be placed in the timer/event counter preload
register and reading TMR gets the contents of the
timer/event counter. The TMRC is a timer/event counter
control register, which defines some options.
In the case of timer/event counter OFF condition, writing data to the timer/event counter preload register will
also reload that data to the timer/event counter. But if the
timer/event counter is turned on, data written to it will
only be kept in the timer/event counter preload register.
The timer/event counter will still operate until overflow occurs. When the timer/event counter (reading TMR) is read,
the clock will be blocked to avoid errors. As clock blocking
may results in a counting error, this must be taken into consideration by the programmer.
Input/Output Ports
There are 21 bidirectional input/output lines in the
microcontroller, labeled from PA to PC, which are
mapped to the data memory of [12H], [14H] and [16H]
respectively. All of these I/O ports can be used for input
and output operations. For input operation, these ports
are non-latching, that is, the inputs must be ready at the
T2 rising edge of instruction MOV A,[m] (m=12H, 14H
or 16H). For output operation, all the data is latched and
remains unchanged until the output latch is rewritten.
Rev. 1.90
Each I/O line has its own control register (PAC, PBC,
PCC) to control the input/output configuration. With this
control register, CMOS output or Schmitt trigger input
with or without pull-high resistor structures can be reconfigured dynamically (i.e. on-the-fly) under software
control. To function as an input, the corresponding latch
of the control register must write 1. The input source
also depends on the control register. If the control register bit is 1, the input will read the pad state. If the control register bit is 0, the contents of the latches will
move to the internal bus. The latter is possible in the
read-modify-write instruction.
14
November 4, 2005
HT48R10A-1/HT48C10-1
mented; on reading them a 0 is returned whereas writing
then results in a no-operation. See Application note.
PB1 I/O
PB0 Mode
PB1 Mode
PB0 Data
PB1 Data
D0
D1
D0
D1
Note:
M o d e O n ly
C o n tr o l B it
D a ta B u s
D D
P U
Q
D
C K
W r ite C o n tr o l R e g is te r
C h ip R e s e t
R e a d C o n tr o l R e g is te r
P A 0 ~ P A 7
P B 0 ~ P B 7
P C 0 ~ P C 4
D a ta B it
Q
D
Q
C K
W r ite D a ta R e g is te r
S
( P B 0 , P B 1 O n ly )
P B 0
B Z /B Z
M
R e a d D a ta R e g is te r
U
X
B Z E N
( P B 0 , P B 1 O n ly )
X
S y s te m W a k e -u p
( P A o n ly )
O P 0 ~ O P 7
IN T fo r P C 0 O n ly
T M R fo r P C 1 O n ly
Input/Output Ports
Rev. 1.90
15
November 4, 2005
HT48R10A-1/HT48C10-1
The PC0 and PC1 are pin-shared with INT, TMR and
pins respectively.
O P R
5 .5 V
L V R
3 .0 V
2 .2 V
Note:
VOPR is the voltage range for proper chip operation at 4MHz system clock.
D D
5 .5 V
L V R
L V R
D e te c t V o lta g e
0 .9 V
0 V
R e s e t S ig n a l
N o r m a l O p e r a tio n
R e s e t
R e s e t
*1
*2
*1: To make sure that the system oscillator has stabilized, the SST provides an extra delay of 1024 system
clock pulses before entering the normal operation.
*2: Since the low voltage has to maintain in its original state and exceed 1ms, therefore 1ms delay enter the
reset mode.
Rev. 1.90
16
November 4, 2005
HT48R10A-1/HT48C10-1
Options
The following table shows all kinds of options in the microcontroller. All of the options must be defined to ensure proper
system functioning.
Items
Options
System oscillator
Ext.RC, Ext.crystal, Int.RC+RTC or Int.RC+PC3/PC4
10
Rev. 1.90
17
November 4, 2005
HT48R10A-1/HT48C10-1
Application Circuits
V
D D
O S C
O S C 1
4 7 0 p F
V
R C S y s te m O s c illa to r
2 4 k W < R O S C < 1 M W
O S C 2
N M O S o p e n d r a in
D D
C 1
0 .0 1 m F *
V D D
1 0 0 k W
P B 2 ~ P B 7
0 .1 m F
O S C 1
P A 0 ~ P A 7
C 2
P C 2
R E S
R 1
O S C 2
C ry s ta l S y s te m
F o r th e v a lu e s ,
s e e ta b le b e lo w
O s c illa to r
1 0 k W
P B 0 /B Z
0 .1 m F *
V S S
O S C 1
P B 1 /B Z
O S C 2
O S C
C ir c u it
O S C 1
O S C 2
O S C 1
S e e R ig h t S id e
1 0 p F
P C 0 /IN T
3 2 7 6 8 H z
In te r n a l R C
w ith R T C
O s c illa to r
O S C 2
P C 1 /T M R
H T 4 8 R 1 0 A -1 /H T 4 8 C 1 0 -1
Note:
In te r n a l R C O s c illa to r
O S C 1 a n d O S C 2 le ft
u n c o n n e c te d
O S C
C ir c u it
The resistance and capacitance for reset circuit should be designed to ensure that the VDD is stable and remains in a valid range of the operating voltage before bringing RES to high.
* Make the length of the wiring, which is connected to the RES pin as short as possible, to avoid noise
interference.
The following table shows the C1, C2 and R1 values corresponding to the different crystal values. (For reference only)
Crystal or Resonator
C1, C2
R1
4MHz Crystal
0pF
10kW
4MHz Resonator
10pF
12kW
3.58MHz Crystal
0pF
10kW
3.58MHz Resonator
25pF
10kW
25pF
10kW
1MHz Crystal
35pF
27kW
480kHz Resonator
300pF
9.1kW
455kHz Resonator
300pF
10kW
429kHz Resonator
300pF
10kW
The function of the resistor R1 is to ensure that the oscillator will switch off should low voltage conditions occur. Such a low voltage, as mentioned here, is one which is less than the lowest value of the
MCU operating voltage. Note however that if the LVR is enabled then R1 can be removed.
Rev. 1.90
18
November 4, 2005
HT48R10A-1/HT48C10-1
Instruction Set Summary
Description
Instruction
Cycle
Flag
Affected
1
1(1)
1
1
1(1)
1
1
1(1)
1
1(1)
1(1)
Z,C,AC,OV
Z,C,AC,OV
Z,C,AC,OV
Z,C,AC,OV
Z,C,AC,OV
Z,C,AC,OV
Z,C,AC,OV
Z,C,AC,OV
Z,C,AC,OV
Z,C,AC,OV
C
1
1
1
1(1)
1(1)
1(1)
1
1
1
1(1)
1
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
1
1(1)
1
1(1)
Z
Z
Z
Z
1
1(1)
1
1(1)
1
1(1)
1
1(1)
None
None
C
C
None
None
C
C
1
1(1)
1
None
None
None
1(1)
1(1)
None
None
Mnemonic
Arithmetic
ADD A,[m]
ADDM A,[m]
ADD A,x
ADC A,[m]
ADCM A,[m]
SUB A,x
SUB A,[m]
SUBM A,[m]
SBC A,[m]
SBCM A,[m]
DAA [m]
Logic Operation
AND A,[m]
OR A,[m]
XOR A,[m]
ANDM A,[m]
ORM A,[m]
XORM A,[m]
AND A,x
OR A,x
XOR A,x
CPL [m]
CPLA [m]
Rev. 1.90
19
November 4, 2005
HT48R10A-1/HT48C10-1
Instruction
Cycle
Flag
Affected
Jump unconditionally
Skip if data memory is zero
Skip if data memory is zero with data movement to ACC
Skip if bit i of data memory is zero
Skip if bit i of data memory is not zero
Skip if increment data memory is zero
Skip if decrement data memory is zero
Skip if increment data memory is zero with result in ACC
Skip if decrement data memory is zero with result in ACC
Subroutine call
Return from subroutine
Return from subroutine and load immediate data to ACC
Return from interrupt
2
1(2)
1(2)
1(2)
1(2)
1(3)
1(3)
1(2)
1(2)
2
2
2
2
None
None
None
None
None
None
None
None
None
None
None
None
None
2(1)
2(1)
None
None
No operation
Clear data memory
Set data memory
Clear Watchdog Timer
Pre-clear Watchdog Timer
Pre-clear Watchdog Timer
Swap nibbles of data memory
Swap nibbles of data memory with result in ACC
Enter power down mode
1
1(1)
1(1)
1
1
1
1(1)
1
1
None
None
None
TO,PDF
TO(4),PDF(4)
TO(4),PDF(4)
None
None
TO,PDF
Mnemonic
Description
Branch
JMP addr
SZ [m]
SZA [m]
SZ [m].i
SNZ [m].i
SIZ [m]
SDZ [m]
SIZA [m]
SDZA [m]
CALL addr
RET
RET A,x
RETI
Table Read
TABRDC [m]
TABRDL [m]
Miscellaneous
NOP
CLR [m]
SET [m]
CLR WDT
CLR WDT1
CLR WDT2
SWAP [m]
SWAPA [m]
HALT
Note:
x: Immediate data
m: Data memory address
A: Accumulator
i: 0~7 number of bits
addr: Program memory address
: Flag is affected
-: Flag is not affected
(1)
: If a loading to the PCL register occurs, the execution cycle of instructions will be delayed for one more cycle
(four system clocks).
(2)
: If a skipping to the next instruction occurs, the execution cycle of instructions will be delayed for one more
cycle (four system clocks). Otherwise the original instruction cycle is unchanged.
(3) (1)
(4)
Rev. 1.90
and (2)
: The flags may be affected by the execution status. If the Watchdog Timer is cleared by executing the
CLR WDT1 or CLR WDT2 instruction, the TO and PDF are cleared.
Otherwise the TO and PDF flags remain unchanged.
20
November 4, 2005
HT48R10A-1/HT48C10-1
Instruction Definition
ADC A,[m]
Description
The contents of the specified data memory, accumulator and the carry flag are added simultaneously, leaving the result in the accumulator.
Operation
ACC ACC+[m]+C
Affected flag(s)
TO
OV
AC
ADCM A,[m]
Description
The contents of the specified data memory, accumulator and the carry flag are added simultaneously, leaving the result in the specified data memory.
Operation
[m] ACC+[m]+C
Affected flag(s)
TO
OV
AC
ADD A,[m]
Description
The contents of the specified data memory and the accumulator are added. The result is
stored in the accumulator.
Operation
ACC ACC+[m]
Affected flag(s)
TO
OV
AC
ADD A,x
Description
The contents of the accumulator and the specified data are added, leaving the result in the
accumulator.
Operation
ACC ACC+x
Affected flag(s)
TO
OV
AC
ADDM A,[m]
Description
The contents of the specified data memory and the accumulator are added. The result is
stored in the data memory.
Operation
[m] ACC+[m]
Affected flag(s)
Rev. 1.90
TO
OV
AC
21
November 4, 2005
HT48R10A-1/HT48C10-1
AND A,[m]
Description
Data in the accumulator and the specified data memory perform a bitwise logical_AND operation. The result is stored in the accumulator.
Operation
Affected flag(s)
TO
OV
AC
AND A,x
Description
Data in the accumulator and the specified data perform a bitwise logical_AND operation.
The result is stored in the accumulator.
Operation
Affected flag(s)
TO
OV
AC
ANDM A,[m]
Description
Data in the specified data memory and the accumulator perform a bitwise logical_AND operation. The result is stored in the data memory.
Operation
Affected flag(s)
TO
OV
AC
CALL addr
Subroutine call
Description
The instruction unconditionally calls a subroutine located at the indicated address. The
program counter increments once to obtain the address of the next instruction, and pushes
this onto the stack. The indicated address is then loaded. Program execution continues
with the instruction at this address.
Operation
Affected flag(s)
TO
OV
AC
CLR [m]
Description
Operation
[m] 00H
Affected flag(s)
Rev. 1.90
TO
OV
AC
22
November 4, 2005
HT48R10A-1/HT48C10-1
CLR [m].i
Description
Operation
[m].i 0
Affected flag(s)
TO
OV
AC
CLR WDT
Description
The WDT is cleared (clears the WDT). The power down bit (PDF) and time-out bit (TO) are
cleared.
Operation
WDT 00H
PDF and TO 0
Affected flag(s)
TO
OV
AC
CLR WDT1
Description
Together with CLR WDT2, clears the WDT. PDF and TO are also cleared. Only execution
of this instruction without the other preclear instruction just sets the indicated flag which implies this instruction has been executed and the TO and PDF flags remain unchanged.
Operation
WDT 00H*
PDF and TO 0*
Affected flag(s)
TO
OV
AC
0*
0*
CLR WDT2
Description
Together with CLR WDT1, clears the WDT. PDF and TO are also cleared. Only execution
of this instruction without the other preclear instruction, sets the indicated flag which implies this instruction has been executed and the TO and PDF flags remain unchanged.
Operation
WDT 00H*
PDF and TO 0*
Affected flag(s)
TO
OV
AC
0*
0*
CPL [m]
Description
Each bit of the specified data memory is logically complemented (1s complement). Bits
which previously contained a 1 are changed to 0 and vice-versa.
Operation
[m] [m]
Affected flag(s)
Rev. 1.90
TO
OV
AC
23
November 4, 2005
HT48R10A-1/HT48C10-1
CPLA [m]
Description
Each bit of the specified data memory is logically complemented (1s complement). Bits
which previously contained a 1 are changed to 0 and vice-versa. The complemented result
is stored in the accumulator and the contents of the data memory remain unchanged.
Operation
ACC [m]
Affected flag(s)
TO
OV
AC
DAA [m]
Description
The accumulator value is adjusted to the BCD (Binary Coded Decimal) code. The accumulator is divided into two nibbles. Each nibble is adjusted to the BCD code and an internal
carry (AC1) will be done if the low nibble of the accumulator is greater than 9. The BCD adjustment is done by adding 6 to the original value if the original value is greater than 9 or a
carry (AC or C) is set; otherwise the original value remains unchanged. The result is stored
in the data memory and only the carry flag (C) may be affected.
Operation
Affected flag(s)
TO
OV
AC
DEC [m]
Description
Operation
[m] [m]-1
Affected flag(s)
TO
OV
AC
DECA [m]
Description
Data in the specified data memory is decremented by 1, leaving the result in the accumulator. The contents of the data memory remain unchanged.
Operation
ACC [m]-1
Affected flag(s)
Rev. 1.90
TO
OV
AC
24
November 4, 2005
HT48R10A-1/HT48C10-1
HALT
Description
This instruction stops program execution and turns off the system clock. The contents of
the RAM and registers are retained. The WDT and prescaler are cleared. The power down
bit (PDF) is set and the WDT time-out bit (TO) is cleared.
Operation
Affected flag(s)
TO
OV
AC
INC [m]
Description
Operation
[m] [m]+1
Affected flag(s)
TO
OV
AC
INCA [m]
Description
Data in the specified data memory is incremented by 1, leaving the result in the accumulator. The contents of the data memory remain unchanged.
Operation
ACC [m]+1
Affected flag(s)
TO
OV
AC
JMP addr
Directly jump
Description
The program counter are replaced with the directly-specified address unconditionally, and
control is passed to this destination.
Operation
Affected flag(s)
TO
OV
AC
MOV A,[m]
Description
The contents of the specified data memory are copied to the accumulator.
Operation
ACC [m]
Affected flag(s)
Rev. 1.90
TO
OV
AC
25
November 4, 2005
HT48R10A-1/HT48C10-1
MOV A,x
Description
The 8-bit data specified by the code is loaded into the accumulator.
Operation
ACC x
Affected flag(s)
TO
OV
AC
MOV [m],A
Description
The contents of the accumulator are copied to the specified data memory (one of the data
memories).
Operation
[m] ACC
Affected flag(s)
TO
OV
AC
NOP
No operation
Description
Operation
Affected flag(s)
TO
OV
AC
OR A,[m]
Description
Data in the accumulator and the specified data memory (one of the data memories) perform a bitwise logical_OR operation. The result is stored in the accumulator.
Operation
Affected flag(s)
TO
OV
AC
OR A,x
Description
Data in the accumulator and the specified data perform a bitwise logical_OR operation.
The result is stored in the accumulator.
Operation
ACC ACC OR x
Affected flag(s)
TO
OV
AC
ORM A,[m]
Description
Data in the data memory (one of the data memories) and the accumulator perform a
bitwise logical_OR operation. The result is stored in the data memory.
Operation
Affected flag(s)
Rev. 1.90
TO
OV
AC
26
November 4, 2005
HT48R10A-1/HT48C10-1
RET
Description
The program counter is restored from the stack. This is a 2-cycle instruction.
Operation
Affected flag(s)
TO
OV
AC
RET A,x
Description
The program counter is restored from the stack and the accumulator loaded with the specified 8-bit immediate data.
Operation
Affected flag(s)
TO
OV
AC
RETI
Description
The program counter is restored from the stack, and interrupts are enabled by setting the
EMI bit. EMI is the enable master (global) interrupt bit.
Operation
Affected flag(s)
TO
OV
AC
RL [m]
Description
The contents of the specified data memory are rotated 1 bit left with bit 7 rotated into bit 0.
Operation
Affected flag(s)
TO
OV
AC
RLA [m]
Description
Data in the specified data memory is rotated 1 bit left with bit 7 rotated into bit 0, leaving the
rotated result in the accumulator. The contents of the data memory remain unchanged.
Operation
Affected flag(s)
Rev. 1.90
TO
OV
AC
27
November 4, 2005
HT48R10A-1/HT48C10-1
RLC [m]
Description
The contents of the specified data memory and the carry flag are rotated 1 bit left. Bit 7 replaces the carry bit; the original carry flag is rotated into the bit 0 position.
Operation
Affected flag(s)
TO
OV
AC
RLCA [m]
Description
Data in the specified data memory and the carry flag are rotated 1 bit left. Bit 7 replaces the
carry bit and the original carry flag is rotated into bit 0 position. The rotated result is stored
in the accumulator but the contents of the data memory remain unchanged.
Operation
Affected flag(s)
TO
OV
AC
RR [m]
Description
The contents of the specified data memory are rotated 1 bit right with bit 0 rotated to bit 7.
Operation
Affected flag(s)
TO
OV
AC
RRA [m]
Description
Data in the specified data memory is rotated 1 bit right with bit 0 rotated into bit 7, leaving
the rotated result in the accumulator. The contents of the data memory remain unchanged.
Operation
Affected flag(s)
TO
OV
AC
RRC [m]
Description
The contents of the specified data memory and the carry flag are together rotated 1 bit
right. Bit 0 replaces the carry bit; the original carry flag is rotated into the bit 7 position.
Operation
Affected flag(s)
Rev. 1.90
TO
OV
AC
28
November 4, 2005
HT48R10A-1/HT48C10-1
RRCA [m]
Description
Data of the specified data memory and the carry flag are rotated 1 bit right. Bit 0 replaces
the carry bit and the original carry flag is rotated into the bit 7 position. The rotated result is
stored in the accumulator. The contents of the data memory remain unchanged.
Operation
Affected flag(s)
TO
OV
AC
SBC A,[m]
Description
The contents of the specified data memory and the complement of the carry flag are subtracted from the accumulator, leaving the result in the accumulator.
Operation
ACC ACC+[m]+C
Affected flag(s)
TO
OV
AC
SBCM A,[m]
Description
The contents of the specified data memory and the complement of the carry flag are subtracted from the accumulator, leaving the result in the data memory.
Operation
[m] ACC+[m]+C
Affected flag(s)
TO
OV
AC
SDZ [m]
Description
The contents of the specified data memory are decremented by 1. If the result is 0, the next
instruction is skipped. If the result is 0, the following instruction, fetched during the current
instruction execution, is discarded and a dummy cycle is replaced to get the proper instruction (2 cycles). Otherwise proceed with the next instruction (1 cycle).
Operation
Affected flag(s)
TO
OV
AC
SDZA [m]
Description
The contents of the specified data memory are decremented by 1. If the result is 0, the next
instruction is skipped. The result is stored in the accumulator but the data memory remains
unchanged. If the result is 0, the following instruction, fetched during the current instruction
execution, is discarded and a dummy cycle is replaced to get the proper instruction (2 cycles). Otherwise proceed with the next instruction (1 cycle).
Operation
Affected flag(s)
Rev. 1.90
TO
OV
AC
29
November 4, 2005
HT48R10A-1/HT48C10-1
SET [m]
Description
Operation
[m] FFH
Affected flag(s)
TO
OV
AC
SET [m]. i
Description
Operation
[m].i 1
Affected flag(s)
TO
OV
AC
SIZ [m]
Description
The contents of the specified data memory are incremented by 1. If the result is 0, the following instruction, fetched during the current instruction execution, is discarded and a
dummy cycle is replaced to get the proper instruction (2 cycles). Otherwise proceed with
the next instruction (1 cycle).
Operation
Affected flag(s)
TO
OV
AC
SIZA [m]
Description
The contents of the specified data memory are incremented by 1. If the result is 0, the next
instruction is skipped and the result is stored in the accumulator. The data memory remains unchanged. If the result is 0, the following instruction, fetched during the current instruction execution, is discarded and a dummy cycle is replaced to get the proper
instruction (2 cycles). Otherwise proceed with the next instruction (1 cycle).
Operation
Affected flag(s)
TO
OV
AC
SNZ [m].i
Description
If bit i of the specified data memory is not 0, the next instruction is skipped. If bit i of the data
memory is not 0, the following instruction, fetched during the current instruction execution,
is discarded and a dummy cycle is replaced to get the proper instruction (2 cycles). Otherwise proceed with the next instruction (1 cycle).
Operation
Skip if [m].i0
Affected flag(s)
Rev. 1.90
TO
OV
AC
30
November 4, 2005
HT48R10A-1/HT48C10-1
SUB A,[m]
Description
The specified data memory is subtracted from the contents of the accumulator, leaving the
result in the accumulator.
Operation
ACC ACC+[m]+1
Affected flag(s)
TO
OV
AC
SUBM A,[m]
Description
The specified data memory is subtracted from the contents of the accumulator, leaving the
result in the data memory.
Operation
[m] ACC+[m]+1
Affected flag(s)
TO
OV
AC
SUB A,x
Description
The immediate data specified by the code is subtracted from the contents of the accumulator, leaving the result in the accumulator.
Operation
ACC ACC+x+1
Affected flag(s)
TO
OV
AC
SWAP [m]
Description
The low-order and high-order nibbles of the specified data memory (1 of the data memories) are interchanged.
Operation
[m].3~[m].0 [m].7~[m].4
Affected flag(s)
TO
OV
AC
SWAPA [m]
Description
The low-order and high-order nibbles of the specified data memory are interchanged, writing the result to the accumulator. The contents of the data memory remain unchanged.
Operation
ACC.3~ACC.0 [m].7~[m].4
ACC.7~ACC.4 [m].3~[m].0
Affected flag(s)
Rev. 1.90
TO
OV
AC
31
November 4, 2005
HT48R10A-1/HT48C10-1
SZ [m]
Description
If the contents of the specified data memory are 0, the following instruction, fetched during
the current instruction execution, is discarded and a dummy cycle is replaced to get the
proper instruction (2 cycles). Otherwise proceed with the next instruction (1 cycle).
Operation
Skip if [m]=0
Affected flag(s)
TO
OV
AC
SZA [m]
Description
The contents of the specified data memory are copied to the accumulator. If the contents is
0, the following instruction, fetched during the current instruction execution, is discarded
and a dummy cycle is replaced to get the proper instruction (2 cycles). Otherwise proceed
with the next instruction (1 cycle).
Operation
Skip if [m]=0
Affected flag(s)
TO
OV
AC
SZ [m].i
Description
If bit i of the specified data memory is 0, the following instruction, fetched during the current
instruction execution, is discarded and a dummy cycle is replaced to get the proper instruction (2 cycles). Otherwise proceed with the next instruction (1 cycle).
Operation
Skip if [m].i=0
Affected flag(s)
TO
OV
AC
TABRDC [m]
Move the ROM code (current page) to TBLH and data memory
Description
The low byte of ROM code (current page) addressed by the table pointer (TBLP) is moved
to the specified data memory and the high byte transferred to TBLH directly.
Operation
Affected flag(s)
TO
OV
AC
TABRDL [m]
Move the ROM code (last page) to TBLH and data memory
Description
The low byte of ROM code (last page) addressed by the table pointer (TBLP) is moved to
the data memory and the high byte transferred to TBLH directly.
Operation
Affected flag(s)
Rev. 1.90
TO
OV
AC
32
November 4, 2005
HT48R10A-1/HT48C10-1
XOR A,[m]
Description
Data in the accumulator and the indicated data memory perform a bitwise logical Exclusive_OR operation and the result is stored in the accumulator.
Operation
Affected flag(s)
TO
OV
AC
XORM A,[m]
Description
Data in the indicated data memory and the accumulator perform a bitwise logical Exclusive_OR operation. The result is stored in the data memory. The 0 flag is affected.
Operation
Affected flag(s)
TO
OV
AC
XOR A,x
Description
Data in the accumulator and the specified data perform a bitwise logical Exclusive_OR operation. The result is stored in the accumulator. The 0 flag is affected.
Operation
Affected flag(s)
Rev. 1.90
TO
OV
AC
33
November 4, 2005
HT48R10A-1/HT48C10-1
Package Information
24-pin SKDIP (300mil) Outline Dimensions
2 4
1 3
1 2
H
C
D
E
Symbol
Rev. 1.90
a
G
Dimensions in mil
Min.
Nom.
Max.
1235
1265
255
265
125
135
125
145
16
20
50
70
100
295
315
345
360
15
34
November 4, 2005
HT48R10A-1/HT48C10-1
24-pin SOP (300mil) Outline Dimensions
1 3
2 4
A
B
1 2
1
C
C '
G
H
D
E
Symbol
Rev. 1.90
a
F
Dimensions in mil
Min.
Nom.
Max.
394
419
290
300
14
20
590
614
92
104
50
32
38
12
10
35
November 4, 2005
HT48R10A-1/HT48C10-1
Product Tape and Reel Specifications
Reel Dimensions
D
T 2
C
B
T 1
SOP 24W
Symbol
Description
Dimensions in mm
3301.0
621.5
13.0+0.5
-0.2
2.00.5
T1
24.8+0.3
-0.2
T2
Reel Thickness
30.20.2
Rev. 1.90
36
November 4, 2005
HT48R10A-1/HT48C10-1
Carrier Tape Dimensions
P 0
D
P 1
t
E
F
W
C
D 1
B 0
K 0
A 0
SOP 24W
Symbol
Description
Dimensions in mm
24.00.3
Cavity Pitch
12.00.1
Perforation Position
1.750.1
11.50.1
Perforation Diameter
1.55+0.1
D1
1.5+0.25
P0
Perforation Pitch
4.00.1
P1
2.00.1
A0
Cavity Length
10.90.1
B0
Cavity Width
15.90.1
K0
Cavity Depth
3.10.1
Rev. 1.90
0.350.05
21.3
37
November 4, 2005
HT48R10A-1/HT48C10-1
Rev. 1.90
38
November 4, 2005