User`s manual

9: SAMPLE CODE
2-42 EPSON S1D13504 PROGRAMMING NOTES
AND EXAMPLES (S19A-G-002-06)
** In 8BPP mode only the first 8 red, first 8 green
** and first 4 blue values are used.
**
** Setup the pointer to the LUT data and reset the LUT index register.
** Then, loop writing each of the RGB LUT data elements.
*/
pLUT = LUT8;
*(pRegs + 0x24) = 0;
for (idx = 0; idx < 8; idx++)
{
for (rgb = 0; rgb < 3; rgb++)
{
*(pRegs + 0x26) = *pLUT;
pLUT++;
}
}
/*
** Registers 28-2E: RAMDAC - not used in this example. Programmed very
** similarly to the LUT but all 256 entries are used.
*/
/*
** Register 23: Performance Enhancement - display FIFO enabled, optimum
** performance.
*/
*(pRegs + 0x23) = 0x10; /* 0001 0000 */
/*
** Register D: Display Mode - 8 BPP, LCD enable.
*/
*(pRegs + 0x0D) = 0x0D; /* 0000 1101 */
}