PIC plus-5110 LCD-GPS-BMP280-HMC5983

Status
Not open for further replies.
Hi J,
Ok.
Did you look at my jpg?

EDIT: If x_raw > 32767 'needs a' Then


C
 
Last edited:
Yes,
x_raw.hb = b(0) is ok
Hi J,
Thanks, all changed.
I'm not getting any READings, and wondering if SPI can't be used. (I think Eric explained it earlier)

EDIT: Just spotted that one of my SPI leads has come off the PCB PIN I don't know how long this happened.

C
 
Last edited:
Hi J,
I've tested your routine and it works as expected, it's much better programming. I've removed BIT17H.

I'm sure along the way, I've had results, where I moved the compass module, and the numbers changed. I've either broken it, and need to recheck old programs, or buy some different modules.
Thanks C.
 
Hi,
I'm getting good results (I think) There's no calculation yet, I think the results are in radians. (incorrect)
I'm getting a problem where I get switching between sensible readings, to all zeros. I've tried SPICLOCK_STRETCH, which may be making a difference, but not curing it. Can anyone shed light on this please?

See attached, two 5110 images, showing XZY registers +B register + mode settings.

EDIT:
I've also tried disabling the OSCTUNE.PLLEN = 1 '*4 PLL enabled so Fosc = 32MHZ, but no difference.
Also, tried, 'when showing all zeros' switching off/on and reprogramming, but it still shows zeros.

I have a LED flash which shows the MAIN LOOP is being looped.
C.
 

Attachments

  • 1.jpg
    135.4 KB · Views: 332
  • 2.jpg
    152.3 KB · Views: 310
  • MAIN LOOP.txt
    2.3 KB · Views: 319
Last edited:
The results are not radians, they are the x,y components of the magnetic field.
You get the angles with arctan function from x and y, see the other thread.
 
Hi,

Since post #545 I tried running a logic analyser on the Compass to PIC leads, while the 5110 is showing zeros. It shows the Compass is sending results ok.
C.
 

Attachments

  • Log.txt
    5.6 KB · Views: 309
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…