ATAVRSBIN1 and Bus Pirate

So in my last post I was telling you how I managed to mess up the ATAVRSBIN1 I got from Atmel during a crash with the quad. After the crash I noticed it didn’t respond any more so I hooked it to my Bus-Pirate and the result of a search on the bus was not pretty, no device found:

I2C>(1)
Searching I2C address space. Found devices at:
Warning: *Short or no pull-up

But I figured maybe one or two of the chips (ITG3200, AK8975 and BMA150)survived and the other one who got damaged is keeping the bus low, or shorted or whatever. So I decided to de-solder the chips one by one to find if any still works. I started with the ITG3200 gyro, removed it and the same error, no device found, next I continued with the BMA150 accelerometer and success!:

I2C>(1)
Searching I2C address space. Found devices at:
0x18(0x0C W) 0x19(0x0C R)

When there was only the AK8975 magnetometer left it replied. I also tried soldering back the ITG3200 but it didn’t work. So I was only left with the AK8975 but that’s useful for comparing with the other magnetometer that I’m working with the LSM303DLHC from STmicro. I guess you could call this whole incident a stress test and I’ve determined that out of the 3 chips only the AK8975 survived in conditions above its maximum ratings :).

Now for reading something out of the sensors I tried reading the WIA register which holds a fixed value(0x48 as mentioned in the datasheet) set during manufacturing. The WIA register is at 0x00 address so start by writing the address of the register then perform 1 read:

I2C>[0x18 0x00]
I2C START BIT
WRITE: 0x18 ACK
WRITE: 0x00 ACK
I2C STOP BIT

next perform 1 read:

I2C>[0x19 r]
I2C START BIT
WRITE: 0x19 ACK
READ: 0x48
NACK
I2C STOP BIT

And the returned value 0x48 matches the one from the datasheet. I’ve gotta say the BP helped allot during this debug session and it would’ve been much harder without it.