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.

Connecting MSP432P401R to 16x2 LCD with I2C interface

Other Parts Discussed in Thread: ENERGIA

Hello,

I'm trying to get a standard 1602 LCD (16x2 from Raystar) connected to MSP432 with the I2C interface. Are there any existing libraries which could help me out? I found some I2C libraries for Arduino but naturally they're not compatible, and the only existing Energia examples deal with CogLCD which uses a SPI interface (emerging question: is there a way to make SPI and I2C work together?) or standard 16 pin connection. A nudge in the right direction would be greatly appreciated.

Thanks!

  • Jimmy,
    Are you having trouble with I2C, LCD or both?

    Here's a great thread on that: forum.43oh.com/.../2641-i2c-lcd
    The very last post, says he has a library that he's tested on the 432 with a 20x4 LCD.

    If you need Energia I2C Examples, just go to FILE --> Examples --> Wire, and check out how those work. You can also look out how the I2C libraries work for other LCD's. Seeed Studio's makes several LCD Grove Modules, as does Adafruit.

    Best regards,
    Cameron
  • Hello,

    well the trouble is mostly my lack of experience with I2C, and I2C examples for MSP432 on TI's resource page seem specific in a way of only using other MSP's as slaves / masters.

    Anyways, thanks for the suggestion, I'll try to make it working with Fmilburn's library. My project is in CCS 6.1 though, and seeing the library is using a bunch of Energia includes, would that pose a potential problem? My thinking is I can just include all the neccessary headers in the project and hope not to use too much storage.
  • Update: It works using Fmilburn's library, I only need to port this to CCS now.
  • Okay, I tried making it work in CCS by including all the necessary energia libraries needed (like print.h, wire.h, ...) but no luck so far, I get tons of errros and that doesn't seem to be the right way. Any ideas?

    Thanks!
  • Good to hear your having some initial success!

    The examples shouldn't be too different from any other i2c interface. In your case, the LCD just acts as the slave and you simply need to set the correct slave address and write to the proper registers. We do it with 2 msp's so you can get a feel for whats going on on either side, or how to set up an msp as a slave.

    What kind of errors are you getting?

    Best regards,

    Cameron

  • Thanks for the reply. For starters, I can't select a MSP432 as a device for importing Energia sketches. The list only includes MSP430 and some others (CCS is up to date). I'm guessing the feature isn't added yet.

    However if I choose MSP430, it imports and compiles fine, but I'm getting the " Error initializing emulator: No USB FET was found". Other CCS projects with MSP432 compile okay using the same port.

    Another clarification question. If I make an Energia sketch using the custom header files and if I import the said Sketch into CCS, will CCS take care of all the subsequent headers that appear in custom headers? Example: custom.h includes wire.h, I presume they'll be both included automatically without importing wire.h manually? Thanks for the answers.

  • I'm sorry that I didn't catch that. We don't support importing Energia Sketches for 432 yet. Though it's supposed to be supported in the next release. I don't have a date for that yet, but I'll see what i can find out.

    Best regards,
    Cameron

**Attention** This is a public forum