Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 00:19 04 Dec 2021 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : QMC5883L

Author Message
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1487
Posted: 11:25am 18 Nov 2021
Copy link to clipboard 
Print this post

I've got a QMC5883L compass incorporated in a GPS module a Matek Neo M9N-5883 which the GPS works beautifully
I cannot however figure out how to get the compass working
Does anyone have any code for this module that I could use?
OR
Can anyone "translate" from Arduino?

I found Arduino code here

With the compass.h here and the compass.cpp here

Example code for direction here  This I believe uses N,W, E and W
where I'd prefer to use 8 points of the compass rather than 4

Anyone able to decipher and translate or have any code for this module?

I did have a go at it myself but completely got lost and couldn't make head nor tail of what I was trying to do

The only thing I can say for definite is it needs to be in continious mode
Continuous Mode Setup Example  
Write Register 0BH by 0x01 (Define Set/Reset period)
Write  Register  09H  by  0x1D  (Define  OSR  =  512,  Full  Scale  Range  =  8  Gauss,  ODR  =  200Hz,  set  continuous
measurement mode)

7.2 Measurement Example  
Check status register 06H[0] ,"1" means ready.
Read data register 00H ~ 05
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1487
Posted: 11:20am 20 Nov 2021
Copy link to clipboard 
Print this post

it's a compass ic
 
SimpleSafeName

Senior Member

Joined: 28/07/2019
Location: United States
Posts: 229
Posted: 04:26am 26 Nov 2021
Copy link to clipboard 
Print this post

What platform and language do you plan to run the compass on? Whose compass board are you using?

Taking a quick look at it and it doesn't seem too bad. First off have you seen how to operate it in the Arduino world? https://belchip.by/sitedocs/10882.pdf

Let me know the board and more importantly, the platform that you want to use it on, and I'll give it a shot.


John
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1487
Posted: 10:52am 26 Nov 2021
Copy link to clipboard 
Print this post

It's going on a Picomite
it's part of a GPS program, the compass is built into the GPS module
I know nothing about Arduino and I'm pretty cr@p at programming using MM as well
 
SimpleSafeName

Senior Member

Joined: 28/07/2019
Location: United States
Posts: 229
Posted: 01:40pm 26 Nov 2021
Copy link to clipboard 
Print this post

So I took the plunge last night and dropped $7 bucks on a compass module to get the ball rolling. The important thing is that we are using the same chipset.

When it gets here I'll see about programming it to work with a CMM2. That will get you close.
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1487
Posted: 03:26pm 26 Nov 2021
Copy link to clipboard 
Print this post

Thanks :)
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2021