English
Language : 

UPSD3422_06 Datasheet, PDF (75/293 Pages) STMicroelectronics – Turbo Plus Series Fast Turbo 8032 MCU with USB and Programmable Logic
uPSD34xx
I/O ports of mcu module
outputting a 0-to-1 transition. Only the low-side driver and the internal weak pull-ups are
used. Only Port 3 supports open-drain mode (Figure 18 on page 72). I2C requires the use of
an external pull-up resistor on each bus signal, typically 4.7KΩ to VCC.
If the alternate function is PCA output, then the related pins are in push-pull mode, meaning
the pins are actively driven and held to logic '1' by the high-side driver, or actively driven and
held to logic '0' by the low-side driver. Only Port 4 supports push-pull mode (Figure 19 on
page 72). Port 4 push-pull pins can source IOH current when driving logic '1,' and sink IOL
current when driving logic '0.' This current is significantly more than the capability of pins on
Port 1 or Port 3 (see Table 156 on page 265).
For example, to assign these port functions:
● Port 1: UART1, ADC[1:0], P1[7:4] are GPIO
● Port 3: UART0, I2C, P3[5:2] are GPIO
● Port 4: TCM0, SPI, P4[3:1] are GPIO
The following values need to be written to the SFRs:
P1SFS0 = 00001111b, or 0Fh
P1SFS1 = 00000011b , or 03h
P3SFS = 11000011b, or C3h
P4SFS0 = 11110001b, or F1h
P4SFS1 = 11110000b, or F0h
Table 30.
Bit 7
P3SFS7
P3SFS: Port 3 Special Function Select Register (SFR 91h, reset value
00h)
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P3SFS6 P3SFS5 P3SFS4 P3SFS3 P3SFS2 P3SFS1 P3SFS0
Port 3 Pin R/W
0
R,W
1
R,W
2
R,W
3
R,W
4
R,W
5
R,W
6
R,W
7
R,W
Default Port Function
P3SFS[i] - 0; Port 3 Pin, i = 0..7
GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
Alternate Port Function
P3SFS[i] - 1; Port 3 Pin, i = 0..7
UART0 Receive, RXD0
UART0 Transmit, TXD0
Ext Intr 0/Timer 0 Gate,
EXT0INT/TG0
Ext Intr 1/Timer 1 Gate,
EXT1INT/TG1
Counter 0 Input, C0
Counter 0 Input, C1
I2C Data, I2CSDA
I2C Clock, I2CCL
Table 31.
Bit 7
P1SF07
P1SFS0: Port 1 Special Function Select 0 Register (SFR 8Eh, reset value
00h)
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P1SF06 P1SF05 P1SF04 P1SF03 P1SF02 P1SF01 P1SF00
75/293