0

Has anybody experienced using the Invensense IMU3000 with some microcontroller? I am trying to build the IMU library for a PIC but I am stuck with the dependencies.. any other experience with others microcontrollers will be nice as well! Basically I don't get whether it is better to take the Visual Studio 2005 project and make the changes there, adding the PIC dependencies (I get stuck..) or compile the whole library in the PIC environment..

Any hint, even with other platforms, would help!

Thank you all!

stef
  • 737
  • 4
  • 13
  • 31
  • This question will likely get better responses over at the still-in-beta SE site chiphacker.com. If it were out of beta, I'd vote to migrate there. – RBerteig Dec 13 '10 at 21:57
  • Thank you for the hint! I'll ask there! – stef Dec 14 '10 at 11:34

2 Answers2

1

PC and PIC programming are so very different... Also there are so many pIC variants, they are hugely different from each other, it's hard to answer such an open ended question. However, basically you're writing mathematical algorithms. So write these as ansi c functions, hosted with a load of PC things (dialogs etc) and once they're working, you can move just the math functions over to the PIC - having already got a framework running on the PIC, ready to receive the algorithms. BUT - take care with memory. You have bags of it on the PC, you have to be mean with memory once you work on a PIC. Good luck, enjoy!

Henry
  • 11
  • 1
0

While it can be helpful to write code on the PC that will eventually move to the PIC, you will need to make sure that all code that will move has been written with portability in mind. That is, you cannot assume that code that compiles and works perfectly under Visual Studio will work without modification on any other platform.

To run in the PIC, all of the code must be compiled with cross development tools that are designed to target the PIC.

That said, I often develop algorithms and detailed processing code in the PC where a test suite can be easily used to verify its operation, and then recompile it for my target platform.

Incidentally, Google tells me that the IMU-3000 is a MEMS Gyro. It would probably be helpful to include at least the link to its data sheet in the question.

RBerteig
  • 41,948
  • 7
  • 88
  • 128
  • The IMU3000 comes with a really good library integrating full control of its features. The library is structured in 3 different layers, the bottom one is the one that implements the communication with the chip itself. The vendor provides this layer for using the IMU3000 with an adapter board in WindowsXP. Basically, what I need to do (and what is suggested in the application note) is rewrite this layer to use the whole library with my PIC. Unfortunately I cannot find the DS online.. just after you install the package you find it.. is there a way to compile libraries in PIC MPLAB? – stef Dec 14 '10 at 11:33
  • MPLAB itself does not include a C compiler. You haven't specified which PIC family you are targeting. They vary widely from 8-bit MCU to 32-bit RISC. Microchip does have C toolchains for all families, and some are free but might have limitations. – RBerteig Dec 15 '10 at 23:17
  • Taking a hint from the PIC18 tag, you should look at the C offerings for the PIC18F family. MCC18 from Microchip is not bad, and is available both as a commercial license with additional features and as a free trial version with limitations. – RBerteig Dec 15 '10 at 23:18