16
CEO: Dr. Bernt Götz • Phone +493641/66880 • Fax +493641/668866 • www.piezosystem.com
8.4.4 SPI communication
Real-time communication can take place via the SPI interface. The device works as an SPI slave, i.e.
the device receives setpoints from an external SPI master. The return value retrieved over the MISO
channel can be set to different quantities (e.g. position values) via the USB or Ethernet interfaces. The
SPI connection is exclusively to send setpoints to the device. The device has to be configured via the
USB or Ethernet interfaces.
The interface requires the following configuration:
•
3.3 V logic voltage
•
SPI clock: max. 6 MHz
•
SPI mode: 3 (CPOL = 1, CPHA = 1)
•
SPI CS: low active
•
Word length: 16 bit, MSB First
Value range of the SPI-setpoint:
•
in closed loop mode [0x0000 … 0xFFFE] corresponds to 0 … 100% of the closed loop travel of
the connected actuator
•
in open loop mode [0x0000 … 0xFFFE] corresponds to 0 … 100% of the admissible piezo
voltage of the connected actuator
•
The value [0xFFFF] is used for error detection and is not interpreted as a setpoint
Value range of the return value:
•
The value selected by
spisrc
command is scaled to [0x000
0 … 0xFFFF]
To synchronize the
NV200D/NET
PID controller loop execution to the SPI master the
spitrg
option can
be used. In mode
spitrg,0
the internal 20 kHz clock is used to trigger the digital control loop interrupt.
In mode
spitrg,1
the digital control loop interrupt is executed only when a new SPI setpoint is received.
This allows precise synchronization of several NV200D/NET controllers. However, it is very important
to make sure that SPI commands are sent with a 20 kHz update rate in order to get the right timing for
the digital filters, since they are parameterized with respect to a constant sampling rate of 20 kHz.