I2C is a serial protocol for two-wire interface to connect low-speed devices like microcontrollers, EEPROMs, A/D and D/A converters, I/O interfaces and other similar peripherals in embedded systems.
This presentation discusses the details of the I2C protocol and interfacing of EEPROM with 8051 based on I2C protocol. It also discusses the other applications of I2C protocol
I2C is a serial protocol for two-wire interface to connect low-speed devices like microcontrollers, EEPROMs, A/D and D/A converters, I/O interfaces and other similar peripherals in embedded systems.
This presentation discusses the details of the I2C protocol and interfacing of EEPROM with 8051 based on I2C protocol. It also discusses the other applications of I2C protocol
Router 1X3 – RTL Design and VerificationIJERD Editor
Routing is the process of moving a packet of data from source to destination and enables messages
to pass from one computer to another and eventually reach the target machine. A router is a networking device
that forwards data packets between computer networks. It is connected to two or more data lines from different
networks (as opposed to a network switch, which connects data lines from one single network). This paper,
mainly emphasizes upon the study of router device, it‟s top level architecture, and how various sub-modules of
router i.e. Register, FIFO, FSM and Synchronizer are synthesized, and simulated and finally connected to its top
module.
I²C (Inter-Integrated Circuit), pronounced I-squared-C, is a multi-master, multi-slave, single-ended, serial computer bus invented by Philips Semiconductor (now NXP Semiconductors). It is typically used for attaching lower-speed peripheral ICs to processors and microcontrollers. Alternatively I²C is spelled I2C (pronounced I-two-C) or IIC (pronounced I-I-C).
Since October 10, 2006, no licensing fees are required to implement the I²C protocol. However, fees are still required to obtain I²C slave addresses allocated by NXP.[1]
Several competitors, such as Siemens AG (later Infineon Technologies AG, now Intel mobile communications), NEC, Texas Instruments, STMicroelectronics (formerly SGS-Thomson), Motorola (later Freescale), and Intersil, have introduced compatible I²C products to the market since the mid-1990s.
SMBus, defined by Intel in 1995, is a subset of I²C that defines the protocols more strictly. One purpose of SMBus is to promote robustness and interoperability. Accordingly, modern I²C systems incorporate policies and rules from SMBus, sometimes supporting both I²C and SMBus, requiring only minimal reconfiguration.
The Serial Peripheral Interface (SPI) bus is a synchronous serial communication interface specification used for short distance communication, primarily in embedded systems. The interface was developed by Motorola and has become a de facto standard. Typical applications include sensors, Secure Digital cards, and liquid crystal displays.
SPI devices communicate in full duplex mode using a master-slave architecture with a single master. The master device originates the frame for reading and writing. Multiple slave devices are supported through selection with individual slave select (SS) lines.
Sometimes SPI is called a four-wire serial bus, contrasting with three-, two-, and one-wire serial buses. The SPI may be accurately described as a synchronous serial interface,[1] but it is different from the Synchronous Serial Interface (SSI) protocol, which is also a four-wire synchronous serial communication protocol, but employs differential signaling and provides only a single simplex communication channel.
Notes: Verilog Part 4- Behavioural ModellingJay Baxi
This is the 4th part of the Verilog HDL notes prepared from Verilog HDL by Samir Palnitkar .
It contains a broad view on behavioural modelling the second most frequently used level of abstraction needed for designing of sequential circuits.
Router 1X3 – RTL Design and VerificationIJERD Editor
Routing is the process of moving a packet of data from source to destination and enables messages
to pass from one computer to another and eventually reach the target machine. A router is a networking device
that forwards data packets between computer networks. It is connected to two or more data lines from different
networks (as opposed to a network switch, which connects data lines from one single network). This paper,
mainly emphasizes upon the study of router device, it‟s top level architecture, and how various sub-modules of
router i.e. Register, FIFO, FSM and Synchronizer are synthesized, and simulated and finally connected to its top
module.
I²C (Inter-Integrated Circuit), pronounced I-squared-C, is a multi-master, multi-slave, single-ended, serial computer bus invented by Philips Semiconductor (now NXP Semiconductors). It is typically used for attaching lower-speed peripheral ICs to processors and microcontrollers. Alternatively I²C is spelled I2C (pronounced I-two-C) or IIC (pronounced I-I-C).
Since October 10, 2006, no licensing fees are required to implement the I²C protocol. However, fees are still required to obtain I²C slave addresses allocated by NXP.[1]
Several competitors, such as Siemens AG (later Infineon Technologies AG, now Intel mobile communications), NEC, Texas Instruments, STMicroelectronics (formerly SGS-Thomson), Motorola (later Freescale), and Intersil, have introduced compatible I²C products to the market since the mid-1990s.
SMBus, defined by Intel in 1995, is a subset of I²C that defines the protocols more strictly. One purpose of SMBus is to promote robustness and interoperability. Accordingly, modern I²C systems incorporate policies and rules from SMBus, sometimes supporting both I²C and SMBus, requiring only minimal reconfiguration.
The Serial Peripheral Interface (SPI) bus is a synchronous serial communication interface specification used for short distance communication, primarily in embedded systems. The interface was developed by Motorola and has become a de facto standard. Typical applications include sensors, Secure Digital cards, and liquid crystal displays.
SPI devices communicate in full duplex mode using a master-slave architecture with a single master. The master device originates the frame for reading and writing. Multiple slave devices are supported through selection with individual slave select (SS) lines.
Sometimes SPI is called a four-wire serial bus, contrasting with three-, two-, and one-wire serial buses. The SPI may be accurately described as a synchronous serial interface,[1] but it is different from the Synchronous Serial Interface (SSI) protocol, which is also a four-wire synchronous serial communication protocol, but employs differential signaling and provides only a single simplex communication channel.
Notes: Verilog Part 4- Behavioural ModellingJay Baxi
This is the 4th part of the Verilog HDL notes prepared from Verilog HDL by Samir Palnitkar .
It contains a broad view on behavioural modelling the second most frequently used level of abstraction needed for designing of sequential circuits.
Those slides describe digital design using Verilog HDL,
starting with Design methodologies for any digital circuit then difference between s/w (C/C++) and H/w (Verilog) and the most important constructs that let us start hardware design using Verilog HDL.
The PDF contains one of the six parts to learn Verilog in the simplest possible way.
It contains notes of first three chapters of the reference book Verilog HDL by Samir Palnitkar
Radiation Hardening by Design is one of the hardware based solution to one of the most troublesome problem faced by digital circuits in the space.
RHBD provides varieties of techniques to make the circuit resilient towards such effects and ensures proper malfunctioning of the circuit.
Notes: Verilog Part 2 - Modules and Ports - Structural Modeling (Gate-Level M...Jay Baxi
The Notes Verilog Part 2 includes the notes and keypoints of a reference book "Verilog HDL by Samir Palnitkar.
This is the second part out of the total six parts.
Notes: Verilog Part 5 - Tasks and FunctionsJay Baxi
The document is the penultimate part of Verilog notes out of 6 total parts.
This contains brief theoretical points on Tasks and Functions, their differences, declaration and invocation and their types and applications.
Fundamentals of HDL (first 4 chapters only) - GodseHammam
In electronics, a hardware description language (HDL) is a specialized computer language used to program the structure, design and operation of electronic circuits, and most commonly, digital logic circuits.
SPI is a serial bus standard established by Motorola and supported in silicon products from various manufacturers.
It is a synchronous serial data link that operates in full duplex (signals carrying data go in both directions simultaneously).
Devices communicate using a master/slave relationship, in which the master initiates the data frame. When the master generates a clock and selects a slave device, data may be transferred in either or both directions simultaneously.
MOSFETs (10EC63) Notes for Electronics & Communication Engineering Students o...Hanumantha Raju
The notes on Microelectronic Circuits (10EC63) is prepared as per VTU syllabus.
Author: M. C Hanumantharaju
Dept. of ISE, Dayananda Sagar College of Engineering
Kumaraswamy Layout, Bangalore.
Ph: 9742290764
Email: mchanumantharaju@gmail.com
For Full notes & Video Lectures contact me at the above address.
Microelectronic Circuits (10EC63) notes is as per the VTU Syllabus and is written from the text book authored by Sedra & Smith.
Mail your suggestions and comments to mchanumantharaju@gmail.com
Dr. M. C. Hanumantharaju,
Associate Professor
BMS Institute of Technology & Management
Bangalore
D-7-17 Interface an 8-bit serial device using SPI- Thecontrol pin is i.docxearleanp
D.7.17 Interface an 8-bit serial device using SPI. Thecontrol pin is interfaced to PT2, and the clock and datasignals are connected to the SPI. The control and clocksignals are normally high. The SPI needs to clock data out on the falling edge of the clock. The clock and data are created by the real SPI, and the control signal is bit-banged. The maximum clock frequency is 1 MHz. a) Write a function that initializes the interface. b) Write a function that outputs (transmits) one byte using the SPI port. First send eight bits of data, then make PT2 low, then make PT2 high again.
Solution
SPI is the \"Serial Peripheral Interface\", widely used with embedded systems because it is a simple and efficient interface: basically a multiplexed shift register. Its three signal wires hold a clock (SCK, often in the range of 1-20 MHz), a \"Master Out, Slave In\" (MOSI) data line, and a \"Master In, Slave Out\" (MISO) data line. SPI is a full duplex protocol; for each bit shifted out the MOSI line (one per clock) another is shifted in on the MISO line. Those bits are assembled into words of various sizes on the way to and from system memory. An additional chipselect line is usually active-low (nCS); four signals are normally used for each peripheral, plus sometimes an interrupt.
The SPI bus facilities listed here provide a generalized interface to declare SPI busses and devices, manage them according to the standard Linux driver model, and perform input/output operations. At this time, only \"master\" side interfaces are supported, where Linux talks to SPI peripherals and does not implement such a peripheral itself. (Interfaces to support implementing SPI slaves would necessarily look different.)
The programming interface is structured around two kinds of driver, and two kinds of device. A \"Controller Driver\" abstracts the controller hardware, which may be as simple as a set of GPIO pins or as complex as a pair of FIFOs connected to dual DMA engines on the other side of the SPI shift register (maximizing throughput). Such drivers bridge between whatever bus they sit on (often the platform bus) and SPI, and expose the SPI side of their device as a struct spi_master. SPI devices are children of that master, represented as a struct spi_device and manufactured from struct spi_board_info descriptors which are usually provided by board-specific initialization code. A struct spi_driver is called a \"Protocol Driver\", and is bound to a spi_device using normal driver model calls.
The I/O model is a set of queued messages. Protocol drivers submit one or more struct spi_message objects, which are processed and completed asynchronously. (There are synchronous wrappers, however.) Messages are built from one or more struct spi_transfer objects, each of which wraps a full duplex SPI transfer. A variety of protocol tweaking options are needed, because different chips adopt very different policies for how they use the bits transferred with SPI.
.
Serial Peripheral Interface (SPI) is an interface bus commonly used to send data between microcontrollers and small peripherals such as shift registers, sensors, and SD cards.
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
call for paper 2012, hard copy of journal, research paper publishing, where to publish research paper,
journal publishing, how to publish research paper, Call For research paper, international journal, publishing a paper, IJERD, journal of science and technology, how to get a research paper published, publishing a paper, publishing of journal, publishing of research paper, reserach and review articles, IJERD Journal, How to publish your research paper, publish research paper, open access engineering journal, Engineering journal, Mathemetics journal, Physics journal, Chemistry journal, Computer Engineering, Computer Science journal, how to submit your paper, peer reviw journal, indexed journal, reserach and review articles, engineering journal, www.ijerd.com, research journals
Serial peripheral Interface - Embedded System ProtocolAditya Porwal
Serial Peripheral Interface (SPI) is a synchronous serial data protocol used by micro-controllers for communicating with one or more peripheral devices quickly over short distances. It can also be used for communication between two micro-controllers.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Designing of fifo and serial peripheral interface protocol using Verilog HDL
1. Designing of FIFO and Serial Peripheral
Interface Protocol using Verilog HDL
By:
Jay R. Baxi
Intern
Tech Vulcan Solutions
India PVT LTD
jay.baxi@techvulcan.com
Guided By:
Vikas Billa
Engineer - VLSI
Tech Vulcan Solutions
India PVT LTD
vikas.billa@techvulcan.com
Faculty Guide:
Prof. Usha Mehta
Professor
Institute of Technology,
Nirma University
usha.mehta@nirmauni.ac.in
3. Introduction
− The main aim of the internship was to design an IP, using a
Verilog HDL. Once, the concepts of Verilog HDL were clarified,
certain small level examples like Vending Machine, simplified
parameterized comparator, were done to evaluate the
understanding.
− Once concluded, the Serial Peripheral Interface (SPI) Protocol
was undertaken, the understanding and concepts of which use
the First In First Out (FIFO) logic.
− Hence, prior to the completion of SPI, the development of FIFO
was done.
4. Motivation
− Three basic problems in any Architecture are to minimize area and
power requirements and increase the speed as much as possible.
− In this Architecture, due to reduced number of registers, the power
and area are considerably reduced. And due to relatively less
processing, the speed is increased.
− Serial ports are asynchronous.
− If two devices work on different clocks, the output maybe garbage.
− Furthermore, if the Slave reads data at wrong time, wrong bits will be
read.
− Complex and Costly hardware.
− Other Architectures defined have a complex implementation of large
number of registers, thereby reducing readability and understanding
of the protocol.
5. Background
− What is SPI?
− SPI stands for Serial Peripheral Interface. SPI is a protocol, a way to
send data from device to device in a serial fashion (bit by bit). This
protocol is used for things like SD memory cards, MP3 decoders,
memory devices and other high speed applications.
− It is Synchronous.
− It operates in Full Duplex mode.
− Communication mode: Master/Slave.
− Uses Clocks, Data lines and chip select signals to read/write data.
− SPI allows each of the slave devices to have an independent slave select
line, that allows any number of virtual slave connections. (Hardware
doesn’t allow though.)
6. First In First Out
−FIFOs are commonly used in electronic circuits for buffering
and flow control which is from hardware to software.
−In its hardware form, a FIFO primarily consists of a set of read
and write pointers, storage and control logic.
−Storage may be SRAM, flip-flops, latches or any other suitable
form of storage.
−For FIFOs of non-trivial size, a dual-port SRAM is usually used,
where one port is dedicated to writing and the other to reading.
7. First In First Out
−A synchronous FIFO is a FIFO where the same clock is used for
both reading and writing. An asynchronous FIFO uses different
clocks for reading and writing.
−Examples of FIFO status flags include: full, empty, almost full,
almost empty, etc.
−A hardware FIFO is used for synchronization purposes. It is
often implemented as a circular queue, and thus has two
pointers:
− Read Pointer/Read Address Register
− Write Pointer/Write Address Register
8. First In First Out
− FIFO Empty:
−When the Read Address Register equals the Write Address Register, the
FIFO is termed as EMPTY.
− FIFO Full:
− When the read address LSBs equal the write address LSBs and the
extra MSBs are different, the FIFO is full.
14. SPI Protocol
−SPI follows four logic signals [1]
− 1.) SCLK: Serial Clock
− 2.) MOSI: Master Output/Slave Input
− 3.) MISO: Master Input/Slave Output
− 4.) SS(Active Low): Slave Select
− Active Low: The slave is activated only when it is provided with low
logic level/“0” logic level.
17. SPI Protocol
−Data Transmission:
− The master first configures the clock with a frequency less than or
equal to that of the slave which is obtained from the data sheet of the
slave devices. (usually in MHz)
− The desired Slave Select is turned on by passing the logic “0” through
it.
− There can be delays, if explicitly mentioned.
− During each clock cycle, a full duplex communication occurs
The master sends a bit to the MOSI line, the slave reads it.
The slave sends a bit to the MISO line, the master reads it.
18. SPI Protocol
−Data Transmission(cont.):
− Transmission includes two shift register at the two ends, connected in
a RING topology.
− Data is shifted out of the MSB (leftmost bit) and taken in through the
LSB (rightmost bit).
− Transmission can occur at any number of clock cycles. Usually, once
the data is transmitted, the master stops the toggling of the clock. It
then deselects the slave.
− Every slave on the bus that hasn't been activated using its chip select
line must disregard the input clock and MOSI signals, and must not
drive MISO. The master must select only one slave at a time.
21. SPI Protocol : Architecture
−Architecture:
− As mentioned the Architecture uses two registers of 32 bits each.
− The data is transferred in fixed 8-bit form.
− The data is divided in form of 8 bits, he remaining bits left towards the
end are appended with ‘0’s at the MSB location to make it a multiple of
8.
− The three registers used and their functioning is mentioned as below:
− 1.) Global Control Register (SPIGCR)
− 2.) Transmit Receive Register (TX-RXDATA)
22. SPI Protocol : Architecture
1.) SPI – Global Control Register (SPIGCR):
31 30 29 28 27 26 25 24 23 16
RST ENA OVRN TBUF RBUF INTR CPOL CPHA
1 bit 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit
15 14 13 12 10 9 7 6 4 3 0
M/S MOSI MISO SETUP DELAY HOLD DELAY TIMER CHARLEN
1 bit 1 bit 1 bit 3 bits 3 bits 3 bits 4 bits
−RESET [31]:
RESERVED
8 bits
− The reset bit when set to 1 for at least one clock cycle, acts as a refresh
button. All the buffers will be emptied. All the flags will be set to their
default state. For the operation to proceed it is important that the reset bit
become 0.
23. SPI Protocol : Architecture
− ENABLE [30]:
− The Enable is set to 1, to ensure the functioning of the protocol. It can be set only when the RESET
bit is set to 0.
− When set to 0, no data transmission occurs.
− OVERRUN [29]:
− The Overrun bit is set to 1, when data is overrun. That is the next read operation takes place before
the previous bit is written. This is one of the methods to have the flow control, given the fact that
there is no external flow control provided by the SPI protocol, for itself.
− TBUF [28]:
− This bit when set to 1, indicates that TBUF is full and it is ready to send the data to the receiver.
− This bit when set to 0, indicates that TBUF is empty and more data can be loaded, (if any), before
sending it to the receiver
− RBUF [27]:
− This bit when set to 1, indicates that RBUF is full and it is ready to receive the data from the
receiver.
− This bit when set to 0, indicates that RBUF is empty and more data can be loaded, from the
transmitter.
24. SPI Protocol : Architecture
−INTERRUPT [26]:
− When an external interrupt register sends an interrupt signal this bit is
turned on. This indicates that the current transmission should be
paused and continued only after the interrupt bit turns low.
−CPOL | CPHA [25-24]:
− The clock polarity and Clock Phase gives the user a choice of four
different options giving him a choice as to when does he want the
receiver to sample the data. The following table briefly explains the
working of the bits.
25. SPI Protocol : Architecture
CPOL CPHA Description
0 0 Data is output on the falling edge of the SCK. Input data is latched on the
falling edge.
0 1 Data is output one half-cycle before the first rising edge of SCK and on
subsequent falling edges. Input data is latched on the rising edge of SCK.
1 0 Data is output on the falling edge of SCK. Input data is latched on the rising
edge.
1 1 Data is output one half-cycle before the first falling edge of SCK and on
subsequent rising edges. Input data is latched on the falling edge of SCK.
30. SPI Protocol : Architecture
−RESERVED [23-16]:
− These are reserved bits, when read it gives 1 and produces no output in case
of write.
−M/S [15]: The Master mode of the device is active high. While the
Slave mode is active low.
− If 1 is selected it is in Master mode.
− If it is set to 0, it is in Slave mode.
−MISO [14]: If the data is sent to the MISO line it is set to 1. For
Master register this bit is set to 0, for Slave mode it is set to 1.
−MOSI [13]: If the data is sent to the MOSI line it is set to 1. For
Master register this bit is set to 1, for Slave mode it is set to 0.
31. SPI Protocol : Architecture
−SETUP_DELAY [12-10] and HOLD_DELAY [9-7]:
− There may be a case when the clock takes some delay before coming to
a stable high state. This is when the TIMER will calculate the delay and
store the value with an appropriate value in the SETUP_DELAY
register.
− For cases in which, the clock has to hold a certain value before coming
to a low state, the timer calculates the delay and stores it in the
HOLD_DELAY.
−TIMER [6-4]: Time out Operations
−CHARLEN [3-0]: The 4-bit CHARLEN register stores the length
of the data that is to be sent in bit format.
32. SPI Protocol : Architecture
2.) SPI – Transmit Receive Register(TX-RXDATA):
31 16
15 0
TXDATA (15-8)
8 bits
−RESERVED [31-16]:
Reserved (31-16)
RXDATA (8-0)
8 bits
16 bits
− These bits are reserved, produce 1 on read and 0 on output.
33. SPI Protocol : Architecture
−TXDATA [15-8]:
− When working in a Master mode, the TXDATA transmits the data to
the Slave by this register through the MOSI line.
− When working in a Slave mode, the TXDATA transmits the data back
to the Master by this register through the MISO line.
−RXDATA [7:0]:
− When working in a Master mode, the RXDATA receives the data from
the Slave on this register through the MISO line.
− When working in a Slave mode, the RXDATA receives the data from
the master on this register through the MOSI line.
34. SPI Protocol : Verilog Implementation
module master(
input RST ,
input ENA ,
input INTR ,
input MISO ,
output reg MOSI ,
output reg CSbar ,
output reg SCK
);
reg [7:0] data_m ;
reg [7:0] data_init;
reg temp ;
initial
begin
SCK = 1'b0;
forever #10 SCK = ~SCK;
end
initial
begin
data_m = 8'b10101101;
data_init = data_m ;
$display("Initial Data at Master: %b",data_m);
end
35. SPI Protocol : Verilog Implementation
always@(posedge SCK, negedge RST)
begin
if(RST)
data_m = data_init ;
else if (ENA && !INTR)
begin
MOSI = data_m[7] ;
temp = MISO ;
data_m = data_m << 1 ;
data_m = {data_m[7:1],temp};
$display("Data at Master: %b",data_m);
end
end
always @(posedge SCK, negedge RST)
begin
CSbar = 1'b0 ;
if(INTR)
$display("Interrupt is Processing") ;
end
endmodule
42. Conclusion & Future Scope
−SPI offers reduced overhead as compared to Serial
and I2C protocols, with a flaw of more number of pins
required.
−However, the mere advantage of unlimited number of
theoretical slave devices eclipses the fact.
−The data transfer is relatively simple, with extremely
simple hardware.
−It is one of the fastest synchronous protocol.
43. References
[1] www.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus
(As on March 12, 2014)
[2] https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi/all
(As on March 14, 2014)
[3] http://tronixstuff.com/2011/05/13/tutorial-arduino-and-the-spi-bus/
(As on March 17, 2014)
[4] https://learn.sparkfun.com/tutorials/i2c
(As on March 17, 2014)
[5] KeystoneArchitecture – Serial Peripheral Interface (SPI) Texas Instruments.
Literature Number: SPRUGP2A, March 2012.
[6] Serial Peripheral Interface – User’s Guide, Texas Instruments Literature
Number: SPRUEM2A, October 2007.