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

PDF
Design of dual master i2 c bus controller
PDF
Serial Communication Interface with Error Detection
PDF
Review on Transmission and Reception of Data through USB in VHDL
PDF
Implementation of I2C Master Bus Protocol on FPGA
PDF
Network Based Data Acquisition and Logging System using PIC Microcontroller
PDF
Avr309 Usb
PPTX
I2C Protocol
PDF
Automatic Enable and Disable Speed Breaker
Design of dual master i2 c bus controller
Serial Communication Interface with Error Detection
Review on Transmission and Reception of Data through USB in VHDL
Implementation of I2C Master Bus Protocol on FPGA
Network Based Data Acquisition and Logging System using PIC Microcontroller
Avr309 Usb
I2C Protocol
Automatic Enable and Disable Speed Breaker

What's hot (20)

DOC
Internet Enabled Device For The Recording of Exercise Performance on Home Fit...
PDF
Documentaion of datalogger and arduino
PDF
Embedded real time-systems communication
PPT
Serial Communication
PPT
Practical Data Communications & Networking for Engineers & Technicians
PPTX
DOC
Industrial training report of embedded system and robotics
PDF
International Journal of Engineering and Science Invention (IJESI)
PPT
I2 c
PPTX
Serial Data Communication
PDF
The I2C Interface
PPTX
Serial Data Communication
PDF
communication interfaces-Embedded real time systems
PDF
COVERAGE DRIVEN VERIFICATION OF I2C PROTOCOL USING SYSTEM VERILOG
PDF
I2c interfacing raspberry pi to arduino
PDF
Implementation of Universal Asynchronous Receiver and Transmitter
PPTX
I2C BUS
PDF
Communication protocols - Embedded Systems
PPT
Internet Enabled Device For The Recording of Exercise Performance on Home Fit...
Documentaion of datalogger and arduino
Embedded real time-systems communication
Serial Communication
Practical Data Communications & Networking for Engineers & Technicians
Industrial training report of embedded system and robotics
International Journal of Engineering and Science Invention (IJESI)
I2 c
Serial Data Communication
The I2C Interface
Serial Data Communication
communication interfaces-Embedded real time systems
COVERAGE DRIVEN VERIFICATION OF I2C PROTOCOL USING SYSTEM VERILOG
I2c interfacing raspberry pi to arduino
Implementation of Universal Asynchronous Receiver and Transmitter
I2C BUS
Communication protocols - Embedded Systems
Ad

Viewers also liked (20)

DOCX
MAJOR PROJEC TVLSI
PDF
Asic implementation of i2 c master bus
PPT
FPGA Configuration
PDF
Dsd lab Practical File
PPT
PPTX
ieee projects list
PDF
Programs of VHDL
DOC
All VLSI programs
PDF
Experiment write-vhdl-code-for-realize-all-logic-gates
PDF
O046038489
PDF
The Cortisol Awakening Response Using Modified Proposed Method of Forecasting...
PDF
On Semi-Invariant Submanifolds of a Nearly Hyperbolic Kenmotsu Manifold with ...
PDF
Ground Improvement of Dune Sand Fields For The Purpose of Moisture Retention
PDF
Q04602106117
PDF
Preparation and Investigation on Properties of Cryogenically Solidified Nano ...
PDF
Recognizing Celebrity Faces in Lot of Web Images
PDF
Ad04603175180
PDF
Structure Analysis of a Turbocharger Compressor Wheel Using FEA
MAJOR PROJEC TVLSI
Asic implementation of i2 c master bus
FPGA Configuration
Dsd lab Practical File
ieee projects list
Programs of VHDL
All VLSI programs
Experiment write-vhdl-code-for-realize-all-logic-gates
O046038489
The Cortisol Awakening Response Using Modified Proposed Method of Forecasting...
On Semi-Invariant Submanifolds of a Nearly Hyperbolic Kenmotsu Manifold with ...
Ground Improvement of Dune Sand Fields For The Purpose of Moisture Retention
Q04602106117
Preparation and Investigation on Properties of Cryogenically Solidified Nano ...
Recognizing Celebrity Faces in Lot of Web Images
Ad04603175180
Structure Analysis of a Turbocharger Compressor Wheel Using FEA
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
PDF
Design and Verification of the UART and SPI protocol using UVM
PDF
Jy3717961800
DOC
Embedded two mark question
PDF
Mobile robotic platform to gathering real time sensory data in wireless perso...
PDF
ijseas20150367
PPTX
ESD Lecture-8U2.pptx Embedded systems- unit 2
PPTX
EXIDE PPT TEMPLATE.pptx
PDF
M010617376
PDF
DESIGN AND IMPLEMENTATION OF I2C AND UART BLOCK IMPLEMENTATION FOR RISC-V SOC
PDF
PDF
High speed customized serial protocol for IP integration on FPGA based SOC ap...
PDF
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
PPTX
Communication Protocols in Embedded Systems.pptx
PDF
SOCIAL NETWORK FOR SMART DEVICES USING EMBEDDED ETHERNET
PDF
Isa bus nptel
PDF
Experimental Analysis of an Energy-Efficient WSN
PPTX
COM_BASIC.pptx
PDF
Am044253258
PDF
Fpga implementation of multi protocol data
An Implementation of I2C Slave Interface using Verilog HDL
Design and Verification of the UART and SPI protocol using UVM
Jy3717961800
Embedded two mark question
Mobile robotic platform to gathering real time sensory data in wireless perso...
ijseas20150367
ESD Lecture-8U2.pptx Embedded systems- unit 2
EXIDE PPT TEMPLATE.pptx
M010617376
DESIGN AND IMPLEMENTATION OF I2C AND UART BLOCK IMPLEMENTATION FOR RISC-V SOC
High speed customized serial protocol for IP integration on FPGA based SOC ap...
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Communication Protocols in Embedded Systems.pptx
SOCIAL NETWORK FOR SMART DEVICES USING EMBEDDED ETHERNET
Isa bus nptel
Experimental Analysis of an Energy-Efficient WSN
COM_BASIC.pptx
Am044253258
Fpga implementation of multi protocol data

