Design and Implementation of I2c master controller on FPGA using VHDL

Similar documents
Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

Using the HT46R46 I/O Ports to Implement Half-Duplex SPI Communication

Lab 1: Introduction to Xilinx ISE Tutorial

How To Fix A 3 Bit Error In Data From A Data Point To A Bit Code (Data Point) With A Power Source (Data Source) And A Power Cell (Power Source)

Embedded Ethernet Interface Using Arm Processor

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

FPGA Implementation of System-on-chip (SOC) Architecture for Spacecraft Application

Embedded Systems Design Course Applying the mbed microcontroller

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

Chapter 2 Logic Gates and Introduction to Computer Architecture

Design and Functional Verification of A SPI Master Slave Core Using System Verilog

Implementing SPI Communication Between MSP430 G2452 and LTC ADC

Data Transfer between Two USB Devices without using PC

USER GUIDE EDBG. Description

Arbitration and Switching Between Bus Masters

Serial port interface for microcontroller embedded into integrated power meter

Design and Verification of Nine port Network Router

Integration of Arduino as a slave system to LonWorks based System using I2C Interface

Project 4: Pseudo USB Simulation Introduction to UNIVERSAL SERIAL BUS (USB) STANDARD

Part 1. MAX BIT DAC with an Arduino Board. MIDI to Voltage Converter Part1

CHAPTER 11: Flip Flops

Elettronica dei Sistemi Digitali Costantino Giaconia SERIAL I/O COMMON PROTOCOLS

Post-Configuration Access to SPI Flash Memory with Virtex-5 FPGAs Author: Daniel Cherry

Application Note 83 Fundamentals of RS 232 Serial Communications

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

System on Chip Platform Based on OpenCores for Telecommunication Applications

Floating Point Fused Add-Subtract and Fused Dot-Product Units

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

TERMINAL Debug Console Instrument

Counters and Decoders

The implementation of FPGA for data transmission between ADC and DSP peripherals in the measurement channels for power quality assessment

CONSTRAINT RANDOM VERIFICATION OF NETWORK ROUTER FOR SYSTEM ON CHIP APPLICATION

TRUE SINGLE PHASE CLOCKING BASED FLIP-FLOP DESIGN

Solutions for Increasing the Number of PC Parallel Port Control and Selecting Lines

Bluetooth to serial HC-06 wireless module

Chapter 13. PIC Family Microcontroller

Pre-tested System-on-Chip Design. Accelerates PLD Development

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS

LogiCORE IP AXI Performance Monitor v2.00.a

A Compact FPGA Implementation of Triple-DES Encryption System with IP Core Generation and On-Chip Verification

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Implementation of Modified Booth Algorithm (Radix 4) and its Comparison with Booth Algorithm (Radix-2)

USB - FPGA MODULE (PRELIMINARY)

SafeSPI - Serial Peripheral Interface for Automotive Safety

Implementing MOD bus and CAN bus Protocol Conversion Interface

Measurement and Analysis Introduction of ISO7816 (Smart Card)

Two-Phase Clocking Scheme for Low-Power and High- Speed VLSI

Lizy Kurian John Electrical and Computer Engineering Department, The University of Texas as Austin

International Journal of Advancements in Research & Technology, Volume 2, Issue3, March ISSN

Using Xbee in Serial Communication

Serial Communications

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Lecture-3 MEMORY: Development of Memory:

Modeling Registers and Counters

FPGA INTEGRATION MANUAL SATURN-SIL 2 MODULES. Dictionary Code. Edition 01. Revision 00. Number of pages 18

Atmel Norway XMEGA Introduction

HARDWARE IMPLEMENTATION OF TASK MANAGEMENT IN EMBEDDED REAL-TIME OPERATING SYSTEMS

Manchester Encoder-Decoder for Xilinx CPLDs

VHDL DESIGN OF EDUCATIONAL, MODERN AND OPEN- ARCHITECTURE CPU

MicroMag3 3-Axis Magnetic Sensor Module

Design and Implementation of Vending Machine using Verilog HDL

