120
CHAPTER 5. PERIPHERAL HARDWARE FUNCTIONS
(b) Description of commands
(i) Command types
The following command types are used in these application examples.
READ command : Performs data transfer from slave to master.
WRITE command : Performs data transfer from master to slave.
END command : Notifies slave of completion of WRITE command.
STOP command : Notifies slave of suspension of WRITE command.
STATUS command : Reads slave-side status.
RESET command : Makes currently selected slave non-selected.
CHGMST command : Passes mastership to slave side.
(ii) Communication procedure
The procedure for communication between master and slave is as follows.
The master starts the communication by transmitting the address of the slave to be communicated
with and selecting the slave (chip selection).
When the slave receives the address, it communicates with the master by returning ACK. (The
slave changes from non-selected to selected status.)
Communication is performed between the slave selected by the processing in and the master
by the transfer of commands and data.
However, as command and data transfers are one-to-one master- slave transfers, other slaves
must be in the non-selected status.
Communication is ended by the slave changing to non-selected status. The slave changes to non-
selected status in the following cases:
When a RESET command is sent from the master, the selected slave changes to non-selected
status.
• When the master is changed by the CHGMST command, the device which is changed from
master to slave changes to non-selected status.
4
6
7