English
Language : 

BS86B12A-3 Datasheet, PDF (69/195 Pages) Holtek Semiconductor Inc – Touch A/D Flash MCU with LED/LCD Driver
BS86B12A-3/BS86C16A-3/BS86D20A-3
Touch A/D Flash MCU with LED/LCD Driver
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.
I/O Port Control Registers
Each I/O port has its own control register known as PAC~PDC, 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.
Pin-remapping Function
There is an IFS register which is used to select the PTP2I pin function for the BS86B12A-3 device.
IFS Register
Bit
7
6
5
4
3
2
1
0
Name
—
—
—
—
—
—
—
PTP2IS
R/W
—
—
—
—
—
—
—
R/W
POR
—
—
—
—
—
—
—
0
Bit 7 ~ 1
Bit 0
Unimplemented, read as “0”
PTP2IS: PTP2I pin remapping control
0: PTP2I on PB7 (default)
1: PTP2I on PB4
Rev. 1.40
69
December 05, 2016