BS83A04A-3/BS83A04A-4
8-bit Touch Key Flash MCU
Port A Wake-up
TheꢀHALTꢀinstructionꢀforcesꢀtheꢀmicrocontrollerꢀintoꢀtheꢀSLEEPꢀorꢀIDLEꢀModeꢀwhichꢀpreservesꢀ
power,ꢀaꢀfeatureꢀthatꢀisꢀimportantꢀforꢀbatteryꢀandꢀotherꢀlow-powerꢀapplications.ꢀVariousꢀmethodsꢀ
existꢀtoꢀwake-upꢀtheꢀmicrocontroller,ꢀoneꢀofꢀwhichꢀisꢀtoꢀchangeꢀtheꢀlogicꢀconditionꢀonꢀoneꢀofꢀtheꢀPortꢀ
Aꢀpinsꢀfromꢀhighꢀtoꢀlow.ꢀThisꢀfunctionꢀisꢀespeciallyꢀsuitableꢀforꢀapplicationsꢀthatꢀcanꢀbeꢀwokenꢀupꢀ
viaꢀexternalꢀswitches.ꢀEachꢀpinꢀonꢀPortꢀAꢀcanꢀbeꢀselectedꢀindividuallyꢀtoꢀhaveꢀthisꢀwake-upꢀfeatureꢀ
usingꢀtheꢀPAWUꢀregister.
PAWU Register
Bit
7
D7
R/W
0
6
D6
R/W
0
5
D5
R/W
0
4
D4
R/W
0
3
Dꢇ
R/W
0
2
Dꢄ
R/W
0
1
D1
R/W
0
0
D0
R/W
0
Name
R/W
POR
Bitꢀ7~0ꢀ
PAWU:ꢀPAꢀwake-upꢀfunctionꢀcontrol
ꢀ 0:ꢀdisable
ꢀ 1:ꢀenable
I/O Port Control Registers
TheꢀI/OꢀportꢀhasꢀitsꢀownꢀcontrolꢀregisterꢀknownꢀasꢀPAC,ꢀ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ꢀportꢀ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
D6
R/W
1
5
D5
R/W
1
4
D4
R/W
1
3
Dꢇ
R/W
1
2
Dꢄ
R/W
1
1
D1
R/W
1
0
D0
R/W
1
Name
R/W
POR
Bitꢀ7~0ꢀ
PAC:ꢀI/OꢀPortꢀbitꢀ7ꢀ~ꢀbitꢀ0ꢀInput/OutputꢀControl
ꢀ 0:ꢀoutput
ꢀ 1:ꢀinput
Rev. 1.00
ꢇꢅ
�eꢀꢁꢂaꢁꢃ ꢄꢅꢆ ꢄ01ꢇ