SlideShare a Scribd company logo
Sansar Chand Sankhyan Int. Journal of Engineering Research and Applications www.ijera.com 
ISSN : 2248-9622, Vol. 4, Issue 7( Version 4), July 2014, pp.67-70 
www.ijera.com 67|P a g e 
Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDL Sansar Chand Sankhyan M.tech(VLSI),Department of EECEITM University, Gurgaon,Haryana,India ABSTRACT In most of the applications, the physical systems require a real-time operation to interface high speed constraints. In most of the applications, the physical systems require a real-time operation to interface high speed constraints. The Inter Integrated Circuits (I2C) is a 2-wireed communication bus. Physically, it consists of 2 active wires: SDA (Serial Data), SCL (Serial Clock) and a ground connection. All I2C-bus compatible devices incorporate an on-chip interface which allows them to communicate directly with each other via the I2C-bus. 
This paper focuses on the software implementation for I2C Driver and its interfacing with RAM. Specifically, this paper describes in detail an I2C Master connected to I 2C Slave using an I2C bus. The I2C protocol was given by Philips Semiconductors for faster devices to communicate with slower devices and each other without data loss. The complete module is designed in VHDL and simulated in Xilinx ISE 14.5. 
KEYWORDS:SCL, SDA, I2C Bus, RAM 
I. INTRODUCTION: 
The design of I2C bus controller is to interface between two devices for the purpose of communication. The presence an on chip RAM support for a data communication between the chip and a host computer to send data on the RAM. To minimize the system-level interconnect between integrated devices, I propose to transmit the contents of the RAM storing the results back to a host computer via a serial bus, the I2C Interface. The interconnect integrated circuit bus commonly known as the I2C bus which is a bi-directional, two-wire and serial communication standard protocol. The designed are simple but difficult for efficient integrated circuit (IC) control. The system is comprised of two bus lines, SCL (Serial Clock) and SDA (Serial Data). Standard I2C devices operate up to 100Kbps, while fast-mode devices operate at up to 400Kbps. Most of the I2C devices available today support 400Kbps operation. 
II. LITERATURE SURVEY: 
There are many reasons for using serial interface design much more important application includes serial communication like sensors communication with personal computer. Many common embedded system peripherals, such as anolog-to-digital and digital-to-anlaog convetors, LCDs, and temperature sensors, support serial interfaces. Serial interface allow processors to communicate without the need for shared memory and the problems they can create. There are Serial communication protocols like UART, CAN, USB,SPI, Inter IC. USB, SPI and UARTS are all just one type to point type protocol. USB uses multiplexer to communicate with other 
devices. Only I2C and CAN protocol uses software addressing. But only I2C is very simple to design and easy to maintain. Table 1. Comparison of different protocols 
III. I2C BUS TERMINOLOGY: 
 Transmitter:The device which sends the data or message to the receiver. 
 Receiver:The device which receives the data or message from the bus. 
 Master:The device which generates clock signals, initiates a transfer i.e. start condition and terminates a transfer i.e. stop condition. It may also act as a transmitter/receiver. 
 Slave:The device addressed by a master. Also it may act as a transmitter/receiver. 
 Multi master:More than one master can attempt control the bus at the same time without demeaning thedata/message. 
 Arbitration:It is a procedure to ensure that, if more than one master simultaneously tries to 
RESEARCH ARTICLE OPEN ACCESS
Sansar Chand Sankhyan Int. Journal of Engineering Research and Applications www.ijera.com 
ISSN : 2248-9622, Vol. 4, Issue 7( Version 4), July 2014, pp.67-70 
www.ijera.com 68|P a g e 
control the bus, only oneis allowed to do so and the data is not corrupted. 
 Synchronization:It is a procedure to synchronize the clock signals of two or more devices. 
