Author: Talha Sarı
The LIS3MDL is an ultra-low-power highperformance three-axis magnetic sensor. The LIS3MDL has user-selectable full scales of ±4/±8/±12/±16 gauss. The self-test capability allows the user to check the functioning of the sensor in the final application. The device may be configured to generate interrupt signals for magnetic field detection. The LIS3MDL includes an I2C serial bus interface that supports standard and fast mode (100 kHz and 400 kHz) and SPI serial standard interface. For more check datasheet: /doc/LIS3MDL_Datasheet.pdf
- Wide supply voltage, 1.9 V to 3.6 V
- Independent IO supply (1.8 V)
- ±4/±8/±12/±16 gauss selectable magnetic full scales
- Continuous and single-conversion modes
- 16-bit data output
- Interrupt generator
- Self-test
- I2C/SPI digital output interface
- Power-down mode / low-power mode
- ECOPACK®, RoHS and “Green” compliant
Pin # | Name | Function |
---|---|---|
1 | SCL | I2C serial clock |
2 | Reserved | Connect to GND |
3 | GND | Connect to GND |
4 | C1 | Capacitor connection (C1=100 nF) |
5 | VDD | Power supply |
6 | VDD_IO | Power supply for I/O pins |
7 | INT | Interrupt |
8 | DRDY | Data Ready |
9 | SA1 | I2C less significant bit of the device address |
10 | CS | I2C/SPI mode selection |
11 | SDA | I2C serial data |
12 | Reserved | Connect to GND |
Note: Device's I2C address can be changed due to SA1
pin state;
Ox1C
whenSA1
grounded.Ox1E
whenSA1
pulled to VDD.
This library is created for STM32 development environment and can be used only with STM32F series microcontrollers for now. Example project: /example
Note: This library requires HAL!
GNU General Public License v3.0