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/TMS320F28335: LCD 16*2 display library

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE, DRV8301, AFE031

Tool/software: Code Composer Studio

I'm trying to program the LCD display using f28335 dsp. As in the photo

First I tried to use Simulink c2000 embedded coder but I found there's no tool to program the LCD. So I switched to CCS but still not quite sure how to do.

To program the LCD, the library file (.h) is needed. I would like to know how to find this library? I found from another example which used c2000 piccolo, it could not work with f28335 and "liquidcrystal" arduino library could not work as well

Any suggestion for what I should do?

Thank you

JJ

  

I found other example

  • Hi,

    I am not sure which Library file you are referring to? Generally when interfacing with external devices, you will need to create your own library to handle the commands and interface with the external device.

    What is the Hardware interface you are using? Parallel GPIO? SPI, I2C? What is the part number of the LCD?

    I searched the E2E forum for related topics, and encourage you to do so yourself. Here are the results:
    e2e.ti.com/.../356630
    e2e.ti.com/.../210923
    e2e.ti.com/.../411154

    A link found through a web search:
    embedjournal.com/.../

    Generally any code you use on one c2000 device will work with another with minimal modifications, especially when interfacing with external devices as our peripherals are very consistent across our portfolio. If you have an example working on a Piccolo, small modifications would be needed to get it working on F28335.

    If you have specific questions about some of these steps, I am more than willing to answer them.

    Regards,
    Mark
  • Dear Mark

    Thank you so much for your help
    Since I'm new for using F28335 and CCS, so I'm not quite sure how to do.
    The LCD I'm using is 1602A (normally used with arduino) , and I would like to interface it with F28335 by SCI.

    I only have experienced programming wit arduino that it has "liquidcrystal.h" for LCD. But for c2000 device, I haven't done before.

    For the library, as I read from piccolo it contains "piccolo_lcd.h" library file in CCS. I tried to search the lcd related library for F28335 but cannot find. I searched in C:\ti\C2000Ware_1_00_06_00_Software\device_support\f2833x\common and C:\ti\C2000Ware_1_00_06_00_Software\device_support\f2833x\headers folders in my PC.

    You suggested about creating my own library, could I ask how to do?

    Thank you
    JJ
  • JJ.

    I do not see that "piccolo_lcd.h" in any of my Software installations. Are you certain that you found it in a TI provided source? If so, please provide the path so that I can see it. Can you also share a link to the specific LCD you are using?

    As I mentioned in my previous post, I don't think that you will find any driver supplied by TI unless it was shared in a one-off support here on e2e. The embedjournal link looks like it is your best place to start.

    As for creating your own library. You will need to look at the datasheet/ user manual for the LCD screen. Understand what the commands are for the module, and then writing these commands in the C2000 device for the specific peripheral that you need. Just a quick web search shows that there are many types of supported interfaces - UART (SCI), SPI, I2C, parallel. You mentioned SCI. So, you want to also understand the SCI module on the device. Run the SCI examples in C2000Ware, read the SCI user's guide for the SCI, and then write the driver! You can take a look at the DRV8301 SPI example for the F2837xD device (C:\ti\c2000\C2000Ware_1_00_05_00\device_support\f2837xd\examples\cpu1\boostxl_afe031_f28379d_dacmode\cpu01) as an example of how a driver might be structured. This is specifically for the SPI module communicating with the DRV8301, so any code won't be applicable, but hopefully the structure is valuable to learn from. Additionally, Arduino does a great job making these libraries. If you dig down the call-chain and study the lower level HW register calls that you are abstracted from, you should be able to port it over easy enough.

    -Mark