Figure 1. I2C bus configuration using masters and slaves 
3.1 Master and Slave: 
A master is the device which initiates a data transfer on the bus and generates theclock signals to permit that transfer. At that time, any device addressed is considered a slave.Both lines are connected to a positive supply via a pull-up resistor, and remain HIGH whenthe bus is not busy. Each device is recognized by a unique address—whether it is amicrocomputer, LCD driver, memory or keyboard interface—and can operate as either atransmitter or receiver, depending on the function of the device. A device generating amessage or data is a transmitter, and a device receiving the message or data is a receiver.Obviously, a passive function like an LCD driver could only be a receiver, while amicrocontroller or a memory can both transmit and receive data. When a data transfer takesplace on the bus, a device can either be a master or a slave. The device which initiates thetransfer, and generates the clock signals for this transfer, is the master. At that time anydevice addressed is considered a slave. It is important to note that a master could either be atransmitter or a receiver; a master microcontroller may send data to a RAM acting as atransmitter, and then interrogate the RAM for its contents acting as a receiver in both casesperforming as the master initiating the transfer. In the same manner, a slave could be both areceiver and a transmitter. The I2C is a multi master bus. It is possible to have, in one system; microcontroller may act as a master for one transfer, and then be theslave for another transfer, initiated by another processor on the network. The master/slave relationships on thebus are not permanent, and may change on each transfer. 
3.2 Data Validity: 
One data bit is transferred must remain stable during the HIGH period of the clock pulse in order to be valid. Changes in the data line at this time will be interpreted a eight bits long, is transferred serially with the most significant bit first, and is followed by an acknowledge bit. The clock pulse related to the acknowledge bit is generated by the master. 
Figure2 Data validity condition 
3.3 Byte format Data Transfer: 
Every byte put on the SDA line must be 8 bits transmitted per transfer is unrestricted. Each byte has to be followed by an Acknowledge bit. Data is transferred with the Most Significant Bit (MSB) first. If a slave cannot receive or transmit another complete byte of data until it has performed other function, for example servicing an internal interrupt, it can hold the clock line SCL LOW to force the master into a wait state. Data transfer then continues when the slave is ready for another byte of data and releases clock line SCL 
Figure 3 Data transfer on the I2C bus [7] 
IV. I2C Protocol: 
Normally, a standard communication protocol consists of four parts: 1) START signal generation 2) Slave address transfer 3) Data transfer 4) STOP signal generation 
4.1 Transmitting a byte to a slave device: 
After start condition has been sent, a byte can be transmitted to a slave by the master. This first byte after a startcondition will identify the slave on the bus (address) and will select the mode of operation. The meaning of all following bytes depends on the slave.
Sansar Chand Sankhyan Int. Journal of Engineering Research and Applications www.ijera.com 
ISSN : 2248-9622, Vol. 4, Issue 7( Version 4), July 2014, pp.67-70 
www.ijera.com 69|P a g e 
Figure 4 Transmission of a byte to a slave [8] 
4.2 Receiving a byte from a slave device: 
Once the slave has been addressed and the slave has acknowledged this, a byte can be received from the slave if the R/W bit in the address was set to READ (set to '1'). 
Figure 5 Reception of a byte from a slave [8] 
4.3 Design steps: 
The functional description of I2C master has to be described in the VHDL language. Thatis called design module / core.The test bench program has to be developed to test the design module. The test benchgives the input to the design module & verifies the outputs. The test bench has to bewritten in such way to check the design module in all possible conditions. 
V. SYSTEM ARCHTECTURE: 
Figure 6I2C and RAM interface system architecture In this paper we are considering master as I2C controller and slave as SDRAM. 
5.1 Top-Level Signal Descriptions: 
Figure 7 RTL schematic of designed I2C master controller Table-1 provides descriptions of the input/output signals of the I2C bus Master controller. The address bus is a 3-bit input pin to the I2C master controller. The data input to the master controller is 8-bit and data output from the master controller is also 8 bit. Serial data line (SDA) and Serial click line (SCL) both are out pins between the master controller and slave devices. RD and WR both are input pins to the master controller form microprocessor. Table 2. Signal Description of I2C Master Controller [7] 
5.2 Process Algorithm: 
The complete process of data transfer form master to slave and vice-versa is shown below in Figure 7in form of a algorithm .
Sansar Chand Sankhyan Int. Journal of Engineering Research and Applications www.ijera.com 
ISSN : 2248-9622, Vol. 4, Issue 7( Version 4), July 2014, pp.67-70 
www.ijera.com 70|P a g e 
Figure 8 Process flow of I2C controller [8] 
5.3 Advantages OF I2C 
1. Used for security sensitive applications like sensor connections, RFID, biometric devices, etc 
2. Common communication standards between microcontrollers and sensors 
3. Each device is recognised by its unique address and can operate as either a transmitter or receiver, depending upon thefunction of the device. 
4. It Provides enhance security system 
5. Compatible with FPGA 
VI. SIMULATION RESULTS: 
The VHDL code for I2C master controller is compiled in the Xilinx ISE 14.5 software tool. The test bench of this module is simulated and followings are the results. 
Figure 9 Simulation result of write and read operation in I2C and RAM interface 
VII. CONCLUSION: 
The simulation results showed that all the designed functional blocks of the system design are giving desired results and the system itself also giving the desired results. The interfacing done between the I2C master controller and RAM slave is successfully designed and is giving desired results. The design module is designed using is done using VHDL. If the designer wants to design the module for any new technology than he only needs give the design to the logic synthesis tool as input and in result it will create the new gate level net list and the tool itself optimize the timing and area for new technology. References: [1] The I2C -Bus specifications version 2.1 January,2000http://www.semiconductors.philips.com/buses/i2c. [2] UM10204 I2C -bus specification and user manual Rev. 03 — 19 June 2007 [3] I2C bus Inter Integrated Circuits bus by Philips Semiconductors. [4] Embedded Platform Excalibur Altera, http://www.altera.com. 
[5] PCF 8584, I2C bus controller datasheet,http://www.semiconductor.philips. com [6] www.latticesemi.com, I2C Master Controller reference design [7] Arvind Sahu, Ravi Shankar Mishra, Puran Gour, “Design and Interfacing of High speed model of FPGAS using I2C protocol”,Int.J.Com.Tech.Appl.vol2(3),531- 536 [8] Shoaib.Shah Sobhan, Sudipta. Das andIqbalur. Rahman, “Implementation of I2C using System Verilog and FPGA”,ICAEPE,2011. [9] Jayant Mankar et. al, “Review of I2C Protocol,” International Journal of Research in Advent Technology, vol. 2, issue 1, January 2014, pp.474-479. [10] A.K. Oudjida, M.L. Berrandjia, R. Tiar, A.Liacha, K. Tahraoui, with “FPGA Implementation of I2c & SPI Protocols: A Comparative Study” Electronics, Circuits, and Systems, 2009. ICECS.

More Related Content

What's hot (20)

DOC
Internet Enabled Device For The Recording of Exercise Performance on Home Fit...
Brian Mills
 
PDF
Documentaion of datalogger and arduino
sarvan k
 
PDF
Embedded real time-systems communication
Vijay Kumar
 
PPT
Serial Communication
Rashmi
 
PPT
Practical Data Communications & Networking for Engineers & Technicians
Living Online
 
PPTX
I2C
Sarojpatnaik5
 
DOC
Industrial training report of embedded system and robotics
Pallavi Bharti
 
PDF
International Journal of Engineering and Science Invention (IJESI)
inventionjournals
 
PPT
I2 c
sean chen
 
PPTX
Serial Data Communication
Rizaldi Satria N
 
PDF
The I2C Interface
Corrado Santoro
 
PPTX
Serial Data Communication
Desty Rahayu
 
PDF
communication interfaces-Embedded real time systems
Raghunath reddy
 
PDF
COVERAGE DRIVEN VERIFICATION OF I2C PROTOCOL USING SYSTEM VERILOG
IAEME Publication
 
PDF
I2c interfacing raspberry pi to arduino
Mike Ochtman
 
PDF
Implementation of Universal Asynchronous Receiver and Transmitter
IJERA Editor
 
PPTX
I2C BUS
p_ayal
 
PDF
Communication protocols - Embedded Systems
Emertxe Information Technologies Pvt Ltd
 
PPT
I2C
rchovatiya
 
Internet Enabled Device For The Recording of Exercise Performance on Home Fit...
Brian Mills
 
Documentaion of datalogger and arduino
sarvan k
 
