HT45F12
8-Bit Flash MCU with Op Amps & Comparators
I/O Port Control Registers
EachꢀI/OꢀportꢀhasꢀitsꢀownꢀcontrolꢀregisterꢀknownꢀasꢀPAC~PCC,ꢀtoꢀcontrolꢀtheꢀinput/outputꢀ
configuration.ꢀWithꢀthisꢀcontrolꢀregister,ꢀeachꢀCMOSꢀoutputꢀorꢀinputꢀcanꢀbeꢀreconfiguredꢀ
dynamicallyꢀunderꢀsoftwareꢀcontrol.ꢀEachꢀpinꢀofꢀtheꢀI/Oꢀportsꢀisꢀdirectlyꢀmappedꢀtoꢀaꢀbitꢀinꢀitsꢀ
associatedꢀportꢀcontrolꢀregister.ꢀForꢀtheꢀI/Oꢀpinꢀtoꢀfunctionꢀasꢀanꢀinput,ꢀtheꢀcorrespondingꢀbitꢀofꢀtheꢀ
controlꢀregisterꢀmustꢀbeꢀwrittenꢀasꢀaꢀ“1”.ꢀThisꢀwillꢀthenꢀallowꢀtheꢀlogicꢀstateꢀofꢀtheꢀinputꢀpinꢀtoꢀbeꢀ
directlyꢀreadꢀbyꢀinstructions.ꢀWhenꢀtheꢀcorrespondingꢀbitꢀofꢀtheꢀcontrolꢀregisterꢀisꢀwrittenꢀasꢀaꢀ“0”,ꢀ
theꢀI/OꢀpinꢀwillꢀbeꢀsetupꢀasꢀaꢀCMOSꢀoutput.ꢀIfꢀtheꢀpinꢀisꢀcurrentlyꢀsetupꢀasꢀanꢀoutput,ꢀinstructionsꢀ
canꢀstillꢀbeꢀusedꢀtoꢀreadꢀtheꢀoutputꢀregister.
However,ꢀitꢀshouldꢀbeꢀnotedꢀthatꢀtheꢀprogramꢀwillꢀinꢀfactꢀonlyꢀreadꢀtheꢀstatusꢀofꢀtheꢀoutputꢀdataꢀlatchꢀ
andꢀnotꢀtheꢀactualꢀlogicꢀstatusꢀofꢀtheꢀoutputꢀpin.
PAC Register
Bit
7
D7
R/W
1
6
Dꢅ
R/W
1
5
D5
R/W
1
4
D4
R/W
1
3
D3
R/W
1
2
Dꢄ
R/W
1
1
D1
R/W
1
0
D0
R/W
1
Naꢁe
R/W
POR
Bitꢀ7~0ꢀ
PAC:ꢀPortꢀAꢀbitꢀ7ꢀ~ꢀbitꢀ0ꢀInput/OutputꢀControlꢀ
ꢀ 0:ꢀOutputꢀ
ꢀ 1:ꢀInput
PBC Register
Bit
Naꢁe
R/W
7
6
Dꢅ
R/W
1
5
4
3
D3
R/W
1
2
Dꢄ
R/W
1
1
D1
R/W
1
0
D0
R/W
1
—
—
—
—
—
—
—
—
—
POR
Bitꢀ7ꢀ
Bitꢀ6ꢀ
Unimplemented,ꢀreadꢀasꢀ"0"
PBC:ꢀPortꢀBꢀbitꢀ6ꢀInput/OutputꢀControlꢀ
ꢀ 0:ꢀOutputꢀ
ꢀ 1:ꢀInput
Bitꢀ5~4ꢀ
Bitꢀ3~0ꢀ
Unimplemented,ꢀreadꢀasꢀ"0"
PBC:ꢀPortꢀBꢀbitꢀ3~0ꢀInput/OutputꢀControlꢀ
ꢀ 0:ꢀOutputꢀ
ꢀ 1:ꢀInput
PCC Register
Bit
Naꢁe
R/W
7
6
Dꢅ
R/W
1
5
D5
R/W
1
4
D4
R/W
1
3
2
1
D1
R/W
1
0
D0
R/W
1
—
—
—
—
—
—
—
—
—
POR
Bitꢀ7ꢀ
Unimplemented,ꢀreadꢀasꢀ"0"
Bitꢀ6~4ꢀ
PCC:ꢀPortꢀCꢀbitꢀ6~4ꢀInput/OutputꢀControlꢀ
ꢀ 0:ꢀOutputꢀ
ꢀ 1:ꢀInput
Bitꢀ3~2ꢀ
Bitꢀ1~0ꢀ
Unimplemented,ꢀreadꢀasꢀ"0"
PCC:ꢀPortꢀCꢀbitꢀ1~0ꢀInput/OutputꢀControlꢀ
ꢀ 0:ꢀOutputꢀ
ꢀ 1:ꢀInput
Rev. 0.00
54
�eꢀteꢁꢂeꢃ ꢄꢅꢆ ꢄ01ꢄ