This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2553: BMP180 MSP430 How to Read CCS

Part Number: MSP430G2553
Other Parts Discussed in Thread: ENERGIA

Hi,

I´m working on BMP180 Sensor with MSP430g2553, I´ve download many libraries but are so confused and complicated to implement my code.

For that reason I want to build my own code, I tried reading calibration data, I´m based my code with some I2C examples provided by TI.

My question is: How I obtein this example value? On register 0xAA

Do I need to Write on that register? or Read that register? I don´t understand this part

Do I need to use Tx/Rx interrupts?

If anyone have an example on Code Composer Studio please share the code.

I tried with Energia Code but doesn´t work, always shows Temp = 0C. Pressure = 2Pa.

Hope you help me, thanks.

  • can't  help you with the '180, but if you want to switch to the '280 I have published an example project that uses bit-bang SPI.

    Said project is posted on github; search on the phrase "MSP430 BMP280' and youll find it.

    I looked at the '180 a few months ago but didn't pursue it as said device is IIC only and has been obsoleted (end of life)

  • All of TI's example programs use interrupts because that is what a real program is likely to use. However, when beginning, it would be easier to write a simple loop to wait for the interrupt but than a state machine inside the interrupt handler.

    I²C knows only 8-bit reads and writes. To read a register, you have write the register address, and then read the value. None of TI's examples shows a combined write-and-read.

    There is something wrong with your code, but my crystal ball got ESD damage, so I cannot tell you what exactly.
  • Thanks, I guess I will have to change my sensor and use BMP280, thanks for comment.

  • Ok I will try something like this and post results, thanks for your answer

**Attention** This is a public forum