Page 1 of 2
Accel 3 click
From MikroElektonika Documentation
Revision as of 17:28, 26 May 2016 by Srdjan.misic (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Accel 3 click
Accel 3 click
IC/Module H3LIS331DL
(http://www.st.com/content/ccc/resource/technical/document/datasheet/3e/48/02/c7/a4/e6/41/bb/DM00053090.pdf/files/DM00053090.pdf/jcr:content/translations/en.DM00053090.pdf)
Interface
SPI (CS, SCK, MISO, MOSI), I2C (SCL, SDA), INT
Power
3.3V
supply
Website
www.mikroe.com/click/accel3 (http://www.mikroe.com/click/accel3)
Accel 3 click carries ST’s H3LIS331DL low-power high-g 3-axis digital accelerometer. The IC has ±100g/±200g/±400g dynamically selectable full scales and outputs 16-bit
data at rates from 0.5 Hz to 1 kHz. On the upper end, the chip can survive a 1000g high-shock. H3LIS331DL has extremely low power consumption (down to 1µA in lowpower mode). Advanced sleep-to-wakeup functions are also available. Accel 3 click can communicate with the target MCU either through the mikroBUS™ SPI or UART
interface, with additional functionality provided by an interrupt pin (INT). The board is designed to use a 3.3 power supply only.
Features and usage notes
Accel 3 click has three groups of jumpers (zero ohm resistors) onboard: - The four jumpers on the left side of the board are
for choosing between the SPI or I2C interface for the sensor output. By default, these are soldered into the I2C position. On the right side of the board, the upper jumper is for specifying which of the two interrupt pins on H3LIS331DL will be
connected to the mikroBUS™ pin. - The final jumper is for configuring the I2C address
The I2C interface is compliant with both normal and fast modes (400 KHz), both common I2C standards.
H3LIS331DL incorporates a sleep-to-wakeup function. In sleep mode the sensor is in a low-power operating mode; it
continues to detect acceleration and generate interrupt requests, but with lower data rate refreshments. Once an interrupt
threshold is sensed, the device automatically wakes up and increases the output data rate and bandwidth.
Schematic also available in PDF (http://cdndocs.mikroe.com/images/4/47/Accel_3_click_schema
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Programming
This snippet reads three axes' from the accelerometer every 30 milliseconds and displays them to UART. The values
displayed have been calibrated and are measured in gs.
#include
#include "accel3.h"
sbit ACCEL_3_CS at GPIOD_ODR.B13;
sbit ACCEL_3_INT at GPIOD_IDR.B10;
void main()
{
uint8_t address = 0x18;
xyz_t* my_coords;
//I2C
I2C1_Init_Advanced( 100000, &_GPIO_MODULE_I2C1_PB67 );
Delay_ms(200);
//Accel 3 Initialization
accel3_init( address, accel_mode, d_rate, mode );
while(1)
{
my_coords = accel3_get_xyz();
sprintf( text, " x: %d y: %d z: %d ", my_coords->x_pos, my_coords->y_pos, my_coords->z_pos );
Page 2 of 2
24
25
26
}
27
28
29 }
UART1_Write_Text( text );
UART1_Write_Text( "\r\n" );
Delay_ms(30);
Code examples that demonstrate the usage of Accel 3 click with MikroElektronika hardware, written for mikroC for ARM, AVR, dsPIC, FT90x, PIC and PIC32 are available
on Libstock (http://libstock.mikroe.com/projects/view/1795/accel-3-click).
Resources
- Accel 3 click code examples on Libstock (http://www.libstock.com)
- Accel 3 click related tutorial on learn.mikroe.com (http://learn.mikroe.com/mems-sensors-conversion-physical-world-digital-world/)
- H3LIS331DL vendor’s data sheet
(http://www.st.com/content/ccc/resource/technical/document/datasheet/3e/48/02/c7/a4/e6/41/bb/DM00053090.pdf/files/DM00053090.pdf/jcr:content/translations/en.DM00053
Retrieved from "http://docs.mikroe.com/index.php?title=Accel_3_click&oldid=347"
◾ This page was last modified on 26 May 2016, at 17:28.
◾ Content is available under Creative Commons Attribution unless otherwise noted.
http://docs.mikroe.com/index.php?title=Accel_3_click&oldid=347&printable=yes
6/15/2016
很抱歉,暂时无法提供与“MIKROE-2102”相匹配的价格&库存,您可以联系我们找货
免费人工找货