Rev. 1.60
94
August 20, 2019
Rev. 1.60
95
August 20, 2019
BS66F340/BS66F350/BS66F360/BS66F370
Touch A/D Flash MCU with LED Driver
BS66F340/BS66F350/BS66F360/BS66F370
Touch A/D Flash MCU with LED Driver
Bit 3~2
PBPS1~PBPS0
: PB7~PB4 source current selection
00: source current = Level 0 (min.)
01: source current = Level 1
10: source current = Level 2
11: source current = Level 3 (max.)
Bit 1~0
PAPS1~PAPS0
: PA7~PA5 and PA1 source current selection
00: source current = Level 0 (min.)
01: source current = Level 1
10: source current = Level 2
11: source current = Level 3 (max.)
• SLEDC1 Register – BS66F370
Bit
7
6
5
4
3
2
1
0
Name
—
—
—
—
PHPS1
PHPS0
PGPS1
PGPS0
R/W
—
—
—
—
R/W
R/W
R/W
R/W
POR
—
—
—
—
0
0
0
0
Bit 7~4
Unimplemented, read as "0"
Bit 3~2
PHPS1~PHPS0
: PH3~PH0 source current selection
00: source current = Level 0 (min.)
01: source current = Level 1
10: source current = Level 2
11: source current = Level 3 (max.)
Bit 1~0
PGPS1~PGPS0
: PG3~PG0 source current selection
00: source current = Level 0 (min.)
01: source current = Level 1
10: source current = Level 2
11: source current = Level 3 (max.)
Pin-shared Functions
The flexibility of the microcontroller range is greatly enhanced by the use of pins that have more
than one function. Limited numbers of pins can force serious design constraints on designers but by
supplying pins with multi-functions, many of these difficulties can be overcome. For these pins, the
desired function of the multi-function I/O pins is selected by a series of registers via the application
program control.
Pin-shared Function Selection Registers
The limited number of supplied pins in a package can impose restrictions on the amount of functions
a certain device can contain. However by allowing the same pins to share several different functions
and providing a means of function selection, a wide range of different functions can be incorporated
into even relatively small package sizes. Each device includes Port "x" output function Selection
register "n", labeled as PxSn, and Input Function Selection register, labeled as IFS, which can select
the desired functions of the multi-function pin-shared pins.
When the pin-shared input function is selected to be used, the corresponding input and output
functions selection should be properly managed. For example, if the I
2
C SDA line is used, the
corresponding output pin-shared function should be configured as the SDI/SDA function by
configuring the PxSn register and the SDA signal intput should be properly selected using the
IFS register. However, if the external interrupt function is selected to be used, the relevant output
pin-shared function should be selected as an I/O function and the interrupt input signal should be
selected.