SPI Interface Specification
SPI Interface Specification
OBJECTIVE
This document specifies the Serial Peripheral Interface (SPI) that is used in the 1-axis SCA61T and the 2-axis SCA100T inclinometers.
Figure 1. Typical SPI connection The SPI interface in VTI products is designed to support almost any micro controller that uses software implemented SPI. However it is not designed to support any particular hardware implemented SPI found in many commercial micro controllers. The SPI interface is used for testing and calibration purposes, and it can also be used in the final application. Some of the test and calibration commands are disabled in normal use, and are not documented here. The data transfer uses the following 4-wire interface: MOSI MISO SCK CSB master out slave in master in slave out serial clock chip select (low active) P ASIC ASIC P P ASIC P ASIC
3 May 2004
VTI Technologies reserves all rights to modify this document prior notice.
Each transmission starts with a falling edge of CSB and ends with the rising edge. During the transmission, commands and data are controlled by SCK and CSB according to the following rules: commands and data are shifted; MSB first, LSB last each output data/status bits are shifted out on the falling edge of SCK (MISO line) each bit is sampled on the rising edge of SCK (MOSI line) after the device is selected with the falling edge of CSB, an 8-bit command is received. The command defines the operations to be performed the rising edge of CSB ends all data transfer and resets internal counter and command register if an invalid command is received, no data is shifted into the chip and the MISO remains in high impedance state until the falling edge of CSB. This reinitializes the serial communication. In order to perform other commands than those listed in Table 1, the lock register content must be set correctly. If such a command is fed without setting the correct lock register content, no data will be shifted into the chip and the MISO remains in high impedance state until the falling edge of CSB. data transfer to MOSI continues immediately after receiving the command in all cases where data is to be written to ASICs internal registers data transfer out from MISO starts with the falling edge of SCK immediately after the last bit of the SPI command is sampled in on the rising edge of SCK maximum data transfer speed exceeds 1 MHz clock rate
SPI command can be either an individual command or a combination of command and data. In the case of combined command and data, the input data follows uninterruptedly the SPI command and the output data is shifted out parallel with the input data.
C SB
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
SC K
C O M M AN D D A T A IN 7 6 5 4 3 2 1 0
M OSI
M ISO
H IG H IM PED AN C E 7 6 5
D A TA O U T 4 3 2 1 0
Figure 2. Command and data transmission over the SPI After power up, the circuit starts to operate in Measure mode. This is the normal operation mode that is used in the applications.
VTI Technologies Oy Myllynkivenkuja 6 P.O.Box 27 FIN-01621 Vantaa Finland Tel. +358 9 8791 81 Fax. +358 9 8791 8791 sales@vti.fi
VTI Technologies Oy Frankfurt Branch Rennbahnstr. 72-74 D-60528 Frankfurt am Main Germany Tel. +49 69 6786 880 Fax +49 69 6786 8829 sales.de@vti.fi
VTI Technologies, Inc. One Park Lane Blvd. Suite 804 - East Tower Dearborn, MI 48126 USA Tel. (313) 425 0850 Fax (313) 425 0860 sales@vtitechnologies.com
@ 500 kHz
Note1. Minimum SPI frequency depends on the master microcontroller clock frequency
SPI COMMANDS
The SPI interface uses an 8-bit instruction (or command) register. The list of commands is given in Table 2.
Command MEAS RWTR STX STY RDAX RDAY Command format 00000000 00001000 00001110 00001111 00010000 00010001 Description: Measure mode (normal operation mode after power on) Read and write temperature data register Activate Self test for X-channel Activate Self test for Y-channel Read X-channel acceleration through SPI Read Y-channel acceleration through SPI
Table 2.
SPI commands. The commands in Italic are in use in the 2-axis SCA100T only.
Measure mode (MEAS) is standard operation mode after power-up. During normal operation, MEAS command is the exit command from Self test. Read temperature data register (RWTR) reads temperature data register during normal operation without effecting the operation. Temperature data register is loaded in every 150 s. The load operation is disabled whenever the CSB signal is low, hence CSB must stay high at least 150 s prior the RWTR command in order to guarantee correct data. The data transfer is presented in Figure 3, and the data is transferred MSB first. In normal operation, it does not matter what data is written into temperature data register during the RWTR command and hence writing all zeros is recommended. Self test for X-channel (STX) activates the self test function for the X-channel (Channel 1). Internal charge pump is activated and a high voltage is applied to the X-channel acceleration sensor element electrode. This causes electrostatic force that deflects the beam of the sensing element and simulates the acceleration to the positive direction. X-channel self-test is de-activated by giving the MEAS command. Self test for Y-channel (STY) activates the self test function for the Y-channel (Channel 2). Internal charge pump is activated and a high voltage is applied to the Y-channel acceleration sensor element electrode. This causes electrostatic force that deflects the beam of the sensing element and simulates the acceleration to the positive direction. Y-channel self-test is de-activated by giving the MEAS command. Note! This command is valid for the 2-axis SCA100T only. Read X-channel acceleration (RDAX) accesses the AD converted X-channel (Channel 1) acceleration signal stored in acceleration data register X. During normal operation, acceleration data register X is loaded in every 150 s. The load operation is disabled whenever the CSB signal is low, hence CSB must stay high at least 150 s prior the RDAX command in order to guarantee correct data. Data output is an 11-bit digital word that is fed out MSB first and LSB last. (see Figures 3 and 4).
VTI Technologies Oy Myllynkivenkuja 6 P.O.Box 27 FIN-01621 Vantaa Finland Tel. +358 9 8791 81 Fax. +358 9 8791 8791 sales@vti.fi
VTI Technologies Oy Frankfurt Branch Rennbahnstr. 72-74 D-60528 Frankfurt am Main Germany Tel. +49 69 6786 880 Fax +49 69 6786 8829 sales.de@vti.fi
VTI Technologies, Inc. One Park Lane Blvd. Suite 804 - East Tower Dearborn, MI 48126 USA Tel. (313) 425 0850 Fax (313) 425 0860 sales@vtitechnologies.com
Read Y-channel acceleration (RDAY) accesses the AD converted Y-channel (Channel 2) acceleration signal stored in acceleration data register Y. During normal operation acceleration data register Y is loaded in every 150 s. The load operation is disabled whenever the CSB signal is low, hence CSB must stay high at least 150 s prior the RDAY command in order to guarantee correct data. Data output is an 11-bit digital word that is fed out MSB first and LSB last. Note! This command is valid for the 2-axis SCA100T only.
MS
MISO in high-impedance during 8-bit command.
LS
TCH
T CL
T LS2
T LH
T HOL
M SB in DATA in
T SET
LSB in
T VAL2
DATA out LSB out
T LZ
VTI Technologies Oy Myllynkivenkuja 6 P.O.Box 27 FIN-01621 Vantaa Finland Tel. +358 9 8791 81 Fax. +358 9 8791 8791 sales@vti.fi
VTI Technologies Oy Frankfurt Branch Rennbahnstr. 72-74 D-60528 Frankfurt am Main Germany Tel. +49 69 6786 880 Fax +49 69 6786 8829 sales.de@vti.fi
VTI Technologies, Inc. One Park Lane Blvd. Suite 804 - East Tower Dearborn, MI 48126 USA Tel. (313) 425 0850 Fax (313) 425 0860 sales@vtitechnologies.com
VIN = 5 V
Supply voltage is 5 V unless otherwise noted. Current flowing into the circuit have positive values.
Conditions
Typ
Max
Unit ns ns s s
TCL TCH
TSET THOL
30 30
ns ns
Load capacitance at MISO < 15 pF Load capacitance at MISO < 15 pF Load capacitance at MISO < 15 pF
TVAL1 TLZ
10 10
100 100
ns ns
TVAL2
100
ns
TLH
15
VTI Technologies Oy Myllynkivenkuja 6 P.O.Box 27 FIN-01621 Vantaa Finland Tel. +358 9 8791 81 Fax. +358 9 8791 8791 sales@vti.fi
VTI Technologies Oy Frankfurt Branch Rennbahnstr. 72-74 D-60528 Frankfurt am Main Germany Tel. +49 69 6786 880 Fax +49 69 6786 8829 sales.de@vti.fi
VTI Technologies, Inc. One Park Lane Blvd. Suite 804 - East Tower Dearborn, MI 48126 USA Tel. (313) 425 0850 Fax (313) 425 0860 sales@vtitechnologies.com