View Full Version : Reading Compass CMPS03
Jawahar
06-04-04, 12:42 AM
I am trying to read PWM signal from CMPS03 digital compass. The PWM signal is connected to TC0 pin of IsoPod V2. I have used the code available on your website.
But all I get is "0 519 deg". It does not change even if I rotate the compass. The connections have been verified. Why am I not getting the readings?
Thanks.
Have you calibrated the Devantech Compass according to their documentation at
http://www.robot-electronics.co.uk/htm/cmps3doc.shtml
Once calibrated at each of the 4 directions, it should read correctly from the IsoPod program.
Jawahar
06-06-04, 03:02 AM
I am getting readings now!
Actually, I mistook TA0 as TC0. After connecting the Compass PWM to TA0 as required by the code, I am getting readings.
But like you said, I still need to calibrate to get better measurements.
Thanks!
Junjie87
10-31-06, 01:13 AM
Hi, i'm using the compass CMPS03 with the microprocessor PIC16F84. I have problems with getting accurate results.
I'm using register 1 to obtain my results. At a same location, i get different values, but sometimes the values are quite far apart, as in one moment it reads '358', another moment it reads '80'.
Any advice anyone?
Yes, my advice would be to use one of our Pods to read the compass, and follow the example code on the Pods Download page. (http://www.newmicros.com/store/product_details/download.html)
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.