Recently uploaded (20)

PDF
CBCN cam bien cong nghiep bach khoa da năng
PDF
B461227.pdf American Journal of Multidisciplinary Research and Review
PPTX
Design ,Art Across Digital Realities and eXtended Reality
PPTX
1. Effective HSEW Induction Training - EMCO 2024, O&M.pptx
PDF
ST MNCWANGO P2 WIL (MEPR302) FINAL REPORT.pdf
PDF
IAE-V2500 Engine for Airbus Family 319/320
PPTX
Research Writing, Mechanical Engineering
PDF
LS-6-Digital-Literacy (1) K12 CURRICULUM .pdf
PDF
Module 1 part 1.pdf engineering notes s7
PDF
SURVEYING BRIDGING DBATU LONERE 2025 SYLLABUS
PPT
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
PPTX
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
PDF
IAE-V2500 Engine Airbus Family A319/320
PDF
The Journal of Finance - July 1993 - JENSEN - The Modern Industrial Revolutio...
PPTX
MODULE 02 - CLOUD COMPUTING-Virtual Machines and Virtualization of Clusters a...
PPTX
Soft Skills Unit 2 Listening Speaking Reading Writing.pptx
PPTX
MODULE 3 SUSTAINABLE DEVELOPMENT GOALSPPT.pptx
PDF
25AF1191PC303 MODULE-1 CHAIN SURVEYING SEMESTER III SURVEYING
PPTX
quantum theory on the next future in.pptx
PPTX
Software-Development-Life-Cycle-SDLC.pptx
CBCN cam bien cong nghiep bach khoa da năng
B461227.pdf American Journal of Multidisciplinary Research and Review
Design ,Art Across Digital Realities and eXtended Reality
1. Effective HSEW Induction Training - EMCO 2024, O&M.pptx
ST MNCWANGO P2 WIL (MEPR302) FINAL REPORT.pdf
IAE-V2500 Engine for Airbus Family 319/320
Research Writing, Mechanical Engineering
LS-6-Digital-Literacy (1) K12 CURRICULUM .pdf
Module 1 part 1.pdf engineering notes s7
SURVEYING BRIDGING DBATU LONERE 2025 SYLLABUS
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
IAE-V2500 Engine Airbus Family A319/320
The Journal of Finance - July 1993 - JENSEN - The Modern Industrial Revolutio...
MODULE 02 - CLOUD COMPUTING-Virtual Machines and Virtualization of Clusters a...
Soft Skills Unit 2 Listening Speaking Reading Writing.pptx
MODULE 3 SUSTAINABLE DEVELOPMENT GOALSPPT.pptx
25AF1191PC303 MODULE-1 CHAIN SURVEYING SEMESTER III SURVEYING
quantum theory on the next future in.pptx
Software-Development-Life-Cycle-SDLC.pptx

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.