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.

  • Resolved

TM4C123GH6PGE: TivaWare Graphics Library

Expert 2950 points

Replies: 7

Views: 338

Part Number: TM4C123GH6PGE

Dear all Ti Engineers

https://e2e.ti.com/support/microcontrollers/other/f/908/p/836379/3118630#3118630

[ Logic calculations ]

<Cfal96x64x16.c>

----------------------------------------------------------------------------------------

#define DPYCOLORTRANSLATE8(c)   (   ( ( (c) & 0x00e00000) >> 16) |     \

                                 (   ( (c) & 0x0000e000) >> 11) |                 \

                                 ( ( (c) & 0x000000c0) >> 6)     )

-----------------------------------------------------------------------------------------

RGB888 24bit 100% red (0x00FF0000)   -->  RGB332 8 bit 100% red(0xE0),  Converter OK

   (c)       0x00FF0000                     (c)       0x00FF0000                   (c)     0x00FF0000                

& Mask   0x000E0000                 & Mask   0x0000E000             & Mask   0x000000C0              

-------------------------------              --------------------------------           --------------------------------          

>> 16 0x000E0000                       >> 11     0x00000000              >> 6      0x00000000 

------------------------------              ---------------------------------        -----------------------------------

          0x0000_ 00E0                                  0x0000_0000                         0x0000_0000

  [ Result ]

      0x0000_00E0

       0x0000_0000

     | 0x0000_0000

    ----------------------

      0X000_00E0    =>  0xE0

 

Q1> What does pvDisplayData pointer value mean 0 ?

In TM4C-GRL-UG documentation it's called a pointer.

pvDisplayData is a pointer to the driver-specific data for this display driver.

<Cfal96x64x16.c>

-----------------------------------------------------------------------------------------

const tDisplay g_sCFAL96x64x16 =

{

   sizeof(tDisplay),                                  // int32_t i32Size

   0,                                                        // void *pvDisplayData

   96,                                                     // uint16_t ui16Width

   64,                                                     // uint16_t ui16Height

   CFAL96x64x16PixelDraw,                // void (*pfnPixelDraw)

   CFAL96x64x16PixelDrawMultiple,   // void (*pfnPixelDrawMultiple)

   CFAL96x64x16LineDrawH,              // void (*pfnLineDrawH)

   CFAL96x64x16LineDrawV,              // void (*pfnLineDrawV)

   CFAL96x64x16RectFill,                  // void (*pfnRectFill)

   CFAL96x64x16ColorTranslate,      // uint32_t (*pfnColorTranslate)

   CFAL96x64x16Flush                     // void (*pfnFlush)

};

-----------------------------------------------------------------------------------------

Regards.

