<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem in driving 7&amp;quot; LCD using LPC1788 MCU in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671926#M26874</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, please, can you send me a project?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Nov 2018 17:59:06 GMT</pubDate>
    <dc:creator>oleg333674</dc:creator>
    <dc:date>2018-11-14T17:59:06Z</dc:date>
    <item>
      <title>Problem in driving 7" LCD using LPC1788 MCU</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671922#M26870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I &amp;nbsp;am recently working with a custom design board which is inspired by "μEZGUI-1788-70WVM Kit development board". My first goal with my board is to drive a RGB interface 7" LCD using LPC1788 which has an embedded LCD driver inside. Then after achieving this applying an EMWIN demo project to see the result.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reading through&amp;nbsp;UM10470_LPC1788 user manual for LCD interfacing, Chapter 11; it seems to me driving an LCD using LPC1788 is not a big deal, but when it comes to real world, the reality was different than I assumed. Even though I&amp;nbsp;took&amp;nbsp;NXP_LPC1788_emWin522_BSP codes as a reference to my coding, I could not managed to drive LCD except its backlight. I can only control its backlight right now and can only supply 30Mhz panel clock(LCD_DCLK). My problem that I verified by an oscilloscope that, even though setting TIMH and TIMV registers, LPC1788 could not create HSYNC, VSYNC and LCD_ENAB_M signals at all. So, the LCD could not display anything.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyones helps/comments are&amp;nbsp;highly appreciated. Please help me to solve&amp;nbsp;this problem.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Summary of my HW:&lt;/P&gt;&lt;P&gt;LPC1788,&lt;/P&gt;&lt;P&gt;SDRAM (MT48LC4M32B2P-7)&lt;/P&gt;&lt;P&gt;LCD (NHD-7.0-800480EF-ATXL#-CTP)&lt;/P&gt;&lt;P&gt;The first thing that I've suspected is the SDRAM. Hence, I also minimized my coding by removing SDRAM routines and defining a small videoRAM (aVRAM, 5KB in size) within MCU RAM. But the result is the same. There is not HSYNC, VSYNC&amp;nbsp;&lt;SPAN&gt;and &lt;/SPAN&gt;&lt;SPAN&gt;LCD_ENAB_M signals. But LCD clock which is 30MHZ is successfully generated. And the backlight is successfully operating.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can find the code as an attachment to this post (main.c) which is also exist below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#ifndef _WINDOWS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#include "HWConf.h"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#include "Timers.h"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#include "74HC595.h"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#include "TypeDefs.h"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#include "LPC177x_8x.h" // Device specific header file, contains CMSIS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#include "system_LPC177x_8x.h" // Device specific header file, contains CMSIS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#ifdef __CROSSWORKS_ARM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;extern void __low_level_init(); // hwconf.c&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;static volatile unsigned int _Continue1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;void HardFault_Handler(void) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;_Continue1 = 0u;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;//&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;// When stuck here, change the variable value to != 0 in order to step out&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;//&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;while (_Continue1 == 0u);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;static U32 _FindClockDivisor(U32 TargetClock) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U32 Divider;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U32 r;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Divider = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; while (((SystemCoreClock / Divider) &amp;gt; TargetClock) &amp;amp;&amp;amp; (Divider &amp;lt;= 0x3F)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Divider++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; if (Divider &amp;lt;= 1) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; r = (1 &amp;lt;&amp;lt; 26); // Skip divider logic if clock divider is 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; } else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; // Use found divider&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Divider -= 2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; r = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((Divider &amp;gt;&amp;gt; 0) &amp;amp; 0x1F)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((Divider &amp;gt;&amp;gt; 5) &amp;amp; 0x1F) &amp;lt;&amp;lt; 27))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; return r;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;typedef struct {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 HBP; // Horizontal back porch in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 HFP; // Horizontal front porch in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 HSW; // HSYNC pulse width in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U16 PPL; // Pixels per line&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 VBP; // Vertical back porch in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 VFP; // Vertical front porch in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 VSW; // VSYNC pulse width in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U16 LPP; // Lines per panel&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 IOE; // Invert output enable, 1 = invert&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 IPC; // Invert panel clock, 1 = invert&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 IHS; // Invert HSYNC, 1 = invert&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 IVS; // Invert VSYNC, 1 = invert&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 ACB; // AC bias frequency in clocks (not used)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 BPP; // Maximum bits per pixel the display supports&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U32 Clk; // Optimal clock rate (Hz)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 LCD; // LCD panel type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U8 Dual; // Dual panel, 1 = dual panel display&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} LCD_PARAM;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define MATRIX_ARB (*(volatile U32*)(0x400FC188))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;static LCD_PARAM _LcdParams;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;static U8 _Display;&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define VRAM_ADDR (U32)&amp;amp;aVRAM[0]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;U32 aVRAM[200 * 100];// __attribute__ ((section ("0x10001000")));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;static void _InitLCDC(void) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U32 i;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;//&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; // Translate and check params&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; if (_LcdParams.BPP == 16) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.BPP = 6;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; } else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; while (1); // Error, display mode not yet supported&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; if (_LcdParams.LCD == 0) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.LCD = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; } else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; while (1); // Error, display type not yet supported&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; // Init LCDC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_SC-&amp;gt;PCONP |= (1UL &amp;lt;&amp;lt; 0); // Power the LCDC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_LCD-&amp;gt;CTRL &amp;amp;= ~(1UL &amp;lt;&amp;lt; 0); // Disable the LCDC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_LCD-&amp;gt;TIMH = 0 // Configure horizontal axis&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | ((((U32)_LcdParams.PPL / 16) - 1) &amp;lt;&amp;lt; 2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((U32)_LcdParams.HSW - 1) &amp;lt;&amp;lt; 8)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((U32)_LcdParams.HFP - 1) &amp;lt;&amp;lt; 16)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((U32)_LcdParams.HBP - 1) &amp;lt;&amp;lt; 24)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_LCD-&amp;gt;TIMV = 0 // Configure vertical axis&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((U32)_LcdParams.LPP - 1) &amp;lt;&amp;lt; 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((U32)_LcdParams.VSW - 1) &amp;lt;&amp;lt; 10)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((U32)_LcdParams.VFP) &amp;lt;&amp;lt; 16)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((U32)_LcdParams.VBP) &amp;lt;&amp;lt; 24)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_LCD-&amp;gt;POL = 0 // Configure clock and signal polarity&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (_FindClockDivisor(_LcdParams.Clk) &amp;lt;&amp;lt; 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((U32)_LcdParams.ACB - 1) &amp;lt;&amp;lt; 6)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((U32)_LcdParams.IVS) &amp;lt;&amp;lt; 11)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((U32)_LcdParams.IHS) &amp;lt;&amp;lt; 12)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (((U32)_LcdParams.IPC) &amp;lt;&amp;lt; 13)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | ((((U32)_LcdParams.PPL+176) - 1) &amp;lt;&amp;lt; 16)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_LCD-&amp;gt;CTRL = 0 // Configure operating mode and panel parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | ((U32)_LcdParams.BPP &amp;lt;&amp;lt; 1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | ((U32)1 &amp;lt;&amp;lt; 8)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | ((U32)_LcdParams.LCD &amp;lt;&amp;lt; 5)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; for (i = 0; i &amp;lt; GUI_COUNTOF(LPC_LCD-&amp;gt;PAL); i++) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_LCD-&amp;gt;PAL[i] = 0; // Clear the color palette with black&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_SC-&amp;gt;LCD_CFG = 0x0; // No panel clock prescaler&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; // Enable LCDC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;LPC_LCD-&amp;gt;UPBASE = VRAM_ADDR;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_LCD-&amp;gt;LPBASE = VRAM_ADDR;&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_LCD-&amp;gt;CTRL |= (1 &amp;lt;&amp;lt; 0); // Enable LCD signals&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_LCD-&amp;gt;CTRL |= (1 &amp;lt;&amp;lt; 11); // Enable LCD power&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;LPC_GPIO1-&amp;gt;SET |= (1 &amp;lt;&amp;lt; 2); // Set backlight to on&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;static void initram (void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U32 i;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; for (i = 0; i &amp;lt; 12000; i++) { &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; aVRAM[i] = 0x7E0 + (0x7E0&amp;lt;&amp;lt;16); // Set the color palette with green (RGB565)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;static void _InitLCDPorts(void) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P0_4 = 7; // LCD_VD_0 R0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P0_5 = 7; // LCD_VD_1 R1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P4_28 = 7; // LCD_VD_2 R2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P4_29 = 7; // LCD_VD_3 R3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P2_6 = 7; // LCD_VD_4 R4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P2_7 = 7; // LCD_VD_5 R5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P2_8 = 7; // LCD_VD_6 R6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P2_9 = 7; // LCD_VD_7 R7&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P0_6 = 7; // LCD_VD_8 G0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P0_7 = 7; // LCD_VD_9 G1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P1_20 = 7; // LCD_VD_10 G2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P1_21 = 7; // LCD_VD_11 G3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P1_22 = 7; // LCD_VD_12 G4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P1_23 = 7; // LCD_VD_13 G5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P1_24 = 7; // LCD_VD_14 G6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P1_25 = 7; // LCD_VD_15 G7&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P0_8 = 7; // LCD_VD_16 B0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P0_9 = 7; // LCD_VD_17 B1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P2_12 = 7; // LCD_VD_18 B2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P2_13 = 7; // LCD_VD_19 B3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P1_26 = 7; // LCD_VD_20 B4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P1_27 = 7; // LCD_VD_21 B5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P1_28 = 7; // LCD_VD_22 B6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P1_29 = 7; // LCD_VD_23 B7&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;LPC_IOCON-&amp;gt;P2_0 = 7;// | 1 &amp;lt;&amp;lt;10 ; // LCD_PWR; set 1&amp;lt;&amp;lt;10 for OpenDrain output&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P2_2 = 7; // LCD_DCLK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P2_3 = 7; // LCD_FP VSYNC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P2_4 = 7; // LCD_ENAB_M DEN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_IOCON-&amp;gt;P2_5 = 7; // LCD_LP HSYNC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;LPC_GPIO1-&amp;gt;DIR |= (1 &amp;lt;&amp;lt; 2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; LPC_GPIO1-&amp;gt;CLR |= (1 &amp;lt;&amp;lt; 2); // Initially set backlight to off&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HBP_NEWHAVEN_7 88 // Horizontal back porch in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HFP_NEWHAVEN_7 40 // Horizontal front porch in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define HSW_NEWHAVEN_7 48 // HSYNC pulse width in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define PPL_NEWHAVEN_7 800 // Pixels per line&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define VBP_NEWHAVEN_7 10 // Vertical back porch in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define VFP_NEWHAVEN_7 5 // Vertical front porch in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define VSW_NEWHAVEN_7 3 // VSYNC pulse width in clocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define LPP_NEWHAVEN_7 50 // Lines per panel&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define IOE_NEWHAVEN_7 0 // Invert output enable, 1 = invert&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define IPC_NEWHAVEN_7 1 // Invert panel clock, 1 = invert&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define IHS_NEWHAVEN_7 1 // Invert HSYNC, 1 = invert&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define IVS_NEWHAVEN_7 1 // Invert VSYNC, 1 = invert&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define ACB_NEWHAVEN_7 1 // AC bias frequency in clocks (not used)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define BPP_NEWHAVEN_7 16 // Bits per pixel b110 = 16 bpp 5:6:5 mode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define CLK_NEWHAVEN_7 30000000 // Optimal clock rate (Hz) according to datasheet&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define LCD_NEWHAVEN_7 0 // Panel type; 0: LCD TFT panel&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#define DUAL_NEWHAVEN_7 0 // No dual panel&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;enum {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; DISPLAY_TRULY_240_320,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; DISPLAY_BOARD_480_272,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; DISPLAY_BOARD_800_480&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;static void _UpdateDisplayConfig(void) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;_Display = DISPLAY_BOARD_800_480; //DISPLAY_TRULY_240_320;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; // Setup display settings for display&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.HBP = HBP_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.HFP = HFP_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.HSW = HSW_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.PPL = PPL_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.VBP = VBP_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.VFP = VFP_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.VSW = VSW_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.LPP = LPP_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.IOE = IOE_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.IPC = IPC_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.IHS = IHS_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.IVS = IVS_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.ACB = ACB_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.BPP = BPP_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.Clk = CLK_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.LCD = LCD_NEWHAVEN_7;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _LcdParams.Dual = DUAL_NEWHAVEN_7;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;static void _InitLCDbugra(void) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _InitLCDPorts();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; // Setup BUS priorities&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; MATRIX_ARB = 0 // Set AHB Matrix priorities [0..3] with 3 being highest priority&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (1 &amp;lt;&amp;lt; 0) // PRI_ICODE : I-Code bus priority. Should be lower than PRI_DCODE for proper operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (2 &amp;lt;&amp;lt; 2) // PRI_DCODE : D-Code bus priority.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (0 &amp;lt;&amp;lt; 4) // PRI_SYS : System bus priority.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (0 &amp;lt;&amp;lt; 6) // PRI_GPDMA : General Purpose DMA controller priority.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (0 &amp;lt;&amp;lt; 8) // PRI_ETH : Ethernet: DMA priority.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (3 &amp;lt;&amp;lt; 10) // PRI_LCD : LCD DMA priority.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; | (0 &amp;lt;&amp;lt; 12) // PRI_USB : USB DMA priority.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;_InitLCDC();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;/*********************************************************************&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;* main&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;int main(void) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; U32 i;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; #ifdef __CROSSWORKS_ARM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; __low_level_init();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; #endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; #ifndef _WINDOWS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; HW_X_Config(); // Initialization of Hardware&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; configureTimer1(1000); // Configure an interrupt using Timer1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; //MainTask(); // emWin application&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; initram();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _UpdateDisplayConfig();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _InitLCDbugra();&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; // main loop&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; while(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;//do nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337932"&gt;Main.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2017 19:28:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671922#M26870</guid>
      <dc:creator>h_bugragunes</dc:creator>
      <dc:date>2017-05-08T19:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in driving 7" LCD using LPC1788 MCU</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671923#M26871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class=""&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check the AN11244 application note. This application note describes the basics of using emWin on NXP microcontrollers. Please let me know if this helps.&lt;/P&gt;&lt;P&gt;&lt;A class="" data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fdocuments%2Fapplication_note%2FAN11244.pdf" rel="nofollow" target="_blank"&gt;http://www.nxp.com/documents/application_note/AN11244.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;BR class="" data-content-finding="Community" /&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Sol&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 21:44:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671923#M26871</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2017-05-16T21:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in driving 7" LCD using LPC1788 MCU</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671924#M26872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply soledad.&lt;/P&gt;&lt;P&gt;I've already examined through that document before your suggestion (at the beginning of my trial for the circuit), tried to apply using NXP_emWin522_EA1788_BSP &amp;nbsp;coding as a reference but did not managed to get a picture on my 7" TFT screen. That's why I switched back to the basics of LCD controlling using LPC1788. But so far, no progress at all :smileysad:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying to apply emwin to my board, I am having problem with GUI_INIT. The microcontroller stucks in it somewhere and a hardfault occurs. Since I am using controllerless LCD, I&amp;nbsp;selected to apply GUIDRV_Lin_16_API as display driver, which I believe it is correct.. But my code never hits the function&amp;nbsp;&lt;SPAN&gt;GUI_DispString since it stucks in GUI_Init.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void MainTask(void) {&lt;BR /&gt; GUI_Init();&lt;BR /&gt; GUI_DispString("Hello World!");&lt;BR /&gt; while(1) {&lt;BR /&gt; GUI_Delay(500);&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please recommend me which portion of my coding should be examined for the hard fault that occurs in GUI_Init?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2017 05:10:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671924#M26872</guid>
      <dc:creator>h_bugragunes</dc:creator>
      <dc:date>2017-05-18T05:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in driving 7" LCD using LPC1788 MCU</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671925#M26873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have exactly the same problem with HSYNC ,VSYNC and ENAB signals. Have you got any change to solve it?I believe these pins are not enabled by initialise routine.&lt;/P&gt;&lt;P&gt;Also ewin library didn't work(stuck on GUI_init).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate If you share with me your experience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ati&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2017 20:22:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671925#M26873</guid>
      <dc:creator>atihaj</dc:creator>
      <dc:date>2017-10-09T20:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in driving 7" LCD using LPC1788 MCU</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671926#M26874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, please, can you send me a project?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2018 17:59:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671926#M26874</guid>
      <dc:creator>oleg333674</dc:creator>
      <dc:date>2018-11-14T17:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in driving 7" LCD using LPC1788 MCU</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671927#M26875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are some interesting guidelines in this post:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://community.arm.com/processors/f/discussions/5963/tft-rgb-problem" title="https://community.arm.com/processors/f/discussions/5963/tft-rgb-problem"&gt;TFT RGB Problem - Processor discussions - Processors - Arm Community&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is a project for you?&lt;/P&gt;&lt;P&gt;- Keil µVision&lt;/P&gt;&lt;P&gt;- IAR&lt;/P&gt;&lt;P&gt;- LPCXpresso / MCUXpresso&lt;BR /&gt;&lt;BR /&gt;Which hardware platform / board?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just make the TFT work or including emWin?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bernhard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2018 10:30:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-in-driving-7-quot-LCD-using-LPC1788-MCU/m-p/671927#M26875</guid>
      <dc:creator>bernhardfink</dc:creator>
      <dc:date>2018-11-19T10:30:39Z</dc:date>
    </item>
  </channel>
</rss>

