epc120
10.SPI Interface
The SPI interface allows the microcontroller to communicate with the sensors over the 2-wire bus system via the interface device.
While data are sent to the interface chip by the microcontroller, the result of the last (or more generally: a previous) command is sent from the
interface chip to the microcontroller according to the SPI protocol. The timing diagram is shown in Figure 16).
CS
t
t
H
1/f
L
SCK
SCK
SI
t
1
t
t
Hold
SU
t
D
SO
Figure 16: SPI bus timing
Timing Specification SPI Interface
Symbol Parameter
Conditions/Comments
Values
Typ.
Units
Min.
Max.
fSCK
SCK Clock frequency
HIGH and LOW period of SCK
Set-up and hold time SI
Edge time CSB - SCK
Rise / fall time
10
MHz
ns
tH / tL
tSU / tHold
t1
50
15
50
ns
ns
trf / trfSCK
tD
SO, SCK
SO
20
20
ns
Data valid after SCK edge
ns
Command Overview
General Description
Communication is based on telegrams, which are sent and received over the 2-wire bus. Such telegrams are initiated by the respective
command to the SPI interface. The epc10x chips accept two types of commands:
1. Commands which communicate to the interface chips, also called “Direct Commands” ( Figure 17).
2. Commands which communicate to the chips at the 2-wire bus, also called “Broadcast Commands” ( Figure 18).
The first bit in the data stream from the microprocessor to the interface chip (SI pin) defines whether it is a command to the interface chip (a
“0”) or the the chips on the 2-wire bus (a ”1”).
CS
SCK
SI
C0
C1
C2
R0
R1
R2
R3
R4
D0
D1
Dn
Data
Register Address or Cmd Extension
Command
Figure 17: Communication to the interface device (Direct Command)
© 2011 ESPROS Photonics Corporation
Characteristics subject to change without notice
18
Datasheet epc12x - V2.1
www.espros.ch