Up to 4µs instruction cycle with 1MHz
system clock
•
4K × 8 × 4 program ROM
•
Data memory RAM size 256 × 4 bits
•
64 segments × 8 commons, 1/5 bias LCD driver
General Description
The HTG12N0 is the processor from HOL TEK’ s
4-bit stand alone single chip microcontroller
specially designed for LCD display and time
piece product applications.
HTG12N0
4-Bit Microcontroller
•
8-bit table read instruction
•
Five working registers
•
Internal timer overflow
•
One level subroutine nesting
•
RC oscillator and 32768Hz crystal oscillator
•
8-bit timer with internal or external cl ock
source
•
Sound effect circuit
It is ideally suited for multiple LCD time piece
low power applications among which are calculators, scales, calendar and hand held LCD
products.
118th Mar ’99
Block Diagram
HTG12N0
Notes: ACC: AccumulatorR0~R4: Working registers
PB0, PB1: ROM bank switchPC0: RAM bank switch
PC1: LCD On/Off switchPA, PC2~PC3: Output ports
PS, PM0~PM2: Input ports
218th Mar ’99
Pad Assignment
HTG12N0
Chip size: 3430 × 3730 (µm)
* The IC substrate should be connected to VSS in the PCB layout artwork.
9~16COM7~COM0 O—Output for LCD panel common plate
22~25
21~19
26VSSI—Negative power suppl y, GND
27, 28BZ,
33~30
35~34
36
37TMCLKI
SEG63~SEG2
SEG1~SEG0
XIN
XOUT
OSCI
OSCO
T512
T1D
TEST1
TEST2
PS3~PS0
PM2~PM0
BZONote 1Sound effect outputs
PA3~PA0
PC3~PC2
RESI—
O—LCD driver outputs for LCD panel segment
I
O
I
O
O
O
I
I
I
O
Mask
Option
—
—
Pull-high or
None, Note 2
CMOS or
NMOS Open
Drain
Pull-high or
None, Note 3
Description
32768Hz crystal oscillator for time base, LCD
clock
An external resistor between OSCI and OSC0 is
needed for the internal system clock.
For test mode only
TEST1 and TEST2 are left open when the chip is
in normal operation (with an internal pull-high
resistor).
Input pins for input only
Output latch pins for output only
Input to reset an internal LSI
Reset is active on logical low level
Input for TIMER clock
TIMER can be clocked by an external clock or an
internal frequency source.
Notes:
1. The system clock provides six different sources selectable by mask option to drive the sound effect
clock. If the Holtek sound library is used, only 128K and 64K are acceptable.
2. Each bit of ports PM0~PM2, PS can be a trigger source of the HALT interrupt, selectable by mask
option.
3.14 internal clock sources can be selected by mask option to drive TMCLK. Note that TMCLK
should not be connected to a pull high resistor if an internal source is used.
518th Mar ’99
HTG12N0
Absolu te Maximu m R a tin g s
Supply Voltage .................................–0.3V~5.5VStorage Temperature....................–50°C~125°C
Input V oltage.....................V
Note: These are stress ratings only. Stresses exceeding the range specified under “Absolute M axi-
mum Ratings” ma y 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 condition s may affect device reliability.
D.C. CharacteristicsTa=25°C
–0.3V~VDD+0.3VOperating Temperature.....................0°C~70 °C
SS
SymbolParameter
V
DD
I
DD
I
STB1
I
STB2
V
IL
V
IH
I
OL1
I
OH1
I
OL2
I
OH2
R
PH
Operating Voltage——2.433.5V
Operating Current
(LCD ON)
Standby Current
(LCD OFF)
Standby Current
(LCD ON)
Input Low Voltage3V—0—0.2V
Input High Voltage3V—0.8V
PA, PC, BZ and BZ
Output Sink Current
PA, PC, BZ and BZ
Output Source Current
Segment Output Sink
Current
Segment Output Source
Current
Pull-high Resistor3V
Test Conditions
V
DD
3V
Conditions
No load,
f
=512kHz
SYS
Min.Typ.Max.Unit
—100200
3V HALT mode—25
3V HALT mode—1020
—VDDV
3V V
3V V
3V V
3V V
DD
=0.3V1.53—mA
OL
=2.7V–0.5–1—mA
OH
=0.3V3060—µA
OL
=2.7V–50–100—µA
OH
PS, PM,
TMCLK
RES,
15100200k
DD
µA
µA
µA
V
Ω
618th Mar ’99
HTG12N0
A.C. CharacteristicsTa=25°C
SymbolParameter
f
SYS
f
LCD
t
COM
t
CY
f
TIMER
t
RES
f
SOUND
System Clock3V R=620kΩ~36kΩ128—1000kHz
LCD Clock3V——256—Hz
LCD Common Period—1/8 duty—(1/f
Cycle Time3V f
Timer I/P Frequency
(TMCLK)
Reset Pulse Width——5——ms
Sound Effect Clock———*64 or 128—kHz
Test Conditions
V
DD
Conditions
=1MHz—4—µs
SYS
Min.Typ.Max.Unit
)×8— s
LCD
3V—0—1000kHz
*: Only these two clocking signal frequencies are supported by Holtek’s sound library.
718th Mar ’99
Functional Description
Program counter – PC
This counter a ddresses the program ROM and
is arranged as a 12-bit binary counter from PC0
to PC11 whose contents specify a maximum of 4096
addresses. The program counter counts with an incr ement of 1 or 2 w ith each execution of an instruction.
When executing the jump instruction (JMP,
JNZ, JC, JTMR,...), a subroutine call, initial
reset, internal inte rrupt, RTC interrupt or returning from a subroutine, the program counter
is loaded with the corresponding instruction
data as shown in the table.
Notes: P0~P11: Instruction code
@: PC11 keeps the curre nt value
S0~S11: Stack register bits
PB0 and PB1 are set to 0 at power on
reset.
Program memory – ROM
The program memory is the executable memory
and is arranged in a 4096
four banks for the program memory in HTG12N0 ,
each bank shown in the figure can be switched by
the assignment of PB0 and PB1. The address is
specified by the program counter (PC). Four sp ecial locations are reserved as shown below .
Location 4
Contains the timer interrupt resulting from a
TIMER overflow. If the interrupts are enabled,
it causes the program to jump to this subroutine.
•
Location 8
Activating the RTC of the processor with the
interrupts enabled causes the program to
jump to this location.
•
Locations n00H to nFFH
Each page in the program memory consists of
256 bytes. This area from n00H to nFFH and
F00H to FFFH can be used as a look-up table.
Instructions such as READ R4A, READ
MR0A, READF R4A, READF MR0A can read
the table and transfer the contents of the
table to ACC and R4 or to ACC and a data
memory address specified by the register pair
R1,R0. However as R1,R0 can only store 8
bits, these instructions cannot fully specify
the full 12-bit program memory ad dress. For
this reason a jump instruction should be used
first to place the program counter in the right
page. The above instructions can then be used
to read the look up table data.
Note that the page number n must be greater
than zero as some lo cations in page 0 are reserved for specific usage as mentioned. This
area may functio n as n ormal pro gram m em ory
as required.
The program memory mapping is shown in the
diagram.
In the execution o f an instruction the program
counter is added before the execution phase, so
careful manipulation of READ MR0A and
READ R4A is required in the page margin.
Stack register
The stack register is a group of registers used to
save the contents of th e program counter (PC)
and is arranged in 13 bits
× 1 level. One bit is
used to store the carry flag. An interrupt will
force the contents o f the PC and the carry flag
onto the stack registe r. A subroutine call will
HTG12N0
Program memory PB0=0, PB1=1
Program memory PB0=1, PB1=1
also cause the PC contents to be pushed onto
the stack; however the carry flag will not be
stored. At the end o f a subroutine or a n interrupt routine wh ich is signaled by a re turn instruction, RET or RETI restore the program
counter to its previous value from the stack
register. Executing “RETI” instruction will restore the carry flag from the stack register, but
“RET” will not.
Working registers – R0, R1, R2, R3, R4
There are five working regi sters (R0, R1, R2, R3, R4)
usually used to store the frequently accessed intermediate results. Usin g the instruct ions INC Rn and
DEC Rn the working registers can increment (+1) or
decrement (–1). The JNZ Rn (n=0,1,4) instruction
makes efficient use of the wo rking registers as a
program loop counter . Also the r egister pairs R0,R1
and R2,R3 are use d as a data memory pointer when
the memory transf er instru ction is executed.
918th Mar ’99
Loading...
+ 21 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.