English
Language : 

HT45FH4J Datasheet, PDF (57/129 Pages) Holtek Semiconductor Inc – Emergency Light Flash MCU
HT45FH4J
Emergency Light Flash MCU
D a ta B u s
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
W r ite D a ta R e g is te r
R e a d D a ta R e g is te r
T o A /D C o n v e rte r
C o n tr o l B it
D
Q
P u ll- H ig h
R e g is te r
S e le c t
C KS Q
D a ta B it
D
Q
C KS Q
M
U
X
A n a lo g
In p u t
S e le c to r
V DD
W eak
P u ll- u p
A /D In p u t P o rt
S A C S 3~S A C S 0
A/D Input/Output Structure
Programming Considerations
Within the user program, one of the first things to consider is port initialisation. After a reset, all of
the I/O data and port control registers will be set high. This means that all I/O pins will default to
an input state, the level of which depends on the other connected circuitry and whether pull-high
selections have been chosen. If the port control registers, PAC~PBC, are then programmed to setup
some pins as outputs, these output pins will have an initial high output value unless the associated
port data registers, PA~PB, are first programmed. Selecting which pins are inputs and which are
outputs can be achieved byte-wide by loading the correct values into the appropriate port control
register or by programming individual bits in the port control register using the “SET [m].i” and
“CLR [m].i” instructions. Note that when using these bit control instructions, a read-modify-write
operation takes place. The microcontroller must first read in the data on the entire port, modify it to
the required new bit values and then rewrite this data back to the output ports.
S y s te m C lo c k
T1
T2
T3
T4
T1
T2
T3
T4
P o rt D a ta
R e a d fro m P o rt
W r ite to P o r t
Read/Wite Timing
Port A has the additional capability of providing wake-up functions. When the device is in the
SLEEP or IDLE Mode, various methods are available to wake the device up. One of these is a high
to low transition of any of the Port A pins. Single or multiple pins on Port A can be setup to have this
function.
Rev. 1.10
57
December 14, 2016