Token passing, Handshaking, Transferring data – Echelon I/O Model Reference for Smart Transceivers and Neuron Chips User Manual
Page 76
66
Parallel I/O Models
Token Passing
Virtual token passing is implemented to eliminate the possibility of data bus
contention. The token is owned by the master after synchronization and is
passed between the master and slave devices. After each data transfer is
completed, the token owner writes an end of message (EOM) (0x00) to indicate
that the transfer is complete. The EOM is never read. Instead, “processing the
EOM” indicates passing of the token.
Token passing can be achieved by executing either a data packet or a NULL
transfer. Only the owner of the token can write to the bus. Therefore, when the
master performs two writes of data (1 – 255 bytes each), a dummy read cycle
(NULL character = 0x00) must be inserted between them in order to pass the
token. Token passing is executed automatically in a Smart Transceiver-to-Smart
Transceiver interface. See
for master/slave flow transactions.
Handshaking
Handshaking allows the master to monitor the slave between every byte transfer,
ensuring that both processors are ready for the byte to be transferred. If the
master owns the token, the master waits for the HS from the slave before writing
data to the bus. If the slave owns the token, the master monitors the low
transition of the HS before reading the bus.
In master or slave A mode, the Smart Transceiver HS line is pin IO10. In slave
B mode, the Smart Transceiver HS bit is monitored on IO0 which corresponds to
the least significant data bit of the status register.
Transferring Data
The data transfer operation between the master and the slave is accomplished
through the use of a virtual write token-passing protocol. The write token is
passed alternatively between the master and the slave on the bus in an infinite
ping-pong fashion. The owner of the token has the option of writing a series of
data bytes, or alternatively, passing the write token without any data. Figure 24
on page 67 illustrates the sequence of operations for this token passing protocol.