Jump to content
  • 0

Using PMOD Compass (CPMS) with Zybo


Dillon

Question

5 answers to this question

Recommended Posts

Hi @Dillon,

Unfortunately, we do not have have example code for using the Pmod CMPS with a Zynq based board, as it is one of our retired products. The example that we do have, which you found, is MPIDE/Arduino IDE based, so it will not readily work with Xilinx SDK. What I would recommend doing is taking a look at the Pmod CMPS2 IP core (available on our github here) and following our Pmod IP tutorial to get it up and running.

The two compass Pmods are very similar in the sense that they both measure magnetometer data (obviously) and also both use I2C as the primary communication protocol, so you will be able to adapt the existing SDK files for the Pmod CMPS2 for the Pmod CMPS (original) by comparing the .cpp and .h files. 

Please let us know if you have any questions about this and we will be happy to help you.

Thanks,
JColvin

Link to comment
Share on other sites

I was able to get the hardware built according to the tutorial for the CMPS 2. I made a blank application project in the SDK and i can run the example code, but it doesn't change values. I think this is because i am using the CMPS 1 and the code is the CMPS 2. What differences are there in the code for the 2 PMODS? I have attached pictures of my block design and some of the SDK window. Thanks

Capture.PNG

Capture1.PNG

Link to comment
Share on other sites

Hi @Dillon,

I would look at the datasheets for the CMPS here(page 11 on) and the CMPS2 here (page 8 on). They will have different registers for configuration/initialization. You will need to make changes in the register definitions in the PmodCMPS2.h file. You will also need to change the size of your reads and writes. You will need to look at the differences between the different IC's and see if there is any other changes that need to be made as well.

cheers,

Jon

Link to comment
Share on other sites

Thank you for the response, i looked at the datasheets and i cant match some of the registers up. Im not sure if the first pmod has as much on the chip as the second one does. I matched up the status register, but the others are not so clear 

Capture.PNG

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...