Difference between revisions of "SPI"
From Granite Devices Knowledge Wiki
[checked revision] | [checked revision] |
Line 1: | Line 1: | ||
SPI (Serial Peripheral Interface) is a serial communication link used in [[VSD-A]] and [[VSD-E and VSD-XE]] drives. SPI is used to set drive parameters and it also can be used for control with [[SimpleMotion]] library. | SPI (Serial Peripheral Interface) is a serial communication link used in [[VSD-A]] and [[VSD-E and VSD-XE]] drives. SPI is used to set drive parameters and it also can be used for control with [[SimpleMotion]] library. | ||
− | ==VSD SPI bus | + | ==VSD SPI bus key features== |
− | + | Implementation of VSD SPI bus: | |
*All commands are 32 bit packets: | *All commands are 32 bit packets: | ||
**8 bit command ID | **8 bit command ID | ||
− | **16 bit data | + | **16 bit command parameter |
− | **8 bit CRC | + | **8 bit CRC error checking |
+ | *By sending one command, drive responds simultaneously with 32 bit return data packet: | ||
+ | **8 bit status bits (usually not needed by application) | ||
+ | **16 bit return data | ||
+ | **8 bit CRC error checking | ||
*Command rate up to 2500 commands/s (80 kbit/s) | *Command rate up to 2500 commands/s (80 kbit/s) | ||
==Using VSD SPI== | ==Using VSD SPI== | ||
+ | ===With SimpleMotion library=== | ||
+ | SimpleMotion library communicates to [[VSD-E and VSD-XE]] drives via SPI bus. The phyiscal transfer link between PC and VSD drive is [http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_CABLES.pdf FTDI TTL232R USB serial adapter]. | ||
+ | ===From low level hardware=== | ||
SPI bus on VSD drives require 3 data wires and ground: | SPI bus on VSD drives require 3 data wires and ground: | ||
* SCLK - clock signal | * SCLK - clock signal |
Revision as of 19:39, 18 April 2012
SPI (Serial Peripheral Interface) is a serial communication link used in VSD-A and VSD-E and VSD-XE drives. SPI is used to set drive parameters and it also can be used for control with SimpleMotion library.
Contents
VSD SPI bus key features
Implementation of VSD SPI bus:
- All commands are 32 bit packets:
- 8 bit command ID
- 16 bit command parameter
- 8 bit CRC error checking
- By sending one command, drive responds simultaneously with 32 bit return data packet:
- 8 bit status bits (usually not needed by application)
- 16 bit return data
- 8 bit CRC error checking
- Command rate up to 2500 commands/s (80 kbit/s)
Using VSD SPI
With SimpleMotion library
SimpleMotion library communicates to VSD-E and VSD-XE drives via SPI bus. The phyiscal transfer link between PC and VSD drive is FTDI TTL232R USB serial adapter.
From low level hardware
SPI bus on VSD drives require 3 data wires and ground:
- SCLK - clock signal
- MISO - master in, slave out
- MOSI - master out, slave in
VSD drive is the slave device.
SPI signals are relatively easy to generate with any programmable device with digital I/O's such as microcontrollers. SimpleMotion source code can be ported on many platforms including MCU's.