Hi, all -
I hope I'm posting this in the correct location; if not, apologies.
It appears that I'm going to be programming an FX0S8700CQ sensor in the near future. I don't know many details yet, but I was curious as to whether Freescale (or someone else) provided some starter code for writing the driver for this device. Even if I just had a header file with the names and addresses of all the registers provided, that would be a good start.
So...is there such a thing? I looked in the software section, but could only find run-time code.
Thanks...
已解决! 转到解答。
Hi Michael,
I do apologize for the broken link, you can download it from the following website:
Regards,
Tomas
Hi Michael,
There is the FXOS8700CQ command line interface driver as part of the AN4460.
This code has been developed to provide an easy way to communicate with the FXOS8700CQ using the Sensor Toolbox platform, but it can be used as a starter code as it includes, among others, basic functions to initialize the device (FXOS8700CQ.c) and the header file (FXOS8700CQ.h).
Regards,
Tomas
Hi Michael,
I do apologize for the broken link, you can download it from the following website:
Regards,
Tomas
Thanks, Tomas. I do notice that FXOS8700CQ.c includes "system.h," which in turn includes "hidef.h," which...doesn't exist within the download source. I also seem to be lacking an MC9S08QE8.h file.
EDIT: I just read the comment in the derivative.h file. Evidently, this file (and others) are generated by "the project wizard." Is that a Code Warrior construct? And if so, since I'm not using Code Warrior, should I probably just eliminate include directives like this one? (I'm using IAR.)
Hi Michael,
The hidef.h is a standart header file that includes commonly used macros and is located in the CodeWarrior for Microcontrollers V6.x\lib\hc08c\include folder. In our project we only use the EnableInterrupts macro to enable all interrupts. It is defined as follows in the hidef.h file:
#define EnableInterrupts __asm CLI;
The MC9S08QE8.h is a specific header that includes peripheral memory map for the MC9S08QE8 MCU and is located in the CodeWarrior for Microcontrollers V6.x\lib\hc08c\device\include folder. I have attached it here for your reference.
Regards,
Tomas