CMPS03 Magnetic Compass. Voltage – 5v only required. Current – 20mA Typ. Resolution – Degree. Accuracy – degrees approx. after calibration. Output 1. Library; Reference. The CMPS03 is a digital compass with an I2C interface. Reference¶. CMPS03 Datasheet. CMPS03 Robot Compass Module This compass module has been specifically designed for use in robots as an aid to navigation. The aim was to produce a.

Author: Jut Arahn
Country: Namibia
Language: English (Spanish)
Genre: Automotive
Published (Last): 20 November 2011
Pages: 312
PDF File Size: 10.9 Mb
ePub File Size: 13.60 Mb
ISBN: 471-6-36021-727-1
Downloads: 93380
Price: Free* [*Free Regsitration Required]
Uploader: Kazrazilkree

Follow the Assembler example here: The datasheet says that the lower 7 bits of SPADD shall be initialized with such a value that when counted every other clock pulse Q2 and Q4it should take exactly the 10uS.

Yesterday I tried inserting the following piece of code just before any write: I checked the ASM your code produces and there in nothing wrong with it.

Datasheet «CMPS03»

I2C can be very frustrating. I did it to get experience and understanding of I2C protocol and I will be happy to share this with anyone who is interested. Thanks for you help! Also, after reading a couple of other posts involving problems using I2C, I’ve just made a note to myself to check the following: Looking at the scl line with an oscope, there is no activity, it is always high a tad below 3V. It turns out that it works fine, dataaheet there is almost no need to recalibrate the unit.


There is too much material to include it all here, but I can send it as email attachments. Hi Padu, i had some problems trying to use the standard I2C for my project, i dont have time right now but i’ll look into my and your program and hopefully find something usefull diogenes.

I’ve tried reading the compass using the PWM signal that it generates by using timers, but at 4MHz, I cannot get a timing precise enough. Sun Sep 04, 4: It would be nice if someone made a hardware protocol analyzer for I2C in particular, but all serial protocols in general. Google [Bot] and 2 guests.

MikroElektronika Forum • View topic – I2C, PIC18F and Devantech CMPS03

Perfect for c,ps03 in the field and in the lab. As you can see, I’m pretty newbie on I2C I got that yesterday I didn’t have a 1.

You should be able datasheer follow this and convert it over to MP. I will try I2C again, this time with the right resistor values. Do you think the problem is the non-matching resistor value? I2C has been proven to be working in many cases if you doubt the library I don’t know who is holding the clock line low, the master or the compass.

CMPS03 – Magnetic Compass | Famosa Studio

You just need to make sure both devices can handle the baudrate, which is always set by the master. Mon Sep 05, 3: I tried initializing only once and sampling many times, but that didn’t work. Wed Sep 07, Fri Sep 09, 5: Fri Sep 02, 4: This would be a nontrivial task to create the product, but I’m convinved there’s a definate market, because this ends up being so time-consuming.


Do you smell a bug here? Fri Sep 09, 1: Turns out that it is always the second setting the register or the third sending the read address. I think it must be something very simple and I will feel very dumb when I find out, but I couldn’t figure out by myself. I was hoping that somehow I was making something stupid and you would tell me to change one line of code and voila One thing that is still unanswered for me and I think it’s piece of cake for you I2C guru guys.

Mon Dec 31, 6: Here’s my code sorry the lenght, it is mainly due to debug leds Code: Sun Jul 10, 1: Second test was to write code to interface with the unit via I2C.

Let’s say the target frequency is kHz 10uS. I’ve used the example provided in the help and also searched a couple cmps3 topics here. The Beagle analzyer provides a high performance monitoring solution in a small, portable package. Page 1 of 1. Fri Sep 02, 7: You don’t need to match baud rates.

I’ve set the pullups with the suggested resistance values 1.