After a question in another thread, regarding intermittent COMPASS results, I decided to start a new one.
When the COMPASS worked ok, including all settings and calculations, to get 0-359DEG, up until I added it into the MAIN program where it went intermittent.
When I wrote the settings, I had to choose which MODE setting to use, I chose CONTINUOUS MODE, and 100MHz.
Thinking about it, the above setting tells me that the AK8963C could be LOOPing at 100MHz, which would mean timing, and perhaps a timing error.
Today, using the MAGMASTER test rig I have with, only a dedicated COMP program on it, I'm going to first try changing to 8MHz choice and watch the DRDY. Then I'll try using the DRDY, on SINGLE MODE with a WEND WAIT, and see what happens.
EDIT: MAGMASTER HERE: https://diydrones.com/m/blogpost?id=705844:BlogPost:1676387&maxDate=2017-03-14T18:01:50.202Z
NOTE: I'm not using the suggested HMC5883L module, but the AK8963C chip independently.
Camerart.
Hi J and E,How does the compass fail?
Are you using the SW or HW Spi?
A simple test could be to rotate the compass in for example 30 degrees steps and record the x, y values.
Show the compass part of the software.
When the COMPASS worked ok, including all settings and calculations, to get 0-359DEG, up until I added it into the MAIN program where it went intermittent.
When I wrote the settings, I had to choose which MODE setting to use, I chose CONTINUOUS MODE, and 100MHz.
Thinking about it, the above setting tells me that the AK8963C could be LOOPing at 100MHz, which would mean timing, and perhaps a timing error.
Today, using the MAGMASTER test rig I have with, only a dedicated COMP program on it, I'm going to first try changing to 8MHz choice and watch the DRDY. Then I'll try using the DRDY, on SINGLE MODE with a WEND WAIT, and see what happens.
EDIT: MAGMASTER HERE: https://diydrones.com/m/blogpost?id=705844:BlogPost:1676387&maxDate=2017-03-14T18:01:50.202Z
NOTE: I'm not using the suggested HMC5883L module, but the AK8963C chip independently.
Camerart.
Attachments
-
194.4 KB Views: 6
Last edited: