Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

USCI i2c repeated start question

$
0
0

I'm relatively new to the MSP430 and microcontroller world.  I have a MSP430G2553 and am interfacing to a MMA8453Q accelerometer.  I have this working on a MSP430G2231 using USI and now want to move to a MSP430G2553 with USCI.  I took the samples from slaa382 for master and master with repeated start from TI and modified the basic master code to what I thought would provide me a repeated start option.  I'm just trying to read back the "whoami" register but I think something is wrong with my repeated start implementation, could someone advise me on this?  I've got 10k pull ups on the clock and data lines and was able to write to a DAC successfully so I am confident in my hardware setup.

 

See attached files, basically I added a repeated start flag to the i2c master.c file which gets set when the "TI_USCI_I2C_transmitre" function gets called, then added if statements in the vector section which strips out the stop when the flag is set.

 

Any help is appreciated,

Thanks! 

Mark

Attached File  Copy of main.c   5.22KB   0 downloadsAttached File  TI_USCI_I2C_master.h   888bytes   0 downloadsAttached File  TI_USCI_I2C_master_edit.c   11.18KB   0 downloads


Viewing all articles
Browse latest Browse all 2077

Trending Articles