Вы находитесь на странице: 1из 11

Internal guide: Mrs. Mamata Lecturer Dept.

of ECE RNSIT

By: Sudarshan Mankad 1st Sem M Tech VLSI Design & Embedded Systems RNSIT

SPI or Serial Peripheral Interface is a communication method that was once used to connect devices such as printers, cameras, scanners, etc. to a desktop computer. This function has largely been taken over by USB, but SPI can still be a useful communication tool for some applications. SPI runs using a master/slave set-up and can run in full duplex mode, meaning that signals can be transmitted between the master and the slave simultaneously. There is no standard communication protocol for SPI.

SPI requires four lines, and is therefore often termed the four wire serial bus. These four lines are described in the table below.

The master controls all communication. By controlling the clock, the master decides when data is sent and received. Within each clock cycle a full duplex communication is carried out; each side sends and receives one bit of information. Because there is no standard communication protocol, the master can either send data or both send and receive data, depending on the needs of the application. Likewise, the slave can either receive data or both receive and send data back to the master. Using the Slave Select line, the master chooses which slave with which to communicate. Note that more than one slave may be selected, simply by applying a logic low to the desired SS lines, as illustrated in the schematic diagram shown above. If a given slave is not selected (its SS is high) it disregards signals sent by the master.

1. Make CE = I to begin writing. 2. The 8-bit address is shifted in one bit at a time, with each edge of SCLK. Notice that A 7 = 1 for the write operation and the A 7 bit goes in first. 3. After all 8 bits of the address are sent in, the SPI device expects to receive the data belonging to that address location immediately. 4. The 8 bit data is shifted in one bit at a time with each edge of the SCLK. 5. Make CE = 0 to indicate the end of the write cycle.

I. Make CE - 1 to begin writing. 2. The 8-bit address is shifted in one bit at a time, with each edge of SCLK. Notice that A 1- 0 for the read operation and the A 7 bit goes in first. 3. After all 8 bits of the address are sent in the SPI device sends out data belonging to that location. 4. The 8-bit data is shifted out one bit at a time with each edge of the SCLK . 5. Make CE - 0 to indicate the end of the read cycle.

PCB Schematic and Layout. Understanding HCS 12 Microcontroller. Executing simple codes on the available HCS 12 Microcontroller (MC9S12XDT512), and the Project Board. X Development and implementation of the code.

Вам также может понравиться