Elatec GmbH
2.5 Synchronous Serial Connection (SPI)
®
Mini Reader Mifare
NFC also offers synchronous data transfer via a 4-line SPI. In this case, the
reader is always slave, it cannot initiate any data transfer by itself. All data transfer is initiated by the
master by pulling the pin SS
¯¯ to low. Data is transmitted from the master to the reader on signal MOSI,
the reader transmits its response data on signal MISO. The serial clock is issued on signal SCK. All
data bytes are transferred MSB first. A data bit is sampled at the rising edge of SCK. A SPI data
transfer is completed by releasing the pin SS
¯¯ to inactive state.
After activation of SS
¯¯ the SPI unit needs a setup time (see 1.5.1, marking 1) before the serial clock is
issued in order to handle any incoming or outgoing data transfer. When SS
¯¯ is active, the master may
send an arbitrary count of data bytes to the reader. It is recommended to deactivate SS
¯¯ when a data
frame has been transmitted completely.
A data byte takes 8 SCK pulses. If SS
¯¯ is deactivated before 8 SCK pulses have been issued, the
receiver circuit is reset and the partial received data byte is dropped.
SPI communication works data frame oriented, this means that the first byte received by the reader is
always interpreted as a "length-byte"; it represents the count of data bytes which will follow. On the
same way, the reader transmits its "length-byte" first and tells the master, how many bytes will follow.
If one of the communication entities sets the length-byte to zero, it signals that it has no data to send.
The following images show an exemplary SPI transfer. Hereby, the command „Get Version‟ („v‟) is sent
to the reader. The master transmits the length-byte 0x01 followed by the command-code 0x76 (ASCII
„v‟) to the reader:
Page 8 of 61
Need help?
Do you have a question about the TWN3 Mini Reader Mifare NFC and is the answer not in the manual?