Content originally posted in LPCWare by tkreyche on Wed Mar 03 10:38:40 MST 2010
See attached zip files for some minimal but working sample I2C code. Just drop into LPCXpresso I2C sample project - works with V1.20. I haven't worked with I2C for a while, but this was pretty easy to get running. The LPCXpresso provided I2C code seems to be working fine
Includes functions and calls for the Texas Instruments TMP102 digital temperature sensor and Analog Devices ADXL345 3-axis accelerometer. There are screen shots of I2C bus monitor for the ADXL345 but I didn't bother to do it for the TMP102. The two devices work with I2C somewhat differently, thus two separate sets of functions. Sparkfun has breakout boards for the sensors.
.