HT45F12
8-Bit Flash MCU with Op Amps & Comparators
Input/Output Ports
HoltekꢀmicrocontrollersꢀofferꢀconsiderableꢀflexibilityꢀonꢀtheirꢀI/Oꢀports.ꢀWithꢀtheꢀinputꢀorꢀoutputꢀ
designationꢀofꢀeveryꢀpinꢀfullyꢀunderꢀuserꢀprogramꢀcontrol,ꢀpull-highꢀselectionsꢀforꢀallꢀportsꢀandꢀ
wake-upꢀselectionsꢀonꢀcertainꢀpins,ꢀtheꢀuserꢀisꢀprovidedꢀwithꢀanꢀI/Oꢀstructureꢀtoꢀmeetꢀtheꢀneedsꢀofꢀaꢀ
wideꢀrangeꢀofꢀapplicationꢀpossibilities.
Theꢀdeviceꢀprovidesꢀbidirectionalꢀinput/outputꢀlinesꢀlabeledꢀwithꢀportꢀnamesꢀPA~PC.ꢀTheseꢀI/Oꢀ
portsꢀareꢀmappedꢀtoꢀtheꢀRAMꢀDataꢀMemoryꢀwithꢀspecificꢀaddressesꢀasꢀshownꢀinꢀtheꢀSpecialꢀPurposeꢀ
DataꢀMemoryꢀtable.ꢀAllꢀofꢀtheseꢀI/Oꢀportsꢀcanꢀbeꢀusedꢀforꢀinputꢀandꢀoutputꢀoperations.ꢀForꢀinputꢀ
operation,ꢀtheseꢀportsꢀareꢀnon-latching,ꢀwhichꢀmeansꢀtheꢀinputsꢀmustꢀbeꢀreadyꢀatꢀtheꢀT2ꢀrisingꢀedgeꢀ
ofꢀinstructionꢀ“MOVꢀA,ꢀ[m]”,ꢀwhereꢀmꢀdenotesꢀtheꢀportꢀaddress.ꢀForꢀoutputꢀoperation,ꢀallꢀtheꢀdataꢀisꢀ
latchedꢀandꢀremainsꢀunchangedꢀuntilꢀtheꢀoutputꢀlatchꢀisꢀrewritten.
Bit
Register
Name
7
6
5
4
3
2
1
0
PAWU
PAPU
PA
D7
D7
D7
D7
—
—
—
—
—
—
Dꢅ
Dꢅ
Dꢅ
Dꢅ
Dꢅ
Dꢅ
Dꢅ
Dꢅ
Dꢅ
Dꢅ
D5
D5
D5
D5
—
D4
D4
D4
D4
—
D3
D3
D3
D3
D3
D3
D3
—
Dꢄ
Dꢄ
Dꢄ
Dꢄ
Dꢄ
Dꢄ
Dꢄ
—
D1
D1
D1
D1
D1
D1
D1
D1
D1
D1
D0
D0
D0
D0
D0
D0
D0
D0
D0
D0
PAC
PBPU
PB
—
—
PBC
PCPU
PC
—
—
D5
D5
D5
D4
D4
D4
—
—
PCC
—
—
Pull-high Resistors
Manyꢀproductꢀapplicationsꢀrequireꢀpull-highꢀresistorsꢀforꢀtheirꢀswitchꢀinputsꢀusuallyꢀrequiringꢀtheꢀuseꢀ
ofꢀanꢀexternalꢀresistor.ꢀToꢀeliminateꢀtheꢀneedꢀforꢀtheseꢀexternalꢀresistors,ꢀwhenꢀconfiguredꢀasꢀanꢀinputꢀ
haveꢀtheꢀcapabilityꢀofꢀbeingꢀconnectedꢀtoꢀanꢀinternalꢀpull-highꢀresistor.ꢀTheseꢀpull-highꢀresistorsꢀareꢀ
selectedꢀusingꢀregistersꢀPAPU~PCPU,ꢀandꢀareꢀimplementedꢀusingꢀweakꢀPMOSꢀtransistors.
PAPU Register
Bit
7
D7
R/W
0
6
Dꢅ
R/W
0
5
D5
R/W
0
4
D4
R/W
0
3
D3
R/W
0
2
Dꢄ
R/W
0
1
D1
R/W
0
0
D0
R/W
0
Naꢁe
R/W
POR
Bitꢀ7~0ꢀ
PortꢀA bit7~ꢀbitꢀ0ꢀPull-HighꢀControlꢀ
ꢀ 0:ꢀDisableꢀ
ꢀ 1:ꢀEnable
Rev. 0.00
5ꢄ
�eꢀteꢁꢂeꢃ ꢄꢅꢆ ꢄ01ꢄ