English
Language : 

UPSD3422_06 Datasheet, PDF (127/293 Pages) STMicroelectronics – Turbo Plus Series Fast Turbo 8032 MCU with USB and Programmable Logic
uPSD34xx
I2C interface
Table 62.
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
Number of Samples
Standard
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
Number of Samples
Fast
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
S1SETUP Value
(Note 1)
80
82
83
84
Number of Samples
-
High
Time Between
Samples
-
1
83.3ns
3
41.6ns
4
30ns
5
25ns
Total Sampled Period
-
83.3
125ns
120ns
125ns
Note: 1 Not compatible with High Speed I2C.
23.13
I2C operating sequences
The following pseudo-code explains hardware control for these I2C functions on the
uPSD34xx:
● 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 uPSD34xx I2C interface, and other interfaces are available from
the web at www.st.com\psm.
Initialization after a uPSD34xx 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
127/293