Giter Site home page Giter Site logo

i2c's Introduction

I2C

The I2C (Inter-Integrated Circuit) is a widely used synchronous serial communication protocol employed to connect multiple electronic devices on a board or across boards.

Verilog Implementation

The RTL design of I2C has been implemented by using verilog. The architecture is divided into three essential modules: the Master, Slave, and the I2C top-level module that acts as the Register Interface (RIF) unit.

Architecture

The master device governs the communication flow by controlling the SCL line to generate clock pulses, synchronizing the transmission between devices. Additionally, the SDA line serves a dual-purpose: for transmitting data from the master to the slave (while labeled as MOSI in other protocols) and for the opposite direction, carrying data from the slave to the master (analogous to MISO). Alongside these essential communication lines, I2C employs a mechanism for addressing devices on the bus. Instead of a dedicated Chip Select (CS) line as in other protocols, I2C devices are uniquely addressed by the master during communication, allowing it to select specific slave devices for interaction.

Transaction Format

In I2C transactions, the acknowledgment bit's role is pivotal, confirming successful data transmission between devices. Its issuance, dependent on the transaction's direction (write or read), validates each byte's receipt during the transaction, ensuring accurate and error-free data exchange. Additionally, in read operations, a repeated start occurs post-register address to signify the transition from write to read mode, enabling subsequent data retrieval from the slave device.

  • 8-Bit Slave Address with Read/Write Bit as LSB

The transaction starts with a 8-bit address of the slave device. The LSB (Least Significant Bit) of this byte determines the operation type: a '0' for a write operation (master sending data to the slave) and a '1' for a read operation (master requesting data from the slave).

  • 8-Bit Register Address

Following the slave address, an 8-bit register address is sent. This register address specifies the internal register or memory location within the slave device where the data will be written (for write operations) or read from (for read operations).

  • 32-Bit Data

For write operations, after sending the register address, the master sends a 32-bit data payload to be written into the specified register. For read operations, the master initiates the read request, and the slave responds by sending the 32-bit data in response to the register address.

Reference

I2C Specification

i2c's People

Contributors

ammar-bin-amir avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.