Embedded real time-systems communication
Vijay Kumar
 
Serial Communication
Rashmi
 
Practical Data Communications & Networking for Engineers & Technicians
Living Online
 
Industrial training report of embedded system and robotics
Pallavi Bharti
 
International Journal of Engineering and Science Invention (IJESI)
inventionjournals
 
I2 c
sean chen
 
Serial Data Communication
Rizaldi Satria N
 
The I2C Interface
Corrado Santoro
 
Serial Data Communication
Desty Rahayu
 
communication interfaces-Embedded real time systems
Raghunath reddy
 
COVERAGE DRIVEN VERIFICATION OF I2C PROTOCOL USING SYSTEM VERILOG
IAEME Publication
 
I2c interfacing raspberry pi to arduino
Mike Ochtman
 
Implementation of Universal Asynchronous Receiver and Transmitter
IJERA Editor
 
I2C BUS
p_ayal
 
Communication protocols - Embedded Systems
Emertxe Information Technologies Pvt Ltd
 

Viewers also liked (20)

DOCX
MAJOR PROJEC TVLSI
Anushaamaravadi
 
PDF
Asic implementation of i2 c master bus
VLSICS Design
 
PPT
FPGA Configuration
Amirali Sharifian
 
PDF
Dsd lab Practical File
Soumya Behera
 
PPT
VHDL
Ramasubbu .P
 
PPTX
ieee projects list
8130809758
 
PDF
Programs of VHDL
Rkrishna Mishra
 
DOC
All VLSI programs
Gouthaman V
 
PDF
Experiment write-vhdl-code-for-realize-all-logic-gates
Ricardo Castro
 
PDF
O046038489
IJERA Editor
 
PDF
The Cortisol Awakening Response Using Modified Proposed Method of Forecasting...
IJERA Editor
 
PDF
On Semi-Invariant Submanifolds of a Nearly Hyperbolic Kenmotsu Manifold with ...
IJERA Editor
 
PDF
Ground Improvement of Dune Sand Fields For The Purpose of Moisture Retention
IJERA Editor
 
PDF
Q04602106117
IJERA Editor
 
PDF
Preparation and Investigation on Properties of Cryogenically Solidified Nano ...
IJERA Editor
 
PDF
Recognizing Celebrity Faces in Lot of Web Images
IJERA Editor
 
PDF
Ad04603175180
IJERA Editor
 
PDF
Structure Analysis of a Turbocharger Compressor Wheel Using FEA
IJERA Editor
 
MAJOR PROJEC TVLSI
Anushaamaravadi
 
Asic implementation of i2 c master bus
VLSICS Design
 
FPGA Configuration
Amirali Sharifian
 
Dsd lab Practical File
Soumya Behera
 
ieee projects list
8130809758
 
Programs of VHDL
Rkrishna Mishra
 
All VLSI programs
Gouthaman V
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Ricardo Castro
 
O046038489
IJERA Editor
 
The Cortisol Awakening Response Using Modified Proposed Method of Forecasting...
IJERA Editor
 
On Semi-Invariant Submanifolds of a Nearly Hyperbolic Kenmotsu Manifold with ...
IJERA Editor
 
Ground Improvement of Dune Sand Fields For The Purpose of Moisture Retention
IJERA Editor
 
Q04602106117
IJERA Editor
 
Preparation and Investigation on Properties of Cryogenically Solidified Nano ...
IJERA Editor
 
Recognizing Celebrity Faces in Lot of Web Images
IJERA Editor
 
Ad04603175180
IJERA Editor
 
Structure Analysis of a Turbocharger Compressor Wheel Using FEA
IJERA Editor
 
Ad

Similar to Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDL (20)

PDF
An Implementation of I2C Slave Interface using Verilog HDL
IJMER
 
PPT
I2C Protocol
Anurag Tomar
 
PPT
I2C PRESENTATION.PPT
venkatesh405785
 
PPTX
Slow peripheral interfaces (i2 c spi uart)
PREMAL GAJJAR
 
PDF
I2C Bus (Inter-Integrated Circuit)
Varun Mahajan
 
PDF
An hemmanur
Sangeetha Marikkannan
 
