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.

Where to find base examples for grlib on Tiva for Kentec Display - touch and image example code?

Other Parts Discussed in Thread: EK-TM4C123GXL, EK-TM4C1294XL, BOOSTXL-K350QVG-S1

I have literally spent multiple hours trying to find how to use my Kentec EB-LM4F120-L35 display with my Tiva EK-TM4C1294XL Launchpad, for image display and touch interaction. The basics, the 'Hello Worlds', and I cannot find these.

Where can we find such "Kentec 101, Hello World for image display and touch interaction"? These use grlib, and from my understanding GrImageDraw() for drawing images, but the example grlib_demo code provided in TivaWare does an offensively primitive and deeply nested demonstration of GrImageDraw(), and fails strongly at showing the user anything of how it works or how to use it.

I have thus not looked into touch use at the moment, images are a prerequisite task for my application.

 

Question

Where is basic illustrative and/or explanatory documentation on GrImageDraw? Is there basic example code?

 

Supplement

I am surprised, I did not expect this. The demo code (ek-tm4c1294xl-boostxl-kentec-l35/grlib_demo) works so smoothly for image display and touch, yet is so heavily layered and nested it is impossibly retractable. And the commenting here is offensively procedural and standardized - it has little concern or intent to teach or to illustrate!

  • After many, painful hours I have arrived at a simple, low complexity solution, see attached if needed :)!

    Steps

    1. [Kentec320x240x16_ssd2119_8bit.c mod : 704]
      1. Copy Kentec320x240x16_SSD2119PixelDraw() to jmr_Kentec320x240x16_SSD2119PixelDraw(), a non-static version and place the new fcn directly below Kentec320x240x16_SSD2119PixelDraw(). Create a prototype in Kentec320x240x16_ssd2119_8bit.h with extern
    2. main.c
      1.  Do the following (see below, and in zip file attached)

    Example Code

    //*****************************************************************************
    // Provides a scribble pad using the display on the Intelligent Display Module.
    //*****************************************************************************
    int main(void) {
        // Run from the PLL at 120 MHz.
        g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL |  SYSCTL_CFG_VCO_480), 120000000);
    
        // Configure the device pins for this board.
        // This application does not use Ethernet or USB.
        PinoutSet(false, false);
    
        // Initialize the display driver.
        Kentec320x240x16_SSD2119Init(g_ui32SysClock);
    
        // Initialize the graphics context.
        GrContextInit(&g_sContext, &g_sKentec320x240x16_SSD2119);
    
        // Flush any cached drawing operations.
        GrFlush(&g_sContext);
    
        // Set the color index to zero.
        g_ui32ColorIdx = 0;
    
        // Initialize the message queue we use to pass messages from the touch interrupt handler context to the main loop for processing.
        RingBufInit(&g_sMsgQueue, (uint8_t *)g_psMsgQueueBuffer,
                    (MSG_QUEUE_SIZE * sizeof(tScribbleMessage)));
    
        int ix = 0;
        int iy = 0;
    
        for(ix=0;ix<320;ix++) {
        	for(iy=0;iy<240;iy++) {
    
        		int image_index = (ix) + (iy*320);
    
        		jmr_Kentec320x240x16_SSD2119PixelDraw(0, ix, iy, DPYCOLORTRANSLATE(image_pikes[image_index]));
        	}
        }
    
        for(;;);
    }
    

     


    3264.ti_kentec_image.zip

  • Hello Justin,

    The Kentec EB-LM4F120-L35 has been obsoleted by the manufacturer and now replaced with the BOOSTXL-K350QVG-S1 booster pack. So all code has now been migrated to the booster pack for both EK-TM4C123GXL and EK-TM4C1294XL LaunchPads. The software for the same and the examples have been made available in TivaWare 2.1.3.156 software release

    As for the grlib, yes it is heavily layered, but there are other software for graphics like TouchGFX which follow a different approach (and licensing cost) that may not be viable for every user....
  • hmmm, version 2.1.3.156.

    A funny story, this bloke here initially ordered the  Kentec EB-LM4F120-L35, a month or so ago as the documentation on TI's something-or-other indicated this unit. Then after investigation I was told "use the K350 now". Ok, fine I bought that unit as well then.

    Then when I downloaded TivaWare, vers 2.1.2.111. Sure, the dang core drivers are for the K350QVG, but the dang examples are still for the LM4F120!! :(!

    Illustration

    • Kentec320x240x16_ssd2119_8bit.c header excerpt:
    // Kentec320x240x16_ssd2119_8bit.c - Display driver for the Kentec
    //                                   K350QVG-V2-F TFT display with an SSD2119
    

    • scribble.c source excerpt:
    //! The LCD BoosterPack (EB-LM4F120-L35) should be installed on
    //! BoosterPack 2 interface headers.
    //

    I was discouraged and confused by this mixup, but proceeded forward with scribble and the LM4F120 worked, done! :)!

    It is useful to note, I only posted my example here as I could not find any working example code for the problem statement of "how to draw an image" from TI, and thus generated and posted my solution with consideration of future users.

    Next Steps

    • Thank you for your early Mon AM replay Amit :)
    • what the heck guys. Post up some dam* example code, for touch and for images
      • that users can use!!!
      • the existing content is laughably obtuse, with poor syntax, commenting, structure and display. imho, of course...

  • Hello Justin

    Ah yes. The TivaWare 2.1.2.111 was still having the examples for the older LCD interface module.

    I still did not get the last part. Better examples with what as the content?
  • like an example which does what my posted example in the ZIP above does. Read a picture and print to screen :)
  • Following in line with my originating post where I exclaimed "how to do images and touch, here is my completed touch example. Given Amit's input, on TivaWare 2.1.3.156 this may be a wasted and silly effort, nevertheless I post up here for completion :)

    ti_kentec_touch.zip

  • Hello Justin

    No effort is wasted. I believe yours may be the 2nd post where someone got it to work from bare code..