From MikroElektonika Documentation Revision as of 16:23, 24 June 2016 by Srdjan.misic talk | contribs
Part | Datasheet |
---|---|
![]() |
MIKROE-2264 (pdf) |
PDF Datasheet Preview |
---|
Compass 2 click Compass 2 click carries an AK8963 3-axis electronic compass. The high sensitivity sensor is based on the Hall effect. The built-in ADC converter can be set up at either 14 or 16 bit resolution, for each of the 3 axes. The sensitivity is 0.6µT/LSB typ. at 14-bit, and 0.15µT/LSB at 16-bit. Compass 2 click communicates with the target MCU through either through the I2C or SPI interface, with an added INT pin. Onboard jumpers enable you to switch between two interfaces. The board is designed to use a power supply only. Features and usage notes Compass 2 click The AK8964 has several operating modes which can be configured by setting a specific register CNTL1 to certain values. The following is a list of available operating modes with partial descriptions to give you an overview . The configuration details are available on page 13 of the official data sheet, while the complete descriptions 1 Power-down mode Schematic also available in PDF Power to almost all internal circuits is turned off. All registers are accessible in power-down mode. However, fuse ROM data cannot be read correctly. Data stored in read/write registers are remained. They can be reset by soft reset. 2 Single measurement mode When single measurement mode[3:0]=“0001” is set, sensor is measured, and after sensor measurement and signal processing is finished, measurement data is stored to measurement data registers HXL to HZH , then AK8963 transits to power-down mode automatically. Compass 2 click IC/Module AK8963 partno=AK8963 Interface SPI, I2C, INT Power 3.3V supply Website 3 Continuous measurement mode 1 and 2 When continuous measurement mode 1 MODE[3:0]=“0010” or 2 MODE[3:0]=“0110” is set, sensor is measured periodically at 8Hz or 100Hz respectively. When sensor measurement and signal processing is finished, measurement data is stored to measurement data registers HXL ~ HZH and all circuits except for the minimum circuit required for counting cycle lentgh are turned off PD . 4 External trigger measurement mode When external trigger measurement mode[3:0]=“0100” is set, AK8963 waits for trigger input. When a pulse is input from TRG pin, sensor measurement is started on the rising edge of TRG pin. When sensor measurement and signal processing is finished, measurement data is stored to measurement data registers HXL to HZH and all circuits except for the minimum circuit required for trigger input waiting are turned off PD state . 5 Fuse ROM access mode Fuse ROM access mode is used to read Fuse ROM data. Sensitivity adjustments for each axis is stored in fuse ROM. Compass 2 click has both SPI and I2C interfaces. The active interface is configured with onboard jumpers. If you use I2C, an additional jumper will allow you to set the I2C address. Programming This code snippet initiates Compass 2 with I2C communication, and reads out the heading value, along with a direction, N, NE, E, etc from the module to a UART terminal every 100 ms. 1 #include <stdint.h> 2 #include "compass2_hw.h" 4 sbit COMPASS2_CS at GPIOD_ODR.B13; 6 void system_setup bus_mode_t mode, uint8_t addr ; 8 float mRes; // scale resolutions per LSB for the sensors 9 uint8_t asax, asay, asaz; 10 float adjusted_ASAX, adjusted_ASAY, adjusted_ASAZ; 11 float heading, adjusted_MX, adjusted_MY, adjusted_MZ, magbias[3]; 12 int16_t mx, my, mz; 13 char text[20] = 0 15 void main 17 // Local Declarations uint8_t address = 0x0F; bus_mode_t my_mode = I2C; float heading = 0; char uart_text[5] = 0 |
More datasheets: HR-DL2X2 | HR-DF2X5 | HR-DF2X4 | HR-DF5 | DDMM50SF179A-A197 | IRFHM7194TRPBF | 30WQ06FNTRL | 30WQ06FN | 30WQ06FNTR | 0603L200SLYR |
Notice: we do not provide any warranties that information, datasheets, application notes, circuit diagrams, or software stored on this website are up-to-date or error free. The archived MIKROE-2264 Datasheet file may be downloaded here without warranties.