Y03101420147

Page 1

I nternational Journal Of Computational Engineering Research (ijceronline.com) Vol. 3 Issue. 1

Implementation of SP I Protocol in FPGA Veda Patil1, Vijay Dahake 2, Dharmesh Verma 3 , Elton Pinto 4 1,2

3,4

(Electronics & Teleco mmunicat ion, Rama rao Adik Institute of technology/ Mumbai, India) (Electronics & Teleco mmunication, Society of Applied Micro wave Electronics Engineering & Research/Mumbai, India)

Abstract: In this paper, Serial Peripheral Interface (SPI) protocol is implemented in Field Programmab le Gate Array (FPGA). Both the components SPI Master and SPI Slave are imp lemented using state machine diagram. The coding is done in Very hig h speed integrated circuits Hardware Descriptive Language (VHDL). The simulated data is shown and Received data is analyzed by receiving an acknowledgment. Keywords: Clock Phase, Clock Polarity, FPGA, M ISO, M OSI, SPI master, SPI Slave, VHDL.

1. Introduction Serial co mmunication is the process of sending data one bit at a time, sequentially, over a communicat ion channel. Serial co mmunicat ion is used for all long-haul co mmunicat ion and most computer networks, where the cost of cabling and synchronization difficult ies makes parallel co mmunication impract ical. A serial connection requires fewer interconnecting cables (e.g., wires/fibers) and hence occupies less space. The ext ra space allo ws for better isolation of the channel from its surroundings. Serial buses are becoming more co mmon even at shorter distances, as improved signal integrity and transmission speeds in newer serial technologies have begun to outweigh the parallel bus's advantage of simp licit y and to outstrip its disadvantages. Serial links can be clocked considerably faster than parallel links in order to achie ve a higher data rate. Crosstalk is less of an issue, because there are fewer conductors in proximity. In many cases, serial is a better option because it is cheaper to imp lement. Many Integrated Circuits have serial interfaces, as opposed to parallel ones , so that they have fewer p ins and are therefore less expensive. 2. Serial Peripheral Interface (SPI) Protocol The SPI bus is a synchronous serial data link standard, named by Motorola that operates in full duplex mode. Devices communicate in master/slave mode where the master device init iates the clock and data frame. Multip le slave devices are allo wed with individual slave select (chip select) lines. SPI is often referred to as SSI (Synchronous Serial Interface). The SPI bus interface consists four logic signals namely Serial Clock (SCLK), Master Output Slave In (MOSI), Master In Slave out (MISO) and Slave Select (SS).

Figure1. SPI Protocol Interface To begin a communication, the bus master first configures the clock, using a frequency less than or equal to the maximu m frequency the slave device supports. Such frequencies are commonly in the range of 1–100 M Hz the master then transmits the appropriate chip select bit for the desired chip to logic 0. Logic 0 is transmitted because the chip s elect line is active low, mean ing its off state is logic 1; on is asserted with logic 0. If a wait ing period is required then the master must wait for at least that period of time before starting to issue clock cycles. Transmissions normally involve two shift registers of some given word size, such as eight bits, one in the master and one in the slave; they are connected in a ring. Data is usually shifted out w ith the most significant bit first, while shifting a new least significant bit into the same reg ister. After that register has been shifted out, the master and slave have exchanged register values. Then each device takes that value and is written to memory. If there is more data to exchange, the shift registers are loaded with new data and the process repeats. Transmissions may involve any number of clock cycles. When there is no more data to be transmitted, the master stops toggling its clock. Normally, it then deselects the slave.

||Issn 2250-3005(online)||

||January | 2013

Page 142


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.