-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I2C communication problems #369
Comments
Alessandro,
I don't have any experience with any of the sensors you're using, so this
may not have anything to do with your problem at all. However, I'm going to
throw out something I just ran into on another project talking to a thermal
sensor over I2C.
I could never get the thermal sensor to send me back anything (or even ack)
when I tried to do a read of its registers. It turns out that the sensor
*required* a repeated start, rather than a full stop and full start in
between the write and read phases of the I2C transaction.
So I recommend that you check the datasheets of the sensors you are using
to see if any of them require this. I believe the DTWI library has the
ability to do repeated starts, but there is something special you have to
do to tell it to use them for reads.
If you have it, can you take a detailed logic analyzer capture of a failing
I2C transaction and post it so we can download it and look at it in detail?
That usually helps find the problem.
Thanks-
*Brian
…On Mon, Oct 30, 2017 at 1:49 PM, parmiani ***@***.***> wrote:
Hello,
i have a chipkit wifire with PIC32MZ2048EFG100 mounted. I'm doig some
communication tests with an IMU 10DOF with an MPU6050, an HMC5883
magnetometer and an MS5611 barometer. I'm using library written by Jeff
Rowberg and I2C communication is managed by DTWI library. HMC5883 is
connected to the aux bus of MPU. MPU6050 responds correctly while
magnetometer does not respond. I have debugged the program checking with an
oscilloscope on the aux bus and the I2C request is present also with the
acknoledge of HMC5883, but seems the microcontroller ingnores this and does
not take the data. The address of MPU is 0x68 and that of HMC5883 is 0x1E.
Does anyone have some suggestion for me?
Thanks a lot
Alessandro
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#369>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAbeCKyloQ3ShHR_95nt_aSe2OsiUPqpks5sxho8gaJpZM4QLrNv>
.
|
Ok, thank you for the suggestion. Alessandro |
Here there are the right I2C transaction done with another board: These are the test of reading the 3 identification register of the chip (0x1E) with a burst read (0x0A the first, followed by the content of 0x0B and 0x0C). |
Hello,
i have a chipkit wifire with PIC32MZ2048EFG100 mounted. I'm doig some communication tests with an IMU 10DOF with an MPU6050, an HMC5883 magnetometer and an MS5611 barometer. I'm using library written by Jeff Rowberg and I2C communication is managed by DTWI library. HMC5883 is connected to the aux bus of MPU. MPU6050 responds correctly while magnetometer does not respond. I have debugged the program checking with an oscilloscope on the aux bus and the I2C request is present also with the acknoledge of HMC5883, but seems the microcontroller ingnores this and does not take the data. The address of MPU is 0x68 and that of HMC5883 is 0x1E.
Does anyone have some suggestion for me?
Thanks a lot
Alessandro
The text was updated successfully, but these errors were encountered: