epc120
T
DEL
Out n
Out n+1
SCAN n+4
SCAN n+4
Out n+2
SPI in
T
SCAN
SCAN n
SCAN n+1
SCAN n+2
SCAN n+2
SCAN n+3
SCAN n+3
SCAN n+5
SPI out
SCAN n
SCAN n+1
Out n
Out n+1
Out n+2
2-Wire Bus
Settling
Receive Window
Settling
Output, Standby
Receive Window
Settling
PD n
T
SET
Output, Standby
Receive Window
PD n+1
Output, Standby
PD n+2
LED n
Settling
Standby
T
PDELAY
T
PULSE
Settling
Standby
LED n+1
LED n+2
Settling
Standby
Figure 15: Timing of the scan process
where
n
= element number
TSCAN = interval between two scan commands which is given by the micro processor
The minimum delay time between the first SCAN command and the earliest possible access of the result can be calculated as a function of
the parameter TSET and the scan period TSCAN
:
T DEL=TSET 3⋅T SCAN
The sensor device counts the number of SCAN commands on the bus to present its result at the right time. If the number of a SCAN
command is n, the result will arrive with the SCAN command n+TSET+3.
The timing of the emitter commands have to be adjusted in order to emit the light pulse near the center of the reception window of the corres-
ponding receiver. E.g. if the reception window length is set to 30 μs, the light pulse shall be generated 15μs after the opening of the receive
window. The length of the reception window is defined by the time elapsed between the second and the third SCAN command. The parameter
TSTMP defines the time window to measure the arrival time of the received light pulse. This result is returned in the result TIMESTAMP. The
timing position of the following light pulses can be optimized to the center of the receiving window. The resolution of TIMESTAMP is 4 bits.
Thus, the value is 0000 if the pulse is received at the beginning of the window, and 1111 if it arrived at the end. A light pulse received approx.
in the middle of the receive window would be represented as 0011, 0100 or 0101.
The minimal scan period, which is the time between two consecutive SCAN commands, is given by the communication on the 2-wire bus: 62
bits for the command and the results have to be transmitted in this time. The minimal scan period is then
T SCANmin=31∗T CLK∗k
k is given by the parameter DRATE and varies between 1 and 8 (refer to Table 1, Table 3 and Table 7). TCLK is 1μs. Thus, the minimal scan
period is 31μs.
Special Cases
•
If the same device is addressed again at the end of its reception window, it continues waiting for pulses. This procedure allows to
synchronize the receiver with the transmitter on an optical basis, if there is no electrical synchronization.
•
•
If a device detects a command during a scan operation which is not the command SCAN, it is put into standby mode.
A SCAN command with address 0 can be used to fetch the results without starting a new scan command.
© 2011 ESPROS Photonics Corporation
Characteristics subject to change without notice
17
Datasheet epc12x - V2.1
www.espros.ch