Jame,Shin

  • Hello Jame,

      As explained in the graphic library user's guide, the pvDisplayData is a pointer to the driver-specific data for this display driver.  Therefore, it depends on which graphic display you are interfacing with. Different displays may or may not require a driver-specific data. You were questioning why the pvDisplayData is pointing to 0. My interpretation is that this specific display (the CFAL9664-F-B1 OLED panel with SSD 1332 controller made by Crystalfontz) does not require any specific data and hence pvDisplayData is 0. The CFAL9664-F-B1 OLED display is used in the DK-TM4C129x Evaluation board  for which the TivaWare examples are based on. If you are interfacing with other display units you may or may not need to supply additional driver-specific data to the graphic library. You really need to check the datasheet of you respective display to understand why additional data needs to be provided to the graphic library in order to render the graphics. 

     Below please find the link to the CFAL9664-F-B1 OLED panel with SSD 1332 controller datasheet for additional info.

    https://www.crystalfontz.com/products/document/1630/CFAL9664B-F-B1_v1.1.pdf

      Thank you Jame and cb1 and BP101 for sharing your discussion in this forum. You have much more in-depth knowledge about the usage and application of the graphic display. I have to say you are much ahead of us in this area. If there is any flaw in my answer about the pvDisplayData please do correct me if I'm wrong. If the display unit you are using requires any display driver-specific data please show us an example for it. 

    regards,

    Charles

     

  • In reply to Charles Tsai:

    Greetings Charles,

    Staff/I ... 'feel your pain.'

    Do note that poster:

    • specifically requests response from (only) 'T.I.'ers'       "Dear all Ti Engineers"
    • this thread serves as an 'off-shoot' from his earlier, 'List-Box Widget EXPANSION Quest' - which appears highly questionable - thus (all) follow-on efforts may (no matter how inspired/invested) prove in vain!

    May staff note that (famed) 'Tags'  have 'gone the way' of  **LIKE!**     (making it difficult for staff to find 'past posts (blessed) w/properly describing Tags'  (i.e. More 'thoughtful/considered/colorful'  than (ahem)  'so very limited' MCU only!)     Tag appears now (only) w/in thread's opening post!

  • In reply to cb1_mobile:

    Hello Charles,

    Thank you for your reply.

    I previously sent a mail to the crystalfontz company in the US regarding Frame Rate, but no response.

    I want to know the size of data sent per second.

    <Formula of my thoughts>

    Data size per second = Width * High * 3Pixel(RGB) * bit Number per Pixel * Frame Rate (fps)

    I looked at the datasheet of CFAL 9664-FB1 and it says programmable Frame Rate 105hz.

    I ask because the document is unclear or insufficient.

    Normally I think it is 15fps, 30fps, 60fps frame.

    Q1> Let me know number of frames sent per second. ?

    Regards.

    Jame,Shin

  • In reply to Jame shin:

    Hello Jame,

    Ultimately Crystal Fontz will need to answer, but looking at the D/S my interpretation is that 105 Hz is a maximum rate because it sounds like they are trying to characterize the worst case normal mode power consumption. I would imagine it can support 15/30/60 Hz as well. 105 Hz is just another multiple of 15.

    Best Regards,

    Ralph Jacobi

  • In reply to Ralph Jacobi:

    Hello Ralph and Charles,

    Crystal Fontz is still not answered in company question emails.

    Officially, Please send the following questions to the Crystal Fontz Company via Ti Company.

    Attach [Figure 1] to the top for better understanding.

    Q1> How much SCLK should I set if I convert RGB 888 24bit to RGB565 16bit and send it to SPI?

            The number 1 in [Figure 1] is changed from RGB888 24bit to RGB332 8bit in Tiva-TM4C MCU.

    CFAL96x64x16Iint ( ) function in [Figure 1] writes g_ui8DisplayInitCommand [ ] array value to SSD1332 OLED Panel Controller with                        CFAL96x64x16Write Command () function to initialize OLED Panel after setting SPI Interface and Data 8bit, SCLK 4Mhz.

    Analyze as below of initial command value.

    (cfal96x64x16.c)

    static

    uint8_t g_ui8DisplayInitCommands[ ] =

    {

    //   0xAE,             // display off

       0x87, 0x07,       // master control current 7/16

       0x81, 0xA0,       // contrast A control

       0x82, 0x60,       // contrast B control

       0x83, 0xB0,       // contrast C control

       0xA0, 0x20,//00 // remap and data format - use 8-bit color mode

       0xBB, 0x1F,       // Vpa

       0xBC, 0x1F,       // Vpb

       0xBD, 0x1F,       // Vpc

    //   0xAD, 0x8E,   // internal Vp, external supply

       0x26, 0x01,       // rectangle fill enabled

       0xAF               // display on

    };

    1. 0xA0, 0x20,//00 // remap and data format - use 8-bit color mode

                   0xA0 // Set Re-Map & Data Format,

                   0x20 // A[0]=0 Horizontal address increment (RESET)

                               A[0]=1, Vertical address increment

                               A[1]=0, Column address 0 is mapped to SEG0 (RESET)

                              A[1]=1, Column address 95 is mapped to SEG0

                               A[4]=0, Scan from COM 0 to COM [N –1]

                               A[4]=1, Scan from COM [N-1] to COM0. Where N is the Multiplex ratio.

                               A[5]=0, Disable COM Split Odd Even (RESET)

                               A[5]=1, Enable COM Split Odd Even

                               A[7:6]=00; 256 color format , 01; 65k color format(RESET)

                  

               2. 0xBB, 0x1F, // Vpa ,   0xBC, 0x1F, // Vpb,   0xBD, 0x1F, // Vpc

                 0xBB, 0xBC, 0xBD // VPA, VPB, VPC level setting for Color

                   0x1F  // A[7:0] 0x00 0.43*VREF, 0x3F 0.83* VREF, 0xEF 1.0* VREF, 1xxxxxxx   connects to VCOMH   (RESET)

                             VREF (+13V) / 2^8(256) = 50.78mV (1 step) , 0x1F(31’d) , 50.78mV * 31 = 1.574 V

                             Vpa ,Vpb, Vpc = 1.574 V

    Q2> In the previous post, I talked about what the frame rate can be programmed up to 105hz.

           Refer to No. 5 in the top of [Figure1] for DCLK, and below frame rate formula is “13 AC CHARACTERISTIS” in the datasheet.

           When calculated with the Command of Sample Code, the result is 891.5hz beyond 105hz.

           Please tell me what's wrong. ?

    FFRM (Frame Frequency) = (Fosc x 1/(D x K x 64))

           Fosc = 0.97Mhz

           D : divide ratio (RESET=1) ,

           K : number of Display clocks (RESET=136, i.e. phase1 DCLK + phase2 DCLK + phase3 DCLK = 4+7+125)

       (CFAL9664B-F-B1_v1.1.pdf Sample Code in Datasheet)

    ---------------------------------------------------------------------------------

    oled_cmd(0xB1);//phase 1 and period adjustment(discharge,charge)

    oled_cmd(0xF1);

    oled_cmd(0xB3);//display clock divider/oscillator frequency

    oled_cmd(0xF0);

    --------------------------------------------------------------------------------

               0xB1 // Phase 1 and 2 period adjustment (discharge,charge)

               0xF1 // A[3:0] Phase 1 period in 1~16 DCLK clocks [RESET=4h] = 1

                     // A[7:4] Phase 2 period in 1~16 DCLK clocks [RESET=7h] = 16

             0xB3 // display clock divider & oscillator frequency

               0xF0 // A[3:0] DCLK is generated from CLK divided by DIVIDER +1 (i.e., 1 to 16) = 1

                     // A[7:4] Fosc frequency, RESET=D0H , Frequency increases as level increases

    D: divide ratio = 1

    K: number of Display clocks = 1 + 16 =17

    [RESULT]

    FFRM (Frame Frequency) = (Fosc x 1/(D x K x 64))

                                                  0.97e+6 x ( 1 / ( 1 x 17 x 64)) = 891.5 Hz

    Q3> [Figure1] No.4 Gray Scale Table is the value when RGB565 16bit.

                       What is the value of Gray Scale Table when RGB332 is 8bit?

    Q4> [Figure1] In No. 6, RGB332 8bit values are mapped to RGB565 16bit conversion table value.

                       What does it mean to convert from 8 bits to 16 bits?

                       For example, is MCU 8bit data converted from SSD1332 OLED Panel Control IC to 16bit again !!

    Q5> [Figure1] No. 2 is displayed via No. 3 at the starting point of sending RGB332 8bit data. What is the response time?

                       

    Regards.

    Jame,Shin


  • In reply to Jame shin:

    Hello Jame,

    Jame shin
    Officially, Please send the following questions to the Crystal Fontz Company via Ti Company.

    This is not something we can do. At least, not Charles and I.

    If you have a local TI contact for support maybe that is something they do, but neither Charles or I can take that action.

    Best Regards,

    Ralph Jacobi

  • In reply to Ralph Jacobi:

    Hello Ralph and Charles,

    Thank you for your reply

    I said “Officially” because I thought the question would be easily communicated.

    I was an imprudent  remark about it. and Sorry for not being humble.

    I'm receiving mail from OLED's Crystalfontze company and talking.

    As a result I will share in the question.

    Thank you

    Regards.

    Jame,Shin

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.