Propeller and HMC5843
Hi guys,
Over the last year I have been working on an interesting project regarding swimming goggles and a type of head up display mechanism. It sounds very complex, but it really isn't. It essentially uses a compass module to obtain a bearing and uses LEDs as a form of output.
I have one working prototype that used Parallax's BS2 microcontroller and the HM55b compass module. As a beginner in electronics and programming I found the device easy to integrate and programme.
Currently I am working on a secondary prototype, this time minimising the electronics and making the whole device more efficient. I decided the 44-pin propeller chip was most appropriate as it had sufficient I/O's and could run at a lower voltage than the Stamp. I wanted a more accurate compass as well and selected the HMC5843.
Whilst I have made a new prototype board that is fully working I am struggling with the code. I can do simple functions such as illuminating LEDs and also make use of a pushbutton as an input.
Despite the drivers existing on the OBEX I am struggling to get the HMC5843 working. Any advice for:
i) Capturing a bearing from the HMC5843 at the push of a button.
ii)Comparing this captured bearing against the contantly updated bearing.
One final question, I haven't included a crystal on my board and am currently running off the internal timings. Do you feel it is critical for such an application?
Thanks for any help, it is much appreciated.
David
Over the last year I have been working on an interesting project regarding swimming goggles and a type of head up display mechanism. It sounds very complex, but it really isn't. It essentially uses a compass module to obtain a bearing and uses LEDs as a form of output.
I have one working prototype that used Parallax's BS2 microcontroller and the HM55b compass module. As a beginner in electronics and programming I found the device easy to integrate and programme.
Currently I am working on a secondary prototype, this time minimising the electronics and making the whole device more efficient. I decided the 44-pin propeller chip was most appropriate as it had sufficient I/O's and could run at a lower voltage than the Stamp. I wanted a more accurate compass as well and selected the HMC5843.
Whilst I have made a new prototype board that is fully working I am struggling with the code. I can do simple functions such as illuminating LEDs and also make use of a pushbutton as an input.
Despite the drivers existing on the OBEX I am struggling to get the HMC5843 working. Any advice for:
i) Capturing a bearing from the HMC5843 at the push of a button.
ii)Comparing this captured bearing against the contantly updated bearing.
One final question, I haven't included a crystal on my board and am currently running off the internal timings. Do you feel it is critical for such an application?
Thanks for any help, it is much appreciated.
David
Comments
The HMC5843 spin code in the OBEX has a flaw in it. Try the attached code which is a modified version of the original OBEX spin code. Works great for me and the readings only change slightly when tilted. Do a search on the Forum for the compass code. I cannot remember where on the Forum that I got the updated code from. Remember the HMC5843 is no longer being produced by Honeywell.
Regards,
TCIII
Hopefully this will solve my problems!