PPTX
I2c buses
Naveen Dubey
 
PPTX
Inter intergrated circuits-communication protocol
Revathi Subramaniam
 
PPTX
I2C introduction
SUNODH GARLAPATI
 
PPTX
seial pheripheral interface and inter integrated circuitsi2c.pptx
PrasannaK63
 
PPTX
I2c protocol - Inter–Integrated Circuit Communication Protocol
Ankur Soni
 
PPTX
I2C presentation for Microcontrollers and Microprocessors
baileyhannahlooper
 
DOCX
project 3 full report
Shubham Shivhare
 
PPTX
INTRODUCTION TO INTER INTEGRATED CIRCUIT PROTOCOL
karimzidan7474
 
PPTX
Peripherals and interfacing
RAMPRAKASHT1
 
PDF
ijseas20150367
Chinmay Modi
 
PDF
Ijet12 04-04-020
Megha Panchariya
 
PPTX
I2 c communication protocol
ShankaranarayanaBarr
 
PPTX
COM_BASIC.pptx
BhagvatShukla
 
PPTX
Part-2: Mastering microcontroller with embedded driver development
FastBit Embedded Brain Academy
 
An Implementation of I2C Slave Interface using Verilog HDL
IJMER
 
I2C Protocol
Anurag Tomar
 
I2C PRESENTATION.PPT
venkatesh405785
 
Slow peripheral interfaces (i2 c spi uart)
PREMAL GAJJAR
 
I2C Bus (Inter-Integrated Circuit)
Varun Mahajan
 
I2c buses
Naveen Dubey
 
Inter intergrated circuits-communication protocol
Revathi Subramaniam
 
I2C introduction
SUNODH GARLAPATI
 
seial pheripheral interface and inter integrated circuitsi2c.pptx
PrasannaK63
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
Ankur Soni
 
I2C presentation for Microcontrollers and Microprocessors
baileyhannahlooper
 
project 3 full report
Shubham Shivhare
 
INTRODUCTION TO INTER INTEGRATED CIRCUIT PROTOCOL
karimzidan7474
 
Peripherals and interfacing
RAMPRAKASHT1
 
ijseas20150367
Chinmay Modi
 
Ijet12 04-04-020
Megha Panchariya
 
I2 c communication protocol
ShankaranarayanaBarr
 
COM_BASIC.pptx
BhagvatShukla
 
Part-2: Mastering microcontroller with embedded driver development
FastBit Embedded Brain Academy
 
Ad

Recently uploaded (20)

PDF
William Stallings - Foundations of Modern Networking_ SDN, NFV, QoE, IoT, and...
lavanya896395
 
PPT
FINAL plumbing code for board exam passer
MattKristopherDiaz
 
PDF
CLIP_Internals_and_Architecture.pdf sdvsdv sdv
JoseLuisCahuanaRamos3
 
PDF
Authentication Devices in Fog-mobile Edge Computing Environments through a Wi...
ijujournal
 
PPTX
Functions in Python Programming Language
BeulahS2
 
PDF
Plant Control_EST_85520-01_en_AllChanges_20220127.pdf
DarshanaChathuranga4
 
PPTX
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
PPTX
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
PDF
Tesia Dobrydnia - An Avid Hiker And Backpacker
Tesia Dobrydnia
 
PDF
How to Buy Verified CashApp Accounts IN 2025
Buy Verified CashApp Accounts
 
PDF
Module - 5 Machine Learning-22ISE62.pdf
Dr. Shivashankar
 
PDF
Artificial Neural Network-Types,Perceptron,Problems
Sharmila Chidaravalli
 
PPTX
darshai cross section and river section analysis
muk7971
 
PPTX
Comparison of Flexible and Rigid Pavements in Bangladesh
Arifur Rahman
 
PDF
Python Mini Project: Command-Line Quiz Game for School/College Students
MPREETHI7
 
DOCX
Engineering Geology Field Report to Malekhu .docx
justprashant567
 
PDF
A Brief Introduction About Robert Paul Hardee
Robert Paul Hardee
 
PDF
NFPA 10 - Estandar para extintores de incendios portatiles (ed.22 ENG).pdf
Oscar Orozco
 
PPTX
Artificial Intelligence jejeiejj3iriejrjifirirjdjeie
VikingsGaming2
 
PPTX
Alan Turing - life and importance for all of us now
Pedro Concejero
 
William Stallings - Foundations of Modern Networking_ SDN, NFV, QoE, IoT, and...
lavanya896395
 
FINAL plumbing code for board exam passer
MattKristopherDiaz
 
CLIP_Internals_and_Architecture.pdf sdvsdv sdv
JoseLuisCahuanaRamos3
 
Authentication Devices in Fog-mobile Edge Computing Environments through a Wi...
ijujournal
 
Functions in Python Programming Language
BeulahS2
 
Plant Control_EST_85520-01_en_AllChanges_20220127.pdf
DarshanaChathuranga4
 
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
Tesia Dobrydnia - An Avid Hiker And Backpacker
Tesia Dobrydnia
 
How to Buy Verified CashApp Accounts IN 2025
Buy Verified CashApp Accounts
 
Module - 5 Machine Learning-22ISE62.pdf
Dr. Shivashankar
 
Artificial Neural Network-Types,Perceptron,Problems
Sharmila Chidaravalli
 
darshai cross section and river section analysis
muk7971
 
Comparison of Flexible and Rigid Pavements in Bangladesh
Arifur Rahman
 
Python Mini Project: Command-Line Quiz Game for School/College Students
MPREETHI7
 
Engineering Geology Field Report to Malekhu .docx
justprashant567
 
A Brief Introduction About Robert Paul Hardee
Robert Paul Hardee
 
NFPA 10 - Estandar para extintores de incendios portatiles (ed.22 ENG).pdf
Oscar Orozco
 
Artificial Intelligence jejeiejj3iriejrjifirirjdjeie
VikingsGaming2
 
Alan Turing - life and importance for all of us now
Pedro Concejero
 

Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDL

  • 1. Sansar Chand Sankhyan Int. Journal of Engineering Research and Applications www.ijera.com ISSN : 2248-9622, Vol. 4, Issue 7( Version 4), July 2014, pp.67-70 www.ijera.com 67|P a g e Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDL Sansar Chand Sankhyan M.tech(VLSI),Department of EECEITM University, Gurgaon,Haryana,India ABSTRACT In most of the applications, the physical systems require a real-time operation to interface high speed constraints. In most of the applications, the physical systems require a real-time operation to interface high speed constraints. The Inter Integrated Circuits (I2C) is a 2-wireed communication bus. Physically, it consists of 2 active wires: SDA (Serial Data), SCL (Serial Clock) and a ground connection. All I2C-bus compatible devices incorporate an on-chip interface which allows them to communicate directly with each other via the I2C-bus. This paper focuses on the software implementation for I2C Driver and its interfacing with RAM. Specifically, this paper describes in detail an I2C Master connected to I 2C Slave using an I2C bus. The I2C protocol was given by Philips Semiconductors for faster devices to communicate with slower devices and each other without data loss. The complete module is designed in VHDL and simulated in Xilinx ISE 14.5. KEYWORDS:SCL, SDA, I2C Bus, RAM I. INTRODUCTION: The design of I2C bus controller is to interface between two devices for the purpose of communication. The presence an on chip RAM support for a data communication between the chip and a host computer to send data on the RAM. To minimize the system-level interconnect between integrated devices, I propose to transmit the contents of the RAM storing the results back to a host computer via a serial bus, the I2C Interface. The interconnect integrated circuit bus commonly known as the I2C bus which is a bi-directional, two-wire and serial communication standard protocol. The designed are simple but difficult for efficient integrated circuit (IC) control. The system is comprised of two bus lines, SCL (Serial Clock) and SDA (Serial Data). Standard I2C devices operate up to 100Kbps, while fast-mode devices operate at up to 400Kbps. Most of the I2C devices available today support 400Kbps operation. II. LITERATURE SURVEY: There are many reasons for using serial interface design much more important application includes serial communication like sensors communication with personal computer. Many common embedded system peripherals, such as anolog-to-digital and digital-to-anlaog convetors, LCDs, and temperature sensors, support serial interfaces. Serial interface allow processors to communicate without the need for shared memory and the problems they can create. There are Serial communication protocols like UART, CAN, USB,SPI, Inter IC. USB, SPI and UARTS are all just one type to point type protocol. USB uses multiplexer to communicate with other devices. Only I2C and CAN protocol uses software addressing. But only I2C is very simple to design and easy to maintain. Table 1. Comparison of different protocols III. I2C BUS TERMINOLOGY:  Transmitter:The device which sends the data or message to the receiver.  Receiver:The device which receives the data or message from the bus.  Master:The device which generates clock signals, initiates a transfer i.e. start condition and terminates a transfer i.e. stop condition. It may also act as a transmitter/receiver.  Slave:The device addressed by a master. Also it may act as a transmitter/receiver.  Multi master:More than one master can attempt control the bus at the same time without demeaning thedata/message.  Arbitration:It is a procedure to ensure that, if more than one master simultaneously tries to RESEARCH ARTICLE OPEN ACCESS
  • 2. Sansar Chand Sankhyan Int. Journal of Engineering Research and Applications www.ijera.com ISSN : 2248-9622, Vol. 4, Issue 7( Version 4), July 2014, pp.67-70 www.ijera.com 68|P a g e control the bus, only oneis allowed to do so and the data is not corrupted.  Synchronization:It is a procedure to synchronize the clock signals of two or more devices. Figure 1. I2C bus configuration using masters and slaves 3.1 Master and Slave: A master is the device which initiates a data transfer on the bus and generates theclock signals to permit that transfer. At that time, any device addressed is considered a slave.Both lines are connected to a positive supply via a pull-up resistor, and remain HIGH whenthe bus is not busy. Each device is recognized by a unique address—whether it is amicrocomputer, LCD driver, memory or keyboard interface—and can operate as either atransmitter or receiver, depending on the function of the device. A device generating amessage or data is a transmitter, and a device receiving the message or data is a receiver.Obviously, a passive function like an LCD driver could only be a receiver, while amicrocontroller or a memory can both transmit and receive data. When a data transfer takesplace on the bus, a device can either be a master or a slave. The device which initiates thetransfer, and generates the clock signals for this transfer, is the master. At that time anydevice addressed is considered a slave. It is important to note that a master could either be atransmitter or a receiver; a master microcontroller may send data to a RAM acting as atransmitter, and then interrogate the RAM for its contents acting as a receiver in both casesperforming as the master initiating the transfer. In the same manner, a slave could be both areceiver and a transmitter. The I2C is a multi master bus. It is possible to have, in one system; microcontroller may act as a master for one transfer, and then be theslave for another transfer, initiated by another processor on the network. The master/slave relationships on thebus are not permanent, and may change on each transfer. 3.2 Data Validity: One data bit is transferred must remain stable during the HIGH period of the clock pulse in order to be valid. Changes in the data line at this time will be interpreted a eight bits long, is transferred serially with the most significant bit first, and is followed by an acknowledge bit. The clock pulse related to the acknowledge bit is generated by the master. Figure2 Data validity condition 3.3 Byte format Data Transfer: Every byte put on the SDA line must be 8 bits transmitted per transfer is unrestricted. Each byte has to be followed by an Acknowledge bit. Data is transferred with the Most Significant Bit (MSB) first. If a slave cannot receive or transmit another complete byte of data until it has performed other function, for example servicing an internal interrupt, it can hold the clock line SCL LOW to force the master into a wait state. Data transfer then continues when the slave is ready for another byte of data and releases clock line SCL Figure 3 Data transfer on the I2C bus [7] IV. I2C Protocol: Normally, a standard communication protocol consists of four parts: 1) START signal generation 2) Slave address transfer 3) Data transfer 4) STOP signal generation 4.1 Transmitting a byte to a slave device: After start condition has been sent, a byte can be transmitted to a slave by the master. This first byte after a startcondition will identify the slave on the bus (address) and will select the mode of operation. The meaning of all following bytes depends on the slave.
  • 3. Sansar Chand Sankhyan Int. Journal of Engineering Research and Applications www.ijera.com ISSN : 2248-9622, Vol. 4, Issue 7( Version 4), July 2014, pp.67-70 www.ijera.com 69|P a g e Figure 4 Transmission of a byte to a slave [8] 4.2 Receiving a byte from a slave device: Once the slave has been addressed and the slave has acknowledged this, a byte can be received from the slave if the R/W bit in the address was set to READ (set to '1'). Figure 5 Reception of a byte from a slave [8] 4.3 Design steps: The functional description of I2C master has to be described in the VHDL language. Thatis called design module / core.The test bench program has to be developed to test the design module. The test benchgives the input to the design module & verifies the outputs. The test bench has to bewritten in such way to check the design module in all possible conditions. V. SYSTEM ARCHTECTURE: Figure 6I2C and RAM interface system architecture In this paper we are considering master as I2C controller and slave as SDRAM. 5.1 Top-Level Signal Descriptions: Figure 7 RTL schematic of designed I2C master controller Table-1 provides descriptions of the input/output signals of the I2C bus Master controller. The address bus is a 3-bit input pin to the I2C master controller. The data input to the master controller is 8-bit and data output from the master controller is also 8 bit. Serial data line (SDA) and Serial click line (SCL) both are out pins between the master controller and slave devices. RD and WR both are input pins to the master controller form microprocessor. Table 2. Signal Description of I2C Master Controller [7] 5.2 Process Algorithm: The complete process of data transfer form master to slave and vice-versa is shown below in Figure 7in form of a algorithm .
  • 4. Sansar Chand Sankhyan Int. Journal of Engineering Research and Applications www.ijera.com ISSN : 2248-9622, Vol. 4, Issue 7( Version 4), July 2014, pp.67-70 www.ijera.com 70|P a g e Figure 8 Process flow of I2C controller [8] 5.3 Advantages OF I2C 1. Used for security sensitive applications like sensor connections, RFID, biometric devices, etc 2. Common communication standards between microcontrollers and sensors 3. Each device is recognised by its unique address and can operate as either a transmitter or receiver, depending upon thefunction of the device. 4. It Provides enhance security system 5. Compatible with FPGA VI. SIMULATION RESULTS: The VHDL code for I2C master controller is compiled in the Xilinx ISE 14.5 software tool. The test bench of this module is simulated and followings are the results. Figure 9 Simulation result of write and read operation in I2C and RAM interface VII. CONCLUSION: The simulation results showed that all the designed functional blocks of the system design are giving desired results and the system itself also giving the desired results. The interfacing done between the I2C master controller and RAM slave is successfully designed and is giving desired results. The design module is designed using is done using VHDL. If the designer wants to design the module for any new technology than he only needs give the design to the logic synthesis tool as input and in result it will create the new gate level net list and the tool itself optimize the timing and area for new technology. References: [1] The I2C -Bus specifications version 2.1 January,2000http://www.semiconductors.philips.com/buses/i2c. [2] UM10204 I2C -bus specification and user manual Rev. 03 — 19 June 2007 [3] I2C bus Inter Integrated Circuits bus by Philips Semiconductors. [4] Embedded Platform Excalibur Altera, http://www.altera.com. [5] PCF 8584, I2C bus controller datasheet,http://www.semiconductor.philips. com [6] www.latticesemi.com, I2C Master Controller reference design [7] Arvind Sahu, Ravi Shankar Mishra, Puran Gour, “Design and Interfacing of High speed model of FPGAS using I2C protocol”,Int.J.Com.Tech.Appl.vol2(3),531- 536 [8] Shoaib.Shah Sobhan, Sudipta. Das andIqbalur. Rahman, “Implementation of I2C using System Verilog and FPGA”,ICAEPE,2011. [9] Jayant Mankar et. al, “Review of I2C Protocol,” International Journal of Research in Advent Technology, vol. 2, issue 1, January 2014, pp.474-479. [10] A.K. Oudjida, M.L. Berrandjia, R. Tiar, A.Liacha, K. Tahraoui, with “FPGA Implementation of I2c & SPI Protocols: A Comparative Study” Electronics, Circuits, and Systems, 2009. ICECS.