ST72774/ST727754/ST72734
31/144
I/O PORTS (Cont’d)
4.1.4 Port B
The alternate functions are the I/O pins of the on-
chip DDC SCLD & SCDAD for PB0:1, the I/O pins
of the on-chip I2C SCLI & SCDAI for PB2:3, and 4
bits of port B bit can be used as the Analog source
to the Analog to Digital Converter.
Only one I/O line must be configured as an analog
input at any time. The user must avoid any
situation in which more than one I/O pin is selected
as an analog input simultaneously to avoid device
malfunction.
When the analog function is selected for an I/O pin,
the pull-up of the respective pin of Port B is
disconnected and the digital input is off.
All unused I/O lines should be tied to an
appropriate logic level (either VDD or VSS)
Since the ADC is on the same chip as the
microprocessor, the user should not switch heavily
loaded signals during conversion, if high precision
is required. Such switching will affect the supply
voltages used as analog references. the accuracy
of the conversion depends on the quality of the
power supplies (VDD and VSS). The user must take
special care to ensure that a well regulated
reference voltage is present on the VDD and VSS
pins (power supply variations must be less than
5V/ms). This implies, in particular, that a suitable
decoupling capacitor is used at the VDD pin.
Table 9. Port B Description
PORT B
I/O
Alternate Function
Input*
Output
Signal
Condition
PB0
Without pull-up
Open-drain
SCLD (input with CMOS schmitt trigger or
open drain output)
DDC enable
PB1
Without pull-up
Open-drain
SDAD (input with CMOS schmitt trigger or
open drain output)
DDC enable
PB2
Without pull-up
Open-drain
SCLI (input with CMOS schmitt trigger or
open drain output)
I2C enable
PB3
Without pull-up
Open-drain
SDAI (input with CMOS schmitt trigger or
open drain output)
I2C enable
PB4
With pull-up
Push-pull
Analog input (ADC) (without pull-up)
CH[2:0]=000 (ADCCSR)
PB5
With pull-up
Push-pull
Analog input (ADC) (without pull-up)
CH[2:0]=001 (ADCCSR)
PB6
With pull-up
Push-pull
Analog input (ADC) (without pull-up)
CH[2:0]=010 (ADCCSR)
10-bit output 1 (PWM)
OE0=1 (PWMOE)
PB7
With pull-up
Push-pull
Analog input (ADC) (without pull-up)
CH[2:0]=011 (ADCCSR)
10-bit output 2 (PWM)
OE1=1 (PWMOE)
*Reset state