OVERVIEWER
The ADXL345 is a small, thin, low-power, 3-axis accelerometer with high resolution (13-bit) measurement up to ±16 g. Digital output data is formatted as a 16-bit two's complement and is accessible through either an SPI (3- or 4-wire) or I2C digital interface.
The ADXL345 is well suited to measure the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock. Its high resolution (3.9 mg/LSB) enables the measurement of inclination changes less than 1.0°.
Several special sensing functions are provided. Activity and inactivity sensing detect the presence or lack of motion and if the acceleration on any axis exceeds a user-set level. Tap sensing detects single and double taps. Free-fall sensing detects if the device is falling. These functions can be mapped to one of two interrupt output pins. An integrated, patent-pending 32-level first-in, first-out (FIFO) buffer can be used to store data to minimize host processor intervention.

Figure 1: ADXL345 Functional Block Diagram
Technical Details:
ADXL345 3-Axis, ±2g / ±4g / ±8g / ±16g Digital Accelerometer
- Supply voltage range: 2.0V ~ 3.6V DC
- I/O voltage range: 1.7V to Vs
- Free-fall detection
- SPI (3- and 4-wire) and I2C digital serial interfaces
- Flexible interrupt modes mappable to either interface pin
I2C INTERFACE
If the CS pin is tied high to VDD, the ASXL345 will operate in I2C mode. The Adafruit ADXL345 Breakout already connected the CS pin through a 10 KΩ pull-up resistor to the +3.3V. In I2C mode, the SDO pin will be used for an alternate I2C address selector. The SDO pin is connected to the ground through a 10 KΩ pull-down resistor. The connection diagram and the in I2C mode are shown below.
I2C Connection Diagram
(Address 0x53)
ADCL345 Pin Connections in I2C Mode:
PIN | Connection To | Function Description |
CS |
VDD (1) |
Set Interface to I2C Mode (Default) |
SDO/ALT ADDRESS |
GND (0) |
I2C Address = 0x53 (Defalut) |
VDD (1) |
I2C Address = 0x1D |
Data transfer rate:
- Standard mode: 100 Kbps
- Fast mode: 400 Kbps
SPI INTERFACE
In SPI mode, the CS pin is controlled by the bus master device. The SPI can be configured in either 3- or 4-wire mode. Clearing the SPI bit in the DATA_FORMAT register (Address 0x31) selects the 4-wire mode, whereas setting the SPI bit selects the 3-wire mode.
SPI Maximum Bit Rate: 5 Mbps
SPI Mode: CPHA = 1, CPOL = 1
ADCL345 Pin Connections in SPI 4-Wire Mode:
PIN | Connection To | Function Description |
CS |
SS |
Slave Select (SS) |
SDO |
SPI MISO |
Master In, Slave Out (MISO) |
SDA |
SPI MOSI |
Master Out, Slave In (MOSI) |
SCL |
SPI SCLK |
Serial Clock (SCLK) |
ADCL345 Pin Connections in SPI 3-Wire Mode:
PIN | Connection To | Function Description |
CS |
SS |
Slave Select (SS) |
SDA |
SPI SDAT |
Serial Data (MOSI+MISO) |
SCL |
SPI SCLK |
Serial Clock (SCLK) |
DESIGN RESOURCES
Documents
Schematic & Demension