SPI I2C LIN Ethernet. u Today: Wired embedded networks. u Next lecture: CAN bus u Then: wireless embedded network

Implementation and Design of AES S-Box on FPGA

SDLC Controller. Documentation. Design File Formats. Verification

A Master-Slave DSP Board for Digital Control

Software User Guide UG-461

Design and Implementation of an On-Chip timing based Permutation Network for Multiprocessor system on Chip

Lab Experiment 1: The LPC 2148 Education Board

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

AC : PRACTICAL DESIGN PROJECTS UTILIZING COMPLEX PROGRAMMABLE LOGIC DEVICES (CPLD)

Pmod peripheral modules are powered by the host via the interface s power and ground pins.

INTERNATIONAL JOURNAL OF ELECTRONICS AND COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET)

RS485 & RS422 Basics

Interfacing Credit Card-sized PCs to Board Level Electronics

Chapter 6: From Digital-to-Analog and Back Again

A New Paradigm for Synchronous State Machine Design in Verilog

The components. E3: Digital electronics. Goals:

Serial Communications

16-bit ALU, Register File and Memory Write Interface

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

HDL Simulation Framework

International Journal of Scientific & Engineering Research, Volume 4, Issue 6, June ISSN

Cascaded Counters. Page 1 BYU

SPI Flash Programming and Hardware Interfacing Using ispvm System

Open Flow Controller and Switch Datasheet

Manual Serial PCI Cards

2. TEACHING ENVIRONMENT AND MOTIVATION

Lab 1: Full Adder 0.0

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

Speed Control of Induction Motor using VHDL Implementation of PWM Technique

ANYTIME ANYPLACE-REMOTE MONITORING OF STUDENTS ATTENDANCE BASED ON RFID AND GSM NETWORK

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

Welcome to the Introduction to Controller Area Network web seminar My name is William Stuart, and I am a Applications Engineer for the Automotive

Adding SDIO Wi-Fi Solution to i.mx Windows CE 5.0/Windows CE 6.0

Memory Elements. Combinational logic cannot remember

RS-485 Protocol Manual

Raspberry Pi. Hans- Petter Halvorsen, M.Sc.

Use of modern telephone network for time transfer: An innovation

Transcription:

Design and Implementation of I2c master controller on FPGA using VHDL Prof. Jai Karan Singh HOD Electronics and Communication Prof. Mukesh Tiwari Dean Academic Vishal Sharma Dept. of Electronic and Communication Abstract - The focus of this paper is on I2C protocol following master controller. This controller is connected to a microprocessor or computer and reads 8 bit instructions following I2C protocol. The instructions are then processed and converted to instructions which follow SPI protocol. 32 bit register is designed to send data serially as per SPI instructions. The complete module is designed in VHDL and simulated in ModelSIM. The design is also synthesized in Xilinx XST 12.1 and optimized for area and power. This concept is widely applicable where a microprocessor wants to communicate with SPI device. This module acts as a slave for the microprocessor at the same time acts like a master for the SPI device which can be considered as a slave. This design is customized for slowing the data rate according to SPI device, which assures no data loss. Keywords: I2C; Handshaking; Master & slave; Serial data transfer ; ISP. I Introduction In the world of multiple application based product it is very much a mandatory to have multiple devices connected to a system, this includes peripherals following different communication protocols as well. This requirement give rise to the need for an intermediate system which can act as a bridge between 2 devices following different communication protocols. This is where I2C master controller design is very useful. Today a system is connected to a number of devices and make the communication smooth and fast, I2C protocol is considered as one of the very best. But there are number of devices which follow SPI protocol as well. So such devices can be considered as a slave. The I2C master controller on one end is connected to a PC or microprocessor, and on the other end it will be connected to the SPI slave. Its main function will be, to understand the control register transmitted by PC and convert it into SPI control signals. The functional block in Fig.1. Demonstrates the overview of the functionality of the I2C master controller. Fig.1. Functional Block II Register Description There are 6 control registers and a data register. Each control register corresponds to SPI control register. The first register corresponds to SPI status register. Second set of 8 bits are dedicated for write operations which also includes interrupt signals for write and read operations. ISSN : 0975-4024 Vol 4 No 4 Aug-Sep 2012 162

