English
Language : 

AMIS-30522 Datasheet, PDF (18/28 Pages) AMI SEMICONDUCTOR – Micro-stepping Motor Driver
AMIS-30522 Micro-stepping Motor Driver
Data Sheet
9.0 SPI Interface
The serial peripheral interface (SPI) is used to allow external microcontroller (MCU) to communicate with the device. The implemented
SPI block is flexible enough to interface directly with numerous microcontrollers from several manufacturers. AMIS-30522 acts always
as a slave and it can’t initiate any transmission. The operation of the device is configured and controlled by means of SPI registers,
which are observable for read and/or write from the master.
9.1 SPI Transfer Format and Pin Signals
During an SPI transfer, data is simultaneously transmitted (shifted out serially) and received (shifted in serially). A serial clock line (CLK)
synchronizes shifting and sampling of the information on the two serial data lines (DO and DI). DO signal is the output from the slave,
and DI signal is the output from the master. A slave select line (CSB) allows individual selection of a slave SPI device in a multiple-
slave system. The CSB line is active low. If AMIS-30522 is not selected, DO is in high impedance state and it does not interfere with
SPI bus activities. Since AMIS-30522 always clocks data out on the falling edge and samples data in on rising edge of clock, the MCU
SPI port must be configured to match this operation. SPI clock idles low between the transferred bytes.
The diagram below is both a master and a slave timing diagram since CLK, DO and DI pins are directly connected between the master
and the slave.
CLK (Idles Low)
DI (From Master)
DO (From Slave)
CSB
8
7
6
5
4
3
2
1
MSB 6
5
4
3
2
1 LSB
MSB
6
5
4
3
2
1
LSB
(1)
Note (1): MSB of data stored on the new address (see Transfer packet). The internal
data-out shift buffer of AMIS-30522 is updated with new content only at the last (every
eighth) falling edge of the CLK signal.
Figure 16: Timing Diagram of an SPI Transfer
9.2 Transfer Packet
Serial data transfer is assumed to follow MSB first rule. The transfer packet contains one or more 8-bit characters (bytes).
MSB
Command and Address
LSB MSB
LSB
Data byte
Cmd2 Cmd1 Cmd0 Addr4 Addr3 Addr2 Addr1 Addr0
Data7 - Data0
The first byte contains command and SPI register address and will be sent upfront of the packet to indicate to AMIS-30522 the chosen
register and the type of operation.
There are two possible commands for the master in normal operation mode of AMIS-30522:
• READ from SPI register: Cmd2 = 0
• WRITE to SPI register: Cmd2 = 1
AMI Semiconductor – June 2007, M-20684-001
18
www.amis.com