Snippet - Fine tuning the EMX LCD controller

Fine tuning the EMX LCD controller

For those using the EMX and trying to interface a custom LCD, a fine grain control over the controller parameters is necessary.

This snippet shows how to configure the internal LCD controller registers.


@ WouterH - Great work!

Shoot me a note at Contact Me – and I’ll hook you up with a custom mounting board for your showcase project! Just let me know what overall dimensions you’d like. Will also need your address so I can send it across the pond.


Thank you WouterH ! Your codehas been really helpfull for me!

To tune a “near to work configuration” It helps me to find for ex the correct prescaler value:
From your code, I used the Read register function, and incremented from this value, just like this:
My LCD “umsh 8252md-t” (datasheet here now works like a charm !
Except that colors are a bit ugly (I guess I have to setup gamma values correctly for better results)

            Register LCD_CFG = new Register(0xE01FC1B8);
            Register LCD_TIMH = new Register(0xFFE10000);
            Register LCD_TIMV = new Register(0xFFE10004);
            Register LCD_POL = new Register(0xFFE10008);
            uint uiRegVal = 0x00000000;
            uiRegVal = LCD_CFG.Read();
            //test LCD panel clock prescaler values , incrementing from the current value 
            for (uint uinc = uiRegVal; uinc < uiRegVal + 10; uinc++)