English
Language : 

IC-LO_16 Datasheet, PDF (19/25 Pages) IC-Haus GmbH – TRIANGULATION SENSOR
iC-LO
TRIANGULATION SENSOR
SPI INTERFACE
preliminary
Rev B3, Page 19/25
General description
SPI name
NCS
SCLK
MOSI
MISO
pin name
NCS
SCK
MOSI
MISO
description
not chip select
clock
master out slave in
master in slave out
iC-Haus SPI data transmission
SPI modes 0 and 3 are supported, i.e. an idle polarity
of SCLK 0 or 1 and acceptance of data with a rising
edge of SCLK.
The idle level (NCS high) of the MISO line is tristate.
The slave passes MOSI to MISO on a falling edge at
NCS.
Table 29: SPI Connector Pin List
During SPI communication (NCS low) an ongoing mea-
surement sequence in iC-LO is halted (LED off, switch-
ing output off).
OPCODE summary
Data is sent bytewise with the MSB first. Each data
transmission begins with the master sending an opcode.
To be compatible to Microwire™, all opcodes start with
a 1.
The following describes the typical sequence of an SPI
data transmission, taking the command Read REGIS-
TER (cont.) as an example (see figure 8):
SPI OPCODES
Opcode Description
0xB0
not implemented
0xA6
not implemented
0xF5
not implemented
0x97
not implemented
0xD2
not implemented
0x8A
Read REGISTER (cont.)
0xCF
Write REGISTER (cont.)
0xAD
REGISTER status/data
0x9C
Read STATUS
0xD9
Write INSTRUCTION
Table 30: OPCODE Table
1. The master initializes a transmission with a falling
edge at NCS.
2. The slave passes the level on from MOSI to
MISO.
3. The master transmits the Read REGISTER
(cont.) opcode and address ADR via MOSI; the
slave immediately outputs OPCODE and ADR via
MISO.
4. The slave transmits the addressed data.
5. The master quits the command with a rising edge
at NCS.
6. The slave switches its MISO output to tristate.
NCS
SCLK
MOSI
MISO
OP7 OP6 OP5 OP4 OP3 OP2 OP1 OP0 ADR7 ADR6 ADR5 ADR4 ADR3 ADR2 ADR1 ADR0
OP7 OP6 OP5 OP4 OP3 OP2 OP1 OP0 ADR7 ADR6 ADR5 ADR4 ADR3 ADR2 ADR1 ADR0 DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Figure 8: SPI transmission, using opcode Read REGISTER (cont.) as an example
Description of the SPI-Opcodes
REGISTER status/data
The REGISTER status/data command can be used to
request the status of the last register communication
and/or the last data transmission. The STATUS byte
contains the information summarized in table 31.
STATUS
Bit
7
6..4
3
2
1
0
Note
Name
Description of the status
report
ERROR
Opcode not
implemented.
-
Reserved
DISMISS
Address refused
FAIL
Data request has failed
BUSY
Slave is busy with a
request
VALID
DATA is valid
Display logic: 1 = true, 0 = false
Table 31: Communication Status Byte