English
Language : 

IC-LNB_16 Datasheet, PDF (21/37 Pages) IC-Haus GmbH – 18-BIT OPTO ENCODER
iC-LNB 18-BIT OPTO ENCODER preliminary
WITH SPI AND SER/PAR INTERFACES
SPI INTERFACE
Rev B2, Page 21/37
CS
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 5: SPI transmission, taking the read OPCODE REGISTER as an example (continuous)
General protocol description
iC-LNB’s SPI interface is implemented as an SPI slave
and supports SPI modes 0 and 3, meaning the idle time
at SCK can be 0 or 1. Data is always accepted on a
rising edge at SCK. The idle state of the MISO line is
1; on a rising edge at CS the MOSI signal is switched
through to the MISO signal. Data is sent byte by byte
with the MSB (most significant bit) first.
Each data transmission starts when a 1-byte OPCODE
is sent by the SPI master (Table 10). This OPCODE
selects whether the iC-LNB configuration data (REGIS-
TER) or position data (SDAD) should be accessed, for
instance.
OPCODE description
ACTIVATE
iC-LNB’s register and sensor data channels can be
switched on and off using the ACTIVATE command.
The command causes all slaves to zero their RACTIVE
and PACTIVE registers and to loop this register data
into the data stream between the MOSI and MISO. The
register and sensor or actuator data channels can be
switched on and off using the following data bytes.
After a power-on iC-LNB’s sensor data channel is dis-
abled (PACTIVE = 0) and register communication en-
abled (RACTIVE = 1).
N.B.: For a parallel SPI bus configuration, an external
tri-state buffer must used because iC-LNB drives a ’1’
at the MISO signal during the idle state.
OPCODE
Code
0xB0
0xA6
0xF5
0x8A
0xCF
0xAD
Command
ACTIVATE
Sensor data (SDAD) transmission
Sensor data (SDAD) status
REGISTER read (continuous)
REGISTER write (continuous)
REGISTER status/data
CS
SCLK
MOSI
MISO
OP
RAPA 0-3 RAPA 4-7
...
OP
8 cycles
Figure 6: Setting ACTIVATE: RACTIVE/PACTIVE
(several slaves)
Table 10: SPI Instructions / OPCODES
SPI data transmission takes place as follows:
(Figure 5):
1. The master initializes a transmission on a rising
edge at CS.
2. iC-LNB transfers the level from MOSI to MISO.
3. The master transmits the OPCODE and address
ADR through MOSI; iC-LNB immediately outputs
OPCODE and ADR through MISO.
4. iC-LNB transmits the data requested according to
the address.
5. The master ends the command with a falling edge
at CS.
6. iC-LNB switches its MISO output to 1.
Bytes FAIL, VALID, BUSY, and DISMISS in the STATUS
byte are reset by the ACTIVATE command (Table 14).
RACTIVE
Code
0
1
Description
Register communication deactivated
Register communication activated
Table 11: Register com. activation
If RACTIVE is not set, on commands Read REGISTER
(cont.), Write to REGISTER (cont.), and REGISTER
status/data the ERROR bit is set in the SPI interface
STATUS byte (Table 14), indicating that the command
has not been carried out. The slave immediately out-
puts the data at MISO which has been sent by the
master through MOSI.