Git Product home page Git Product logo

i2c-sniffer-100kbaud-arduino-mega's Introduction

i2c-sniffer-100kBaud-Arduino-Mega

This Arduino Mega sketch uses direct port read and bit manipulations to sniff an i2c bus running at up to 100 kHz.

The analysis of the i2c communication is displayed on the Serial monitor.

Connect SDA to pin 30 of the Arduino Mega, and SCL to pin 31.

The Aduino is not fast enough to acquire and display the data at the same time. This is usually not a problem because the i2c access normally happens in bursts. Set TIMEOUT longer than the maximum length of one burst, but shorter than the time beween bursts minus the time required to analye and display the data.

Example: maximum time of one i2c burst 300 msec. Time between bursts: 3000 msec. Time to analyze and display data of one burst: 100 msec. In this example TIMEOUT can be set between 300 msec and 2900 msec

If you don't know anything about the i2c activity, set the timeout initially to a large value, for example 10000 msec. This means that the sampling will go on for 10000 msec after a first i2c start condition has been observed.

A sample output https://github.com/rricharz/i2c-sniffer-100kBaud-Arduino-Mega/blob/master/sniffer.txt is enclosed.

Please open an issue in this repository if you have any problem with the program.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

i2c-sniffer-100kbaud-arduino-mega's People

Contributors

rricharz 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.