English
Language : 

UPSD3354DV-40U6 Datasheet, PDF (134/272 Pages) STMicroelectronics – fast 8032 MCU with programmable logic
I2C interface
UPSD33xx
Table 84.
I2C Bus
speed,
fSCL
S1SETUP examples for various I2C bus speeds and oscillator frequencies
Parameter
6 MHz
Oscillator frequency, fOSC
12 MHz
24 MHz
33 MHz
40 MHz
Recommended
S1SETUP Value
93h
A7h
CFh
EEh
FFh
Standard Number of Samples
Time Between Samples
20
166.6ns
40
83.3ns
80
41.6ns
111
30ns
128
25ns
Total Sampled Period
3332ns
3332ns
3332ns
3333ns
3200ns
Recommended
S1SETUP Value
82h
85h
8Bh
90h
93h
Fast Number of Samples
Time Between Samples
3
166.6ns
6
83.3ns
12
41.6ns
17
30ns
20
25ns
Total Sampled Period
500ns
500ns
500ns
510ns
500ns
Recommended
(1)
) S1SETUP Value
ct(s High Number of Samples
-
u Time Between Samples
-
rod Total Sampled Period
-
P 1. Not compatible with high Speed I2C.
80
1
83.3ns
83.3
82
3
41.6ns
125ns
83
4
30ns
120ns
84
5
25ns
125ns
Obsolete Product(s) - Obsolete 23.13
I2C operating sequences
The following pseudo-code explains hardware control for these I2C functions on the
UPSD33xx:
● Initialize the Interface
● Function as Master-Transmitter
● Function as Master-Receiver
● Function as Slave-Transmitter
● Function as Slave-Receiver
● Interrupt Service Routine
Full C code drivers for the UPSD33xx I2C interface, and other interfaces are available from
the web at www.st.com/mcu.
Initialization after a UPSD33xx reset
Ensure pins P3.6 and P3.7 are GPIO inputs
● SFR P3.7 = 1 and SFR P3.6 = 1
Configure pins P3.6 and P3.7 as I2C
● SFR P3SFS.6 = 1 and P3SFS.7 = 1
Set I2C clock prescaler to determine fSCL
● SFR S1CON.CR[2:0] = desired SCL freq.
134/272
Doc ID 9685 Rev 7