Third set of 8 bits are dedicated to read operations only 2 bits of this registers are used as bus busy and abort read signals and rest of the bits are tied to 0. Fourth and fifth set of 8 bits corresponds to 1 st control register and 2 nd control register of SPI respectively. Finally sixth set of 8 bits corresponds to baud rate register of SPI. III Implementation The PC connected to the controller sends data serially and every 8 bits corresponds a value specified by the i2c protocol. The address and the chip select signal selects the I2C device. In this design both chip select and address of the device are default to 1, as the design is for a specific slave only. Every set of 8 bits which corresponds to a control registers which controls the flow of data, is stored in registers. A counter is initialized after successful transmission of 8 bits from the PC to the controller. As the complete set of control registers are transmitted, all the values of the registers are inverted and stored in a 32 bit register. 32 bit registers are decided on the basis of SPI slave as there are only 4 control register before the data register. Every bit of the 32 bit register corresponds to a specific signal of SPI protocol. Once the 32 bit register is fed by the corresponding registers, the serial transmission takes place, which is the MOSI input of the SPI slave. A clock signal is also transmitted to the SPI slave as SCLK which acts the main clock for the slave. IV Results The following Fig.2. is the simulation results of I2C master controller. This result shows successful storage of data transmitted by the master on the mentioned address location. ISSN : 0975-4024 Vol 4 No 4 Aug-Sep 2012 163

Fig. 2. Simulation result ISSN : 0975-4024 Vol 4 No 4 Aug-Sep 2012 164

Fig.3. Shows the Technology tree of the I2C master controller Fig.3. Technology Tree ISSN : 0975-4024 Vol 4 No 4 Aug-Sep 2012 165

Table no1 Shows the Design Summary of the I2C master controller. Table no 1. Design Summary The result shows that minimal resources are utilized in designing the I2C master as only 1 % slices, 1% flip flops and 1% LUTs are utilized. V Future Scope & Conclusion The design of i2c master controller has immense applications in future as the number of devices connected to a system is only going to increase. So there is always a need for a system which supports multiple protocols. In all these situations, I2C master controller acts as a great support and will be a key in future design to support multiple parallel functions. I2C master controller is successfully designed in VHDL and simulated in ModelSIM. Simulation results verify that the communication has been established between the microprocessor and the controller. Data processed and the output has been successfully verified as per SPI slave input. The design meets timing constraints and there are no timing violations. And all these have been achieved with minimal utilization of resources. References [1] A.K. Oudjida, M.L. Berrandjia, R. Tiar, A.Liacha, K. Tahraoui, FPGA Implementation of I2c & SPI Protocols: A Com-parative Study Electronics, Circuits, and Systems, 2009. ICECS 2009 [2] A.K. Oudjida et al, Master-Slave Wrapper Communication Protocol: A Case Study, Proceedings of the 1st IEEE International Computer Systems and Information Tec-hnology Con-ference ICSIT 05, pp 461-467, 19-21 July 2006, Algiers, Algeria. [3] F. Leens, An Introduction to I2C and SPI Protocols, IEEE Instrumentation & Measurement Magazine, pp. 8-13, February 2009. [4] J.M. Irazabel & S. Blozis, Philips Semiconductors, I2C-Manual, Application Note, ref. AN10216-0, March 2003. [5] M.D. Anu, I2C to SPI Bridge, AN49217 Cypress application note, October 2008. [6] P. Myers, Interfacing Using Serial Protocoles: Using SPI and I2C.Available: http://intranet.daiict.ac.in/~ranjan/esp2005/paper/i2c_spi_341.pdf [7] Philips Semiconductors, The IIC-Bus Specifications, version 2.1, January 2000. [8] R. Hanabusa, Comparing JTAG, SPI and I2C, Spansion s application note, pp. 1-7, revision 01, April 2007. ISSN : 0975-4024 Vol 4 No 4 Aug-Sep 2012 166