BS85B12-3 HOLTEK [Holtek Semiconductor Inc], BS85B12-3 Datasheet - Page 57

no-image

BS85B12-3

Manufacturer Part Number
BS85B12-3
Description
Touch Key Flash Type 8-Bit MCU with LCD/LED Driver
Manufacturer
HOLTEK [Holtek Semiconductor Inc]
Datasheet
BS85B12-3/BS85C20-3
Touch Key Flash MCU with LCD/LED Driver
Rev. 1.00
Bit 7~5
Bit 4~0
Bit 7~0
Bit 7~4
Bit 3~0
Name
Name
Name
POR
POR
POR
R/W
R/W
R/W
Port A Wake-up
I/O Port Control Register
Bit
Bit
Bit
PAWU Register
BS85B12-3: PAC, PCC Registers
BS85C20-3: PAC, PBC, PCC, PDC Registers
BS85B12-3: PBC Registers
BS85C20-3: PEC Registers
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.
The I/O port has its own control register known as PAC~PEC, 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.
R/W
R/W
D7
D7
unimplemented, read as 0
PAWU: Port A bit 7~bit 0 wake-up control
I/O Port bit 7 ~ bit 0 input/output control
unimplemented, read as 0
PxC: Port bit 5~bit 0 input/output control
7
0
7
1
7
0: disable
1: enable
0: output
1: input
0: output
1: input
R/W
R/W
D6
D6
6
0
6
1
6
R/W
R/W
R/W
D5
D5
D5
5
0
5
1
5
0
R/W
R/W
R/W
D4
D4
D4
51
4
0
4
1
4
0
R/W
R/W
R/W
D3
D3
D3
3
0
3
1
3
1
R/W
R/W
R/W
D2
D2
D2
2
0
2
1
2
1
R/W
R/W
R/W
D1
D1
D1
1
0
1
1
1
1
February 1, 2011
R/W
R/W
R/W
D0
D0
D0
0
0
0
1
0
1

Related parts for BS85B12-3