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.
|Published (Last):||24 May 2009|
|PDF File Size:||19.39 Mb|
|ePub File Size:||7.10 Mb|
|Price:||Free* [*Free Regsitration Required]|
Users browsing this forum: Google [Bot] and 2 guests. Mon Dec 31, 6: Thu Sep 01, 5: This board has two outputs: It turns out that it works fine, and there is almost no need to recalibrate the unit.
Second test was to write code to interface with the unit via I2C. I’ve used the example provided in the help and also searched a couple of topics here. 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. For this second test, the manufacturer suggests pulling sda and scl lines using a 1.
I didn’t have a 1. Here’s my code sorry the lenght, it is mainly due to debug leds Code: Fri Sep 02, 7: Fri Sep 02, 4: 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.
【CMPS03 NXP】Electronic Components In Stock Suppliers in 2018【Price】【Datasheet PDF】USA
Sun Sep 04, 4: I checked the ASM your code produces and there in nothing wrong with it. I assume you are having problems with protocol that the sensors require.
I2C has been proven to be working in many cases if you doubt the library Mon Sep 05, 3: Wed Sep 07, 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. I will try I2C again, this time with the right resistor values.
Fri Sep 09, 1: Fri Sep 09, 5: I2C can be very frustrating. It would be nice if someone made a hardware protocol analyzer for I2C in particular, but all datashdet protocols in general.
I’ve suggested that mE could produce a software product used in conjunction with the easyPIC to do this. 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.
Fri Sep 09, 8: The Beagle analzyer provides a high performance monitoring solution in a small, portable package. Perfect for engineers in the field and in the lab.
Seems like mE have their hands full at the moment so don’t hold your breath. One thing that is still unanswered for me and I think it’s piece of cake for you I2C guru cmps003. I tried initializing only once and sampling many times, but that didn’t work.
Follow the Assembler example here: You should be able to follow this and convert it over to MP. Wed Apr 21, 6: Sun Jul 10, 1: I did it to get experience and understanding of I2C protocol and I will be happy to share this with anyone who is interested. There is too much material to include it all here, but I can send it as email attachments. Page 1 c,ps03 1.
cmps03 – robot compass module cmps03 – Stock and Price by Distributor
Previous topic Next topic. So here’s what happens: Looking at the scl line with an oscope, there is no activity, it is always high a tad below 3V. Do you think the problem is the non-matching resistor value?
I’d think that in this case, the clock line would oscilate at a different frequency, instead of not oscillating at all. Thanks for you help! We will have to check this. You’ll be notified when we have some answers. Do you smell a bug here?
I was hoping that somehow I was making something stupid and you would tell me to change one line of code and voila Hey, thanks for checking that.
I’ve set the pullups with the suggested resistance values 1. Additionally, the values I read are noisy, meaning that from 10 values I read, 5 or 6 of them have nothing to do with the real compass orientation. My guess is that the baud rate is mismatched. Let’s say the target frequency is kHz 10uS.
Index of /ict/autina/progetto/doc/bussola_CMPS03/altra_doc
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. Clearly I’m loosing something here. Also, after reading a couple of other posts involving problems using I2C, I’ve just made a note to myself to check the following: You don’t need to match baud rates. You just need to make sure both devices can handle the baudrate, which is always set by the master.
I got that yesterday I was measuring the signal duration on the oscope and it was giving me a frequency of 50KHz I said what the heck?
Then I looked at my code and it was really 50KHz from a test I did the other day. Now this is what’s happening: Turns out that it is always the second setting the register or the third sending the read address.
Devantech CMPS03 Digital Compass | Junun Robotics
Yesterday I tried inserting the following piece of code just before any write: I don’t know who is holding the clock line low, the master or the compass. Is that the normal thing to do?
As you can see, I’m pretty newbie on I2C I thought it would take me one or two days to set up the compass, but it’s taking more than two weeks already Thanks for the help! You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum.