Hello everyone,
So I was waiting and waiting, and decided to do it my self. I managed to write a code and macros for TWI (I2C) hardware. I attached the CAL file
and specific macros for I2C component, which you have to import, and also a modified defines function.
The problem is very strange, some of the sensors like BMA180 accelerometer is replying, and in my software when checking for online sensors, it goes well and does not cause any errors, on the other hand ITG-3200 gyro is replying it's ID correctly when looking at the logic analyzer but the program senses that it's not online and gives an error message. I was trying to make a Receive function with the pointers, but had some issues, so instead I used a global array variable rdata[22] to collect the receive register data. My suspicion is that somehow the register values are not assigned to the global array variable. See the logic analyzer screenshots. The ITG-3200 ID is 0x69 and BMA180 ID is 0X03. The clock speed is set to 320kHZ (software clock goes only to 100kHz at best when setting delay in CAL file to 0). In software mode all sensors work fine.
PLEASE HELP TO FIND THE PROBLEM!!!!
- BMA180.jpg
- BMA180
- (160.82 KiB) Downloaded 1069 times
Science is my true religion.