Author Topic: I2C on MSP430  (Read 2012 times)

0 Members and 1 Guest are viewing this topic.

Offline kubuniTopic starter

  • Newbie
  • Posts: 7
  • Country: us
I2C on MSP430
« on: July 10, 2017, 06:56:50 pm »
Hello,

I am new to implementing I2C on my own; furthermore, I am doing this for an SSD1306 OLED module. which I already tested with the arduino.
Reading from the MSP430 Family User Guide,  I want my MCU (msp430g2553) in master mode by UCMODEx = 11 and UCA10 = 0 for 7 bit addressing.
What I'm a little lost is setting the address. I know you have to set it for the register UCB0SA, but do I had the R/W as well to it? The address I used for 0x3C. so, I don't know if I just chug that in there.

Also, Would I just be fine using the MCLK at full speed?  any suggestions for a rule of thumb for delays on sending a command?

thanks!  ;D
 

Elf

  • Guest
Re: I2C on MSP430
« Reply #1 on: July 11, 2017, 05:46:39 am »
I would take a look at TI's SLAA382A document with its associated example code. I think the document combined with the code will probably answer a lot of the questions.

Not sure what you mean by delays between commands? Generally you either poll the registers or use interrupts to determine when the send or receive operation is complete.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->