
Rev. 1.20
68
�an�a�� 2�� 201�
Rev. 1.20
69
�an�a�� 2�� 201�
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
Bit 1 ~ 0
PCPS1~PCPS0
: PC3~PC0 source current select
00 : source = Level 0 (min.)
01 : source = Level 1
10 : source = Level 2
11 : source = Level 3 (max
.
)
These bits are available when the corresponding pin is configured as a CMOS output.
SLEDC1 Register – BS82C16A-3/BS82D20A-3
Bit
7
6
5
4
3
2
1
0
Name
—
—
PDPS1
PDPS0
PCPS�
PCPS2
PCPS1
PCPS0
R/W
—
—
R/W
R/W
R/W
R/W
R/W
R/W
POR
—
—
0
1
0
1
0
1
Bit 7 ~ 6
Unimplemented, read as "0"
Bit 5 ~ 4
PDPS1~PDPS0
:
PD3~PD
0 source current select
00 : source = Level 0 (min.)
01 : source = Level 1
10 : source = Level 2
11 : source = Level 3 (max
.
)
These bits are available when the corresponding pin is configured as a CMOS output.
Bit 3 ~ 2
PCPS3~PCPS2
: PC7~PC4 source current select
00 : source = Level 0 (min.)
01 : source = Level 1
10 : source = Level 2
11 : source = Level 3 (max
.
)
These bits are available when the corresponding pin is configured as a CMOS output.
Bit 1 ~ 0
PCPS1~PCPS0
: PC3~PC0 source current select
00 : source = Level 0 (min.)
01 : source = Level 1
10 : source = Level 2
11 : source = Level 3 (max
.
)
These bits are available when the corresponding pin is configured as a CMOS output.
Programming Considerations
Within the user program, one of the first things to consider is port initialisation. After a reset, all of
the I/O data and port control registers will be set high. This means that all I/O pins will default to
an input state, the level of which depends on the other connected circuitry and whether pull-high
selections have been chosen. If the port control registers, PAC~P
D
C, are then programmed to setup
some pins as outputs, these output pins will have an initial high output value unless the associated
port data registers, PA~P
D
, are first programmed. Selecting which pins are inputs and which are
outputs can be achieved byte-wide by loading the correct values into the appropriate port control
register or by programming individual bits in the port control register using the "SET [m].i" and
"CLR [m].i" instructions. Note that when using these bit control instructions, a read-modify-write
operation takes place. The microcontroller must first read in the data on the entire port, modify it to
the required new bit values and then rewrite this data back to the output ports.
Port A has the additional capability of providing wake-up functions. When the device is in the
SLEEP or IDLE Mode, various methods are available to wake the device up. One of these is a high
to low transition of any of the Port A pins. Single or multiple pins on Port A can be setup to have this
function.
Содержание BS82B12A-3
Страница 33: ...Rev 1 20 33 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...
Страница 34: ...Rev 1 20 34 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...
Страница 35: ...Rev 1 20 35 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...