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/EK-TM4C123GXL: Example code for 16x2 lcd

Part Number: EK-TM4C123GXL


Tool/software: Code Composer Studio

I'm looking for some example code for a 16x2 LCD with my TM4C123G. I see alot of feeds asking about troubleshooting some code. But none of the threads actually have any working code posted. Any code or suggestions would be greatly appreciated.

  • Jesse Garza said:
    none of the threads actually have any working code posted.

    May I disagree?    Post ID'ed below is "Number ONE" when "16x2" (alone) is entered w/in Search Box - atop this forum!

    While not (fully) gift wrapped - post comes (awfully close) to meeting your requirement.    (you'll have to read thru the thread - as poster & I resolved his issue - and you'll see a neat photo of my firm's (uber contrast) Lcds.)

    I included a standard "HD44780 Timing Chart" too.   That IC was the grandfather of most all such "character" Lcds.   Today's MCUs are far faster than that HD chip - you MUST insert proper delays so as not to "over-run" that much older (1980's, HD IC).

    Eight bit - rather than four bit - data bus is (very) strongly recommended.

    And - "initialization" is very (very) important - you must comply w/the timings shown in HD spec...

    e2e.ti.com/.../279206

  • Yes I was looking at that thread and as you know the code has no output example. Not to mention the thread spans 4 different post. I was hoping to find a good complete example of using an LCD with Texas Instruments boards. If you can help please let me know.
  • Jesse Garza said:
    ..hoping to find a good complete example of using a (character-based) LCD

    Indeed - yet that (elevated) request was not part of your initial post.

    My preference is to, "Suggest logical "methods of attack" - which best enable "poster-responder "collaboration - and yield (real) learning...

    While you claim, "no output example" - more than 20 here have PM'ed - thanking me for my effort - and noting their success.

  • cb1_mobile,

    I don't understand why you are responding to argue with me. I was simple asking for help. You told to check a post and I had already done so. You are very unprofessional and I will let Texas Instruments , my professor and the other students at my university know how unprofessional you and the support you get here at Texas Instruments website.

    Please stop responding to me post.
  • You are clearly a "most qualified" judge of, "professionalism." Suggesting that you (actually) do some work - make some effort - is FAR from arguing...
  • Once again please stop replying to my post.
  • Hi,

    Indeed, TI does not have anymore an example for 16x2 LCD. The latest one I know about was long time ago, in StellarisWare version 5262, i.e seven years ago, and was related to LM3S 101...817 Cortex M3 microcontrollers, produced by ex-Luminary-Micro company. Google search may help you to find out some code related to DK-LM3S101 board.

    But, you should know that you need to read and understand also the data sheet of that micro, and adapt it to your actual micro.

    Nobody is arguing with you, and ready copy-paste code is hard to find out, because usually with a project you must take care of your sensors connections, this narrowing the possible LCD connections, and the code is related to available pins. Like it or not, this is the case, even if you find out some code, you must need to modify it first to comply with your needs.  This is what everyone/we/I do with every new project using LSC display.

    The link provided by cb1 is the most recent and well structured code, even not complete - just missing a write of a string to the LCD. And I do not understand your position related to cb1, he is always present in the last ten years, helping a lot of people, even with questions not related directly to TM4C micros - this is what makes this forum more appreciated than others... think again, read other forum, compare...

  • Thank you, friend Petrei - appreciated.    And - it must be noted - for many/most of those TEN Years - you have assisted hundreds, as well...

    So that (we) do NOT "argue" - may I note, (your check) is "in the mail..." Just as "YOU TOO" write - (some) poster effort IS required!

  • Once again please stop replying to my post.
  • Thank you for the input on the code.

    "But, you should know that you need to read and understand also the data sheet of that micro, and adapt it to your actual micro.

    Nobody is arguing with you, and ready copy-paste code is hard to find out, because usually with a project you must take care of your sensors connections, this narrowing the possible LCD connections, and the code is related to available pins. Like it or not, this is the case, even if you find out some code, you must need to modify it first to comply with your needs. This is what everyone/we/I do with every new project using LSC display."

    Yes I understand this information it goes without saying. I am not looking for code that I just cut and paste and think its going to work for my needs.
  • For the sake of the community, I'll share my findings about that.

    Actually there is a ready copy-paste code (or close enough), when I was struggling with this same situation I found this site:

    mostlyanalog.blogspot.com.br/.../lcd-display-library-for-tiva-and.html

    Someone already did the work for us. It is limited to 25 MHz, so I modified it to function at all frequencies. It should be simple to port to TM4C1294 also. Mine worked on a WH1602A display with EK-TM4C123GXL

    TivaLCD.rar.

  • Thank you for that link. I will try it out tonight. I appreciate your time.