Rev. 1.71 58 April 11, 2017 Rev. 1.71 59 April 11, 2017
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
PCPU Register – HT66F004
Bit 7 6 5 4 3 2 1 0
Name — — — — — D2 D1 D0
R/W — — — — — R/W R/W R/W
POR — — — — — 0 0 0
Bit7~3 Unimplemented,readas0
Bit2~0 I/OPortCbit2~bit0Pull-HighControl
0:Disable
1:Enable
Port A Wake-up
TheHALTinstructionforcesthemicrocontrollerintotheSLEEPorIDLEModewhichpreserves
power,afeaturethatisimportantforbatteryandotherlow-powerapplications.Variousmethods
existtowake-upthemicrocontroller,oneofwhichistochangethelogicconditionononeofthePort
Apinsfromhightolow.Thisfunctionisespeciallysuitableforapplicationsthatcanbewokenup
viaexternalswitches.EachpinonPortAcanbeselectedindividuallytohavethiswake-upfeature
usingthePAWUregister.
PAWU Register
Bit 7 6 5 4 3 2 1 0
Name D7 D6 D5 D4 D3 D2 D1 D0
R/W R/W R/W R/W R/W R/W R/W R/W R/W
POR 0 0 0 0 0 0 0 0
B
it7~0 I/OPortAbit7~bit0WakeUpControl
0:Disable
1:Enable
I/O Port Control Registers
EachI/OporthasitsowncontrolregisterknownasPAC~PCC,tocontroltheinput/output
configuration.Withthesecontrolregisters,eachCMOSoutputorinputcanbereconfigured
dynamicallyundersoftwarecontrol.EachpinoftheI/Oportsisdirectlymappedtoabitinits
associatedportcontrolregister.FortheI/Opintofunctionasaninput,thecorrespondingbitofthe
controlregistermustbewrittenasa“1”.Thiswillthenallowthelogicstateoftheinputpintobe
directlyreadbyinstructions.Whenthecorrespondingbitofthecontrolregisteriswrittenasa“0”,
theI/OpinwillbesetupasaCMOSoutput.Ifthepiniscurrentlysetupasanoutput,instructions
canstillbeusedtoreadtheoutputregister.However,itshouldbenotedthattheprogramwillinfact
onlyreadthestatusoftheoutputdatalatchandnottheactuallogicstatusoftheoutputpin.
PAC Register
Bit 7 6 5 4 3 2 1 0
Name D7 D6 D5 D4 D3 D2 D1 D0
R/W R/W R/W R/W R/W R/W R/W R/W R/W
POR 1 1 1 1 1 1 1 1
B
it7~0 I/OPortAbit7~bit0Input/OutputControl
0:Output
1:Input