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.

Port Sitara LCD to Tiva

Other Parts Discussed in Thread: TM4C129XNCZAD

Hi there,

I am looking to install a 7 inch, 800x480 LCD panel on the DK-TM4C129X Tiva display. My LCD has a 40-pin connector, the Tiva board accepts a 60 pin one. The pin-out of my LCD panel is the exact same as the Newhaven LCD found on the TI Sitara boards. My question is: would it be feasible to make a physical adapter from 60-pin to 40-pin and then take a Sitara LCD driver and adapt it to the Tiva board? How easy would it be to adapt the code? If not, are there any LCD's that would fit the Tiva 60-pin connector?

Here is the Tiva Kentec LCD pin-out (page 6):

http://www.kentec.com.hk/images/UploadFile/20111115190922-7.pdf

Here is the Sitara Newhaven LCD pin-out (page 4):

http://www.newhavendisplay.com/specs/NHD-4.3-480272EF-ATXL-T.pdf

Thank you in advance!

  • Hello Horatiu

    Yes, it should be possible.You can instead check J34 for the header to interface the Sitara LCD Panel

    Regards
    Amit
  • Hi Amit,

    Thank you for your prompt reply. I have stared looking into porting the firmware from Sitara to Tiva. The header connections are also being taken care of.

    My biggest obstacle at this moment is finding correct timing parameters. The datasheet for my LCD is not very helpful, but I was told that these parameters are highly dependent on the controller/driver being used. My LCD uses OTD9960/OTA7001 driver IC (a Frida FRD700740 - datasheet attached). On page 11 and 12 of the PDF are the timing diagrams.

    I had a very easy time extracting timing parameters for one of the examples provided in the /peripherals/lcd/ folder (the Formike KWH070KQ13-F02) as it had a table with all these values in the datasheet. However, the Frida datasheet does not explain this information very clearly at all. Knowing that the LCD uses the OTD9960/OTA7001 driver IC, what other LCD's use this driver and have a clear enough datasheet? If you could help me with that, I would be very grateful.

    I'm looking for the following parameters:

    1. Pixel Clock Frequency
    2. Horizontal Front Porch
    3. Horizontal Back Porch
    4. Horizontal Sync Width
    5. Vertical Front Porch
    6. Vertical Back Porch
    7. Vertical Sync Width

    Frida_FRD700740.pdf

  • I must have not been paying attention, but, upon searching for "OTA7001,OTD9960" on Google, the first link (www.sqm4.com/frd7040tp-t-rgb-tft-lcd-7-inch-embedded-display) allows the user to see data sheets for the OTA7001 and the OTD9960.

    Timings can be obtained from there for both Horizontal and Vertical, Front and Back porches as well as Pulse Widths.
    Ex: DClock Frequency - 30MHz
  • Hello Horatiu,

    The timing parameters are generally in the data sheet are mostly derived from the pixel clock. The HxP would be multiple of Pixel Clock and VcP would be a multiple of Horizontal lines. Porting over the sw from Sitara to TM4C may not be that easy. However as a simple step, it would be good to start with a simple example to configure the LCD for displaying an all "red" or "blue" image...

    Regards
    Amit
  • Hi Amit,

    Yes, you are right and that is what I'm trying to do now. With the timing parameters done, I have opened the raster_example.c file in "/examples/peripherals/lcd" and I'm going through it line by line, checking everything against the TM4C129XNCZAD data sheet and re-writing a new file. It's going to take a while but I should be able to match all the GPIO's and registers from Sitara to Tiva.

    May I ask, if the Sitara Newhaven LCD and my Frida LCD have different controllers, will the timings be the only thing that is different? I.e. assuming 1) the hardware adapter works and 2) I port everything else correctly from Sitara to Tiva and 3) I got the timings correct, should this thing work?
  • Hello Horatiu,

    They could be. In my limited experience with a few vendors, I have not seen much difference. Concept remains the same.

    Regards
    Amit
  • Thank you, Amit. You guys are awesome!

    Best regards,
    Horatiu
  • Hi guys,

    I'm trying to set up SDRAM for my 800x480 LCD screen. The example present in the "examples/peripherals/lcd/" folder attempts a 64MB SRAM initialization (through EPI), but I don't have external RAM attached to the board, only the 256k embedded in it.

    How can I get around this obstacle? I understand my current RAM size cannot not support the full 800w x 400h x 24bpp / 8 = 1125kB of buffer needed to start this example, but I don't know how else to proceed. A colleague suggested that my only choice is to send the image in chunks but I would like an example to follow in order to do this.

    Best regards,
    Horatiu
  • Hello Horatiu

    Is the external panel a Raster Mode Panel or a LIDD Mode Panel?

    Regards
    Amit
  • Horatiu said:
    examples/peripherals/lcd/" folder attempts a 64MB SRAM initialization (through EPI), but I don't have external RAM attached to the board, only the 256k embedded in it.   How can I get around this obstacle?

    You cannot - and you've known - or should have known - of this from the get-go.  There is "good reason" that TFT Controllers (which embed adequate RAM w/in) exist!

    Amit's earlier suggested that you reduce your memory requirement - by employing just a single color.  Such will - at minimum - confirm your pixel timing and verify screen addresses.  And yield glorious mono-chrome!   Colleagues suggestion of sending, "partial image" makes no sense (other than verifying your signal handling & timing) - we'd ask why you chose a pixel-laden TFT if you can support only a fraction of those pixels?

    If the display world solves such issues w/massive, external SRAM - why would you deviate?   (and then complain here!)   Hard to feel sympathy when pain is both quite predictable - and totally "self-inflicted!"

    If proper (speed, size, type) external SRAM is to (remain) rejected - "getting around your self-created obstacle" is achieved by employing a TFT w/appropriate, in-built - TFT Controller & Frame buffer...

  • Thank you cb1_mobile!
    I want to see if I can get to properly talk to the screen before investing in SRAM. With that said, I will try monochrome - thank you for this idea. I'm fairly new to Tiva boards but from this point on, I imagine the following:
    - I have to initialize the screen without initializing EPI and
    - make sure the image buffer is set inside the 256k RAM available on the Tiva board

    Another question I have is: On the datasheet, my TFT has a source driver and a gate driver (OTA7001/OTD9960). Is this the same thing as a controller & frame buffer combination you are talking about? The source driver is a 1200-something channel device and it works with resolutions higher than available on the TFT.
  • Horatiu said:
    my TFT has a source driver and a gate driver (OTA7001/OTD9960). Is this the same thing as a controller & frame buffer?

    Unfortunately not.  Your pixel rich TFT requires both (pixel) row & column drivers - (2 you mention appear to serve that role).   All such displays are "multi-plexed" meaning that the pixel rows are sequentially "scanned" - yet the persistence of human vision leads us to believe the "entire screen" is on/alive...   While both source & gate drivers play vital parts - neither encompass the TFT Controller or Frame Buffer.

    Now your 129xx MCU does provide a, "TFT Controller" although we've not used - and I'm uncertain if that "control aspect" functions fully/properly minus the (proper) presence of external memory to serve as TFT's "Frame Buffer." 

    I'd suggest - if you continue to resist the "normal/customary" use of proper EPI compatible SRAM - that you target a smaller, less pixel-laden TFT, reduce the number of colors "in play" and proceed in that manner.   In fairness - vendor's Amit was first to suggest "color reduction" as a means to reduce SRAM requirement.   Beyond SRAM "savings" - you may drive a single display data bit (R, G or B) tieing all others to ground - greatly easing/speeding connection!   (while yielding glorious mono-chrome!)

    Your initial decision "avoid the investment in proper SRAM" (appears) to transfer your costs in other (unwanted) directions (thus eating your "savings") - while not providing the firm/hard qualitative data you seek!   At times - incorrect or poorly analyzed "decisions" - return to "bite" us.   This (may) be one of those times...

  • Hello cb1_mobile!
    I finished porting the LCD - 800 x 480 x 1 pbb. The timings is the next issue I'm colliding against. My screen is either all black or all white, depending on how I fill the initial frame buffer, and then I get thrown into an Frame Synchronization Lost Enabled Interrupt and Clear.

    The datasheet of the OTA7001A source driver says the following:
    Clock Frequency: 30MHz
    H Line Width: 928
    H Display Area: 800
    H Front Porch: 40
    H Back Porch: 88
    H Pulse Width: Min - 1, Typ - 48
    V Period Time: 525
    V Display Area: 480
    V Front Porch: 32
    V Back Porch: 13
    V Pulse Width: 3

    From what I noticed, in this datasheet...
    Line Width = Display Area + Front Porch + Back Porch

    ...but in other specifications (for other drivers/controllers), Line Width = Display Area + Front Porch + Back Porch + PULSE WIDTH

    I have tried running configurations with the above settings, with H Pulse Width set to '1', and with H Pulse Width & V Pulse Width set to '0'. None of them have worked so far.

    Any help would be appreciated.

    Best regards,
    Horatiu
  • Problem solved. As mentioned in the TM4C129XNCZAD datasheet, the frame error is caused by either 1) invalid frame buffer address (display buffer too small?) or 2) invalid BPP value. I was using a buffer size too small.

    The fomula to calculate buffer size is:
    WIDTH x HEIGHT x (BPP / 8) + HEADER;

    I was using:
    (WIDTH x HEIGHT x BPP)/8 + HEADER;

    The two formulas are equivalent only if allowed to use floating point math, otherwise they are not. When using BPP values of less than 8, the result of the two formulas differs.

    Thanks,
    Horatiu
  • Horatiu said:
    The two formulas are equivalent only if allowed to use floating point math

    First off - glad you persisted and got some positive results.   Had you tried my suggestion of tieing all bits (but MSb) of ONE color only to ground - and the MSb to logic high?   Such should yield (either) a red, green, or blue dot fill.

    I don't agree that "floating point" resolves the "parenthesis" location issue.   Recall that our small tech firm has designed, produced, sold such displays (in volume) long prior to "floating point's" becoming available for "normal" MCUs.   Your compiler's handling of math - or settings (optimizations) - may also impact.

    Without any changes now - you may wish to attempt to alternate "pixel/bit On/Off" and note results.  This test/verifies your pixel clock.  Always useful to continue this test across a 2nd pixel row - to insure that you properly manage "row to row" transitions.

    Should that work - you may graduate to 3 bits/pixel (you connect only to MSbit of R, G & B) all other data bits are @ ground potential.  Should proper colors - and color sequences now emerge - your controller (appears) to be well mated to your candidate display...