
Rev. 1.00
189 of ���
�an�a�� 1�� �01�
Standard 8051 8-Bit Flash MCU
HT85F2260/HT85F2270/HT85F2280
I2C Serial Interface
Serial Interface – SPI
35
Serial Interface – SPI
The SPI interface is often used to communicate with external peripheral devices such as sensors,
Flash Memory or EEPROM memory devices etc. Originally developed by Motorola, the four line
SPI interface is a synchronous serial data interface that has a relatively simple communication
protocol simplifying the programming requirements when communicating with external hardware
devices.
SPI Interface Operation
The SPI interface is a full duplex synchronous serial data link. The SPI interface is disabled or
enabled using the SPEN bit in the SPCON register which configures the functionally shared pins as
SPI pins and disables their logic I/O function. The SPI interface is a slave/master type, where the
device can be either master or slave decided by the MSTR bit in the SPCON register. It is a four line
interface with pin names, MOSI, MISO, SCK and SSN. Pins MOSI and MISO are the Serial Data
Input and Serial Data Output lines, SCK is the Serial Clock line and SSN is the Slave Select line.
Communication between devices connected to the SPI interface is carried out in a slave/master
mode with all data transfer initiations being implemented by the master. The Master also controls
the clock signal.
Single SPI Master and single Slave Connection