Export to GitHub

the-bus-pirate - issue #3

I2C protocol sniffer


Posted on Mar 31, 2009 by Happy Giraffe

Add a macro to the I2C library that reads activity from a bus and prints it to the terminal until stopped with escape.

Since the hardware I2C module doesn't work this will be a bit challenging, fortunately I2C isn't a high-speed protocol. Best solution is probably to use the pin change notification interrupts to detect start and stop sequences, and clock in the bits. This will need a buffer to hold decoded bytes while the Bus Pirate converts the raw values to ASCII characters for display.

Comment #1

Posted on Apr 28, 2009 by Happy Giraffe

(No comment was entered for this change.)

Comment #2

Posted on Apr 28, 2009 by Happy Giraffe

Added a function to I2C.c that starts to outline a I2C sniffer. The idea is to poll the pin change notification using the new periodic service command (see SPI.c).

The function will: Check for change notice, Check for start or stop condition, reset the state machine, In a state machine, collect data or ACK, display on terminal.

This really needs the terminal TX buffer described in issue 22: http://code.google.com/p/the-bus-pirate/issues/detail?id=22

Comment #3

Posted on Nov 4, 2009 by Happy Giraffe

(No comment was entered for this change.)

Comment #4

Posted on Aug 15, 2010 by Happy Giraffe

(No comment was entered for this change.)

Comment #5

Posted on May 26, 2011 by Happy Monkey

Comment deleted

Comment #6

Posted on May 26, 2011 by Happy Giraffe

It is really flaky past 100KHz, it is a known issue.

Status: Verified

Labels:
Type-Enhancement Priority-Medium