EmbeddedRelated.com
Forums

Sample code for LCD display (LPC2478)

Started by Srikanth KS June 10, 2009
Hi ,
I am very new to LPC2478 its my second day with this board. I have a 240 *
320 LCD display interfaced with it along with a tilt sensor. What i want to
do is display characters on the lcd the characters should always appear
straight even if the lcd is tilted by 180 deg or 270 deg. so I am trying to
do teh following
1. Display a text for example "hello world" (x,y ) = (0,0)
2. read the tilt sensor reading if it indicates that the panel is not tilted
(0 deg) then i do nothing
3. if the sensor says that the panel is tilted 180 deg then i read all the
data present in (0,0) and shift it to (240,240)
My problem is i am reading the contents present in ram at the location
0xa000000 and trying to copy this data to a different location in the lcd
panel this is not working for some reason which i cant figure out

i would appreciate if i get a sample code which does this

2. I also want to get an interrupt when the user touches the screen say for
example clicking on the text present there could any one give me an idea how
to go about this?

--
Regards
Raman Srinivas


An Engineer's Guide to the LPC2100 Series

Hi, Raman,

> i would appreciate if i get a sample code which does this

Which code? how to copy memory to memory? - It is library function.
Just run it and tell LCD controller to display data from other address.
>
> 2. I also want to get an interrupt when the user touches the screen say for
> example clicking on the text present there could any one give me an idea how
> to go about this?

It is little bit more complicated and depends from way how touch sensor is connected.

Regards
Vladimir

Hi Vladimir
,
Thanks for your reply ,
regarding display data on the LCD i got a sample code from embedded artist.
I need some information regarding touch screen interface. I am using UM10237
lcd panel with 320 * 240 resolution.
One question regarding touch screen
if the user touches the screen will the interrupt provide an X-Y coordinate
of the pixel he touched
lets assume that the user is using a stylus so the errors in the x-y
coordinates will be minimum
correct me if i am wrong

regards
Raman

On Wed, Jun 10, 2009 at 4:34 PM, ljaschko wrote:

> Hi, Raman,
>
> > i would appreciate if i get a sample code which does this
>
> Which code? how to copy memory to memory? - It is library function.
> Just run it and tell LCD controller to display data from other address.
>
> >
> > 2. I also want to get an interrupt when the user touches the screen say
> for
> > example clicking on the text present there could any one give me an idea
> how
> > to go about this?
>
> It is little bit more complicated and depends from way how touch sensor is
> connected.
>
> Regards
> Vladimir
>
>
>

--
Regards
Srikanth


Hi Raman,

I did not test this display, but from my experience with an other display, there is not chance to get good accuracy without calibration left/right up/down and center points, as it is in PDAs. And it does not depend from stilus or finger, finger just add additional troubles, but stilus does not solve problem.

Regards
Vladimir

----- Original Message -----
From: Srikanth KS
To: l...
Sent: Wednesday, June 10, 2009 2:29 PM
Subject: Re: [lpc2000] Re: Sample code for LCD display (LPC2478)

Hi Vladimir
,
Thanks for your reply ,
regarding display data on the LCD i got a sample code from embedded artist.
I need some information regarding touch screen interface. I am using UM10237
lcd panel with 320 * 240 resolution.
One question regarding touch screen
if the user touches the screen will the interrupt provide an X-Y coordinate
of the pixel he touched
lets assume that the user is using a stylus so the errors in the x-y
coordinates will be minimum
correct me if i am wrong

regards
Raman

On Wed, Jun 10, 2009 at 4:34 PM, ljaschko wrote:

>
>
> Hi, Raman,
>
> > i would appreciate if i get a sample code which does this
>
> Which code? how to copy memory to memory? - It is library function.
> Just run it and tell LCD controller to display data from other address.
>
> >
> > 2. I also want to get an interrupt when the user touches the screen say
> for
> > example clicking on the text present there could any one give me an idea
> how
> > to go about this?
>
> It is little bit more complicated and depends from way how touch sensor is
> connected.
>
> Regards
> Vladimir
>
>
>

--
Regards
Srikanth