Microchip | The Embedded Control Solutions Company Register Login
Browse All
 10 Code Snippets

BMA180 accelerometer


The BMA180 provides a digital 14-bit output signal via a 4-wire SPI or I2C interface. The full-scale measurement range can be set to ±1g, 1.5g, 2g, 3g, 4g, 8g or 16g. Other features include programmable wake-up, low-g and high-g detection, tap sensing, slope detection, and self-test capability. The sensor also has two operating modes: low-noise and low-power. You can port this driver to any microchip MCU since I'm not using hardware SPI. Have fun! :)

About this Code Example

/*code example*/
#include <BMA180.h>
#include <p30f3011.h>  

void main(void)


  short x,y,z,temp;


     x= ReadAccX();
     y= ReadAccY();
     z= ReadAccZ();
     temp= ReadTemp();



Release History

  • Jan 26, 2012

    Version: 1.0.0

    first release

Download Contact the Developer

*Required Fields

  • Current Version:1.0.0
  • Created:Jan 26, 2012
  • Updated:Feb 26, 2015
  • Downloads:8749
  • MPLAB Version:8.83
  • C Compiler:C30
  • Development Tools:ICD3, PICKIT 3
  • Supported Devices:DSPIC

Corporate News


Stay Connected

Stay up to date with the latest news from Microchip Technology.