MSP430G and ADXL345

767 views
Skip to first unread message

Alex Nguyen

unread,
Feb 2, 2011, 3:41:42 PM2/2/11
to TI Launchpad
Hey guys,

my group and I are doing a project to take data from an accelerometer
using the MSP-EXP430G2 Launchpad and an ADXL 345 triple axis
accelerometer. However, we're not sure how to connect the ADXL to the
Launchpad. Can anyone help us? We've looked at connections to the
Arduino and other microcontroller hardwares, but we're still unable to
configure it.

Also, we're working on the coding...but as of now, we're doing alright
but if anyone knows of a sample code between the 430G2231 and the
ADXL345 that would be awesome for us to work off of because we're
quite new to C++

Thanks!!

Ryan Barnes

unread,
Feb 2, 2011, 3:57:18 PM2/2/11
to ti-lau...@googlegroups.com
The ADXL 345's outputs in I2C and SPI. You'll need to look up some examples of I2C or SPI on the MSP430 to get started. 

This document explains different MSP430 communication methods including both SPI and I2C:

There are 2 code examples for both SPI and I2C interfacing in the example code file on the wiki:
In the MSP430G2xx1 code examples, msp430g2x21_usi_06.c shows a single byte I2C master recieve example and msp430g2x21_usi_02.c shows SPI master example. There are also plenty more examples of communication methods that should get you started.

Hope this helps, keep us updated on the progress.
Reply all
Reply to author
Forward
0 new messages