English
Language : 

AMIS-30421 Datasheet, PDF (27/41 Pages) ON Semiconductor – Micro-Stepping Stepper Motor Bridge Controller
AMIS−30421
‘0’. This simple mechanism protects against noise and
increases the consistency of the transmitted data. If a parity
check error occurs it is recommended to initiate an
additional READ command to obtain the status again.
The CSb−pin is active low and may remain low between
successive READ commands as illustrated in Figure 28.
There is one exception. In case an error condition occurs the
root cause of the problem can be determined by reading out
the Status Registers. However, if the error occurs at the
moment CSb is low, one first needs to pull CSb high to
update the Status Registers properly. Only then the Status
Registers can be read out to determine the error. For this
reason it is also recommended to keep CSb high when the
SPI bus is idle.
CS
CLK
ÏÏÏ0
DI
0
0
Addr[4] Addr[3]
DO
Old Data or
Not Valid
Old Data or
Not Valid
Old Data or
Not Valid
Old Data or
Not Valid
Old Data or
Not Valid
Data from previous command or not valid after PO.R
Addr[2]
Old Data or
Not Valid
Addr[1]
Old Data or
Not Valid
Addr[0]
Old Data or
Not Valid
Command or Command or Command or
Dummy
Dummy
Dummy
Next command or dummy data
D[7] from
Addr
D[6 ] from
Addr
D[5] from
Addr
Command or
Dummy
D[4 ] from
Addr
Command or
Dummy
D[3] from
Addr
Command or
Dummy
D[2 ] from
Addr
Command or
Dummy
D[1] from
Addr
Command or
Dummy
ÏÏÏÏ D[0] from
ÏÏ Addr
Figure 26. Single READ Operation Where Data from SPI Register is Read by the Master
WRITE Operation
If the Master wants to write data to a Control Register it
initiates the communication by sending a WRITE
command. This contains the address of the SPI register to
write to. The command is followed with a data byte. This
incoming data will be stored in the corresponding Control
Register after CSb goes from low to high. It is important that
the writing action to the Control Register is exactly 16 bits
long and that CSb goes high after these 16 bits. If more or
less bits are transmitted the complete transfer packet is
ignored.
A WRITE command executed for a read−only register
(e.g. Status Registers) will not affect the addressed register
and the device operation.
AMIS−30421 responds on every incoming byte by
shifting out via DO the data stored in the last received
address. Because after a power−on−reset the initial address
is unknown the data shifted out via DO is not valid.
The new data is written into the corresponding
CS
internal register at the rising edge of CS.
ÏÏÏÏÏÏ CLK
DI
DO
1
Old Data or
Not Valid
0
0
Addr[4] Addr[3]
Old Data or
Not Valid
Old Data or
Not Valid
Old Data or
Not Valid
Old Data or
Not Valid
Data from previous command or not valid after PO.R
Addr[2]
Old Data or
Not Valid
Addr[1]
Old Data or
Not Valid
Addr[0]
Old Data or
Not Valid
D[7] from
Addr
D[6 ] from
Addr
Old Data
From Addr
Old Data
From Addr
Old data from Addr
D[5] from
Addr
Old Data
From Addr
D[4 ] from
Addr
Old Data
From Addr
D[3] from
Addr
Old Data
From Addr
D[2 ] from
Addr
Old Data
From Addr
D[1] from
Addr
Old Data
From Addr
D[0 ] from
Addr
ÏÏ Old Data
ÏÏÏÏ From Addr
Figure 27. Single WRITE Operation Where Data from the Master is Written in SPI Register
Examples of READ and WRITE Operations
In the following examples successive READ and/or
WRITE operations are combined. In Figure 28 the Master
first reads the status from Register at Addr1 and at Addr2
followed by writing a control byte in Control Register at
Addr3. Note that during the WRITE command the old data
of the pointed register is returned at the moment the new data
is shifted in.
CS
New data is written into Register
with Addr3 at rising edge of CSb
DI
Read Data
from Addr1
Read Data
from Addr2
Write Data
to Addr3
New Data
to Addr 3
DO
Old Data or
Not Valid
Data from Addr1
Data from Addr2
Old Data
from Addr3
Data from previous command
or not valid after POR
Figure 28. 2 Successive READ Commands Followed by a WRITE Command
After a WRITE operation the Master could initiate a
READ command in order to verify the data correctly written
as illustrated in Figure 29. During reception of the READ
command the old data is returned for a second time. Only
after receiving the READ command the new data is
transmitted. This rule also applies when the master device
http://onsemi.com
27