Thread: I2c Sniffer
View Single Post
  #3   Report Post  
Posted to alt.binaries.schematics.electronic
TT_Man TT_Man is offline
external usenet poster
 
Posts: 33
Default I2c Sniffer


"Eeyore" wrote in message
...


TT_Man wrote:

Does anyone have a circuit for this, pref with AVR. I just need a simple
trap to catch the first Command byte- 0x Axxxx usually and then do
nothing
until the next start command.


It's not a circuit you want, it's code.

Graham


Yes, it is.... I have tried with a tiny2313 @8Mhz, but there is something
wrong with my logic as it generates multiple instances of the start
detection and I just can't figure it out.
I wanted to detect the start condition, then skip 6 clock pulses to get to
command bit 2, detect whether that bit is a 0 or a 1. Then skip and detect
the Ack ck pulse(9),then return to search for another start condition.
I'm assuming that there is adequate delay between data going low and clock
going low to detect the start bit...
I did try implementing a parallel test circuit using a 7474 to detect the
start and generate a pulse, but ended going round in circles. I suppose a
logic analyser/digital scope would help, but I have neither so fault finding
is limited to the tiny generating 'test pulses'.
Maybe I'm asking the impossible and it can ONLY be done reliably in
hardware...
I can't/don't want to go to the expense of an AVR that has inbuilt twi...