I2c sniffer

Is it possible to setup an arduino as a slave on i2c which monitors and displays all traffic on the bus on the serial monitor? It should probably look at the length to decide if it a string,word or byte and process accordingly. Has anyone done this?

Jim

This is not possible with ATmegaXXX processors and the internal TWI/I2C hardware but actually possible with ATtinyXXX or others that have internal USI. The problem has to do with the address matching. In TWI/I2C the slave address match is build-in. On USI this is done in software and you can implement a monitor.

Obviously you could implement this with soft TWI on any Arduino. http://www.atmel.com/Images/doc8478.pdf

Cheers!

This project has a "i2c sniffer 2" code for ATtiny85.
http://www.avrfreaks.net/index.php?module=Freaks%20Academy&func=viewItem&item_id=1489&item_type=project
You have to log in to see it.

The ATtiny85 happens to be the same as the microcontroller for the Trinket.