LCD software example
Submitted by kada on
Forums:
I've connected the LCD-EB1 module to my LPC4357-DB1 board, compiled the LCD example (Keil version, no errors, 5 warnings), downloaded to board, and ... nothing.
I did the Flash->download. It says programming done. verify ok. But I just get the 4 LEDs lit and nothing on the LCD panel.
what is the demo supposed to do, and am I doing something wrong? I haven't been able to get any of the examples to work yet. please help. thanks.
Andriy replied on Permalink
The images are needed
This demo is showing images from external flash. It also requires SDRAM chip to be mounted.
3 images must be flashed into external flash among the application.
The main problem is that we can't find the way to attach images to program in free 32k version of Keil. But this can be easily done in 32k version of IAR.
Another problem is that link files are made for lpc4350, not for 4357.
We are currently working on porting examples to LPC4357 processor.
kada replied on Permalink
red suite 5
thanks, that makes sense. In the code, I saw the references to 3 images in external flash addresses (0x1CXXXXXX) and realized that I had no way to load those images into flash. I also have a full version of Code Red's Red Suite 5 (paid version of LPCexpresso), so I will try to port the examples over to Red Suite, which I will use for my real development.
Andriy replied on Permalink
Also you can try
Also you can try LCD_ExtSDRAM example to test the LCD. It shows simple running color bars and doesn't require images in flash. You need only to change definitions to use LCD module instead of HDMI.
I have mistaken - SDRAM chip is required for this project, LCD project shows images directly from flash.
kada replied on Permalink
got it working
thanks, I got the LCD_ExtSDRAM example working on Keil. I have the LPC4357-DB1 with SDRAM. I see the color bars now, but very dim and difficult to see.
I noticed that the LED backlight is driven by GPIO5[18]. Are you using it as a PWM output? How can I adjust the brightness in this example? thanks!!
kada replied on Permalink
something wrong with DelayMs() routine
I now have brightness up by setting GPIO5[18]. will probably need to set up a pwm function later so I can control the brightness, instead of just on and off.
Anyway, the example works great now, only problem is that it is very slow. It takes about 40 seconds before color bars appear on the screen. I have traced this down to the DelayMs() routine. Instead of taking 1msec of delay for each count, it takes about 250msec or so. I don't know if the sysTick is not set up right or what is the problem yet. Are you seeing this kind of delay in the Keil project? by the way, i'm starting to feel like I'm the only one on this forum, so responses are pretty slow here. might be more efficient to email support directly?
Andriy replied on Permalink
SysTick fail in Keil
Yes, this is SysTick setup fail:
SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE)/1000);
CGU_GetPCLKFrequency returns 0 in Keil, but in IAR it works fine. It is a problem in standard NXP driver library, possibly in lpc43xx_cgu.c file.
The quickest solution is to specify tick count directly:
SysTick_Config(72000); // CGU_PERIPHERAL_M4CORE freq = 72 MHz
kada replied on Permalink
that worked
thanks for the help, that worked!
sylvio replied on Permalink
A method to upload the image using Keil.
I just made run this example using Keil. I first converted bin files to C array with this tool : https://code.google.com/p/bin2h/downloads/list Then I defined the 3 arrays at a defined address :
unsigned char arrow[153600] __attribute__((at(0x1C0C0000))) = ...
unsigned char diolan[153600] __attribute__((at(0x1C070000))) = ...
unsigned char title[153600] __attribute__((at(0x1C020000))) = ...
Added those 3 files to the Keil's project, Build and uploaded.
It works !