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.

CCS/TMS320F28069M: Interfacing an LCD screen with the I2C protocol

Part Number: TMS320F28069M
Other Parts Discussed in Thread: MOTORWARE

Tool/software: Code Composer Studio

Hi, I am prototyping a motor with the InstaSPIN software and want to be able to display various motor parameters (such as RPM) on an LCD display.

I suppose this issue comes in two parts:

Implementing the I2C protocol for a 2x16 LCD screen (it has a serial to I2C backpack connected)

I am currently following the motorware lab examples and want to be able to implement the I2C protocol as additional code within the examples. I have noticed the the existing code already sets up the Data and Clock on GPIO 32 and 33. How then would I progress from here, specifically identifying the address of the LCD screen, manipulating pixels to display letters, symbols and numbers. Basically a way to test the communication between master and slave. Are there any libraries or example code that would be helpful?

Extracting the motor variables and sending them to the LCD

I am aware there are variables/expressions such as gMotorVars.Speed_krpm which can be observed in the watch window of code composer. Is it possible to read a value such as this and then send and display it on the LCD screen? What would the process be?

Thank you

David

  • Hi David,

    David Leong1 said:
    Are there any libraries or example code that would be helpful?

    I don't believe there's anything TI has developed for this, specifically for the C2000. You may be able to make use of open source drivers the community has made, see below options

    David Leong1 said:
    I am aware there are variables/expressions such as gMotorVars.Speed_krpm which can be observed in the watch window of code composer. Is it possible to read a value such as this and then send and display it on the LCD screen? What would the process be?
    I don't see why not assuming you can get the LCD to display values properly. The process would consist of getting the motor variables value, converting it into the number format you'd like the LCD to display, and then sending the respective commands with the values you'd like to the I2C LCD to be displayed.
    Best,
    Kevin