
Rev. 1.00
64
October 26, 2018
Rev. 1.00
65
October 26, 2018
BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
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.
Note that the wake-up function can be controlled by the wake-up control registers only when the pin
is selected as a general purpose input and the MCU enters the IDLE or SLEEP mode.
• PAWU Register
Bit
7
6
5
4
3
2
1
0
Name
PAWU7
PAWU6
PAWU5
PAWU4
PAWU3
PAWU2
PAWU1
PAWU0
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
Bit 7~0
PAWU7~PAWU0
: PA7~PA0 pin Wake-up function control
0: Disable
1: Enable
I/O Port Control Registers
Each I/O Port has its own control register which controls the input/output configuration. With this
control register, each I/O pin with or without pull-high resistors can be reconfigured dynamically
under software control. 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 set as a CMOS output. If the pin is currently set 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.
• PxC Register
Bit
7
6
5
4
3
2
1
0
Name
PxC7
PxC6
PxC5
PxC4
PxC3
PxC2
PxC1
PxC0
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
PxCn
: I/O Port x Pin type selection
0: Output
1: Input
The PxCn bit is used to control the pin type selection. Here the “x” is the Port name which
can be A, B or C. However, the actual available bits for each I/O Port may be different.
I/O Port Source Current Selection
The device supports different output source current driving capability for each I/O port. With the
selection register, SLEDCn, specific I/O port can support four levels of the source current driving
capability. These source current selection bits are available only when the corresponding pin is
configured as a CMOS output. Otherwise, these select bits have no effect. Users should refer to
the Input/Output Characteristics section to select the desired output source current for different
applications.