EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

LPC2138, VGA, and SD/MMC

Started by achargis July 26, 2005
Has anyone actually managed to use a standard VGA or SVGA monitor with
the LPC2138? I've googled myself to death and can't find much on the
processor let alone the processor and VGA.

I've also looked at uVGA witch is a viable solution to my problem, but
if it can be done in the processor itself it would be nice. I've
found source and schematics for hooking up other ARM7's but they have
a built in TFT driver that makes this possiable.

Also I'd like to add an SD/MMC reader to my board so I can load
external graphics (JPEG and BMP). Basically I'm trying to build a
digital picture frame. CF Card would be more ideal, but I'm sure that
its also more difficult to implement.

I tried searching the group first, so hopefully my eyes didn't miss
answers to either question. This is my first project with ARM so I'm
also learning the ins and outs and oops.

Jeremy


An Engineer's Guide to the LPC2100 Series

Hi, I'm actually designing my card to connect a qvga display. I use an epson
controller S1D13706 with built in ram. The problem is this controller has an
external bus interface and you need a lpc22xx to use it (16 data line, 16
adress line + some control line.
I connect also an sd card to it on the SPI bus.
IGo to the keil web site, www.keil.com , there is an sdcard on the new
mcb2140 eval board, you can download the schematics.
Search "Ingo Busker" from google. He has made sdcard port for the LPC2106
with FAT16. You can download the source file from his web site.

Regards,
Sebastien
----- Original Message -----
From: "achargis" <jdarling@jdar...>
To: <lpc2000@lpc2...>
Sent: Tuesday, July 26, 2005 7:48 PM
Subject: [lpc2000] LPC2138, VGA, and SD/MMC > Has anyone actually managed to use a standard VGA or SVGA monitor with
> the LPC2138? I've googled myself to death and can't find much on the
> processor let alone the processor and VGA.
>
> I've also looked at uVGA witch is a viable solution to my problem, but
> if it can be done in the processor itself it would be nice. I've
> found source and schematics for hooking up other ARM7's but they have
> a built in TFT driver that makes this possiable.
>
> Also I'd like to add an SD/MMC reader to my board so I can load
> external graphics (JPEG and BMP). Basically I'm trying to build a
> digital picture frame. CF Card would be more ideal, but I'm sure that
> its also more difficult to implement.
>
> I tried searching the group first, so hopefully my eyes didn't miss
> answers to either question. This is my first project with ARM so I'm
> also learning the ins and outs and oops.
>
> Jeremy > Yahoo! Groups Links >
>



When you said picture frame I thought about the sandisk photo album.
It retails for about $40.00, some guys try to hack into it:
http://www.linux-hacker.net/cgi-bin/UltraBoard/UltraBoard.pl?Action=ShowPost&Board=bnews&Post2

The build/buy dilemma is here to stay..... --- In lpc2000@lpc2..., "Sebastien Jacquemard"
<sejacquemard@w...> wrote:
> Hi, I'm actually designing my card to connect a qvga display. I use
an epson
> controller S1D13706 with built in ram. The problem is this
controller has an
> external bus interface and you need a lpc22xx to use it (16 data
line, 16
> adress line + some control line.
> I connect also an sd card to it on the SPI bus.
> IGo to the keil web site, www.keil.com , there is an sdcard on the new
> mcb2140 eval board, you can download the schematics.
> Search "Ingo Busker" from google. He has made sdcard port for the
LPC2106
> with FAT16. You can download the source file from his web site.
>
> Regards,
> Sebastien >
> ----- Original Message -----
> From: "achargis" <jdarling@e...>
> To: <lpc2000@lpc2...>
> Sent: Tuesday, July 26, 2005 7:48 PM
> Subject: [lpc2000] LPC2138, VGA, and SD/MMC > > Has anyone actually managed to use a standard VGA or SVGA monitor with
> > the LPC2138? I've googled myself to death and can't find much on the
> > processor let alone the processor and VGA.
> >
> > I've also looked at uVGA witch is a viable solution to my problem, but
> > if it can be done in the processor itself it would be nice. I've
> > found source and schematics for hooking up other ARM7's but they have
> > a built in TFT driver that makes this possiable.
> >
> > Also I'd like to add an SD/MMC reader to my board so I can load
> > external graphics (JPEG and BMP). Basically I'm trying to build a
> > digital picture frame. CF Card would be more ideal, but I'm sure that
> > its also more difficult to implement.
> >
> > I tried searching the group first, so hopefully my eyes didn't miss
> > answers to either question. This is my first project with ARM so I'm
> > also learning the ins and outs and oops.
> >
> > Jeremy


No delimma for me. I still want to build it, can't learn anything by
buying everything. Also that $40 unit works on a TV, I have an old
(460x480 12") VGA LCD that I want to make some use of.

> -------- Original Message --------
> Subject: [lpc2000] Re: LPC2138, VGA, and SD/MMC
> From: "lpcarmed" <lpcarmed@lpca...>
> Date: Tue, July 26, 2005 11:44 am
> To: lpc2000@lpc2...
>
> When you said picture frame I thought about the sandisk photo album.
> It retails for about $40.00, some guys try to hack into it:
>
> http://www.linux-hacker.net/cgi-bin/UltraBoard/UltraBoard.pl?Action=ShowPost&Board=bnews&Post2
>
> The build/buy dilemma is here to stay..... > --- In lpc2000@lpc2..., "Sebastien Jacquemard"
> <sejacquemard@w...> wrote:
> > Hi, I'm actually designing my card to connect a qvga display. I use
> an epson
> > controller S1D13706 with built in ram. The problem is this
> controller has an
> > external bus interface and you need a lpc22xx to use it (16 data
> line, 16
> > adress line + some control line.
> > I connect also an sd card to it on the SPI bus.
> > IGo to the keil web site, www.keil.com , there is an sdcard on the new
> > mcb2140 eval board, you can download the schematics.
> > Search "Ingo Busker" from google. He has made sdcard port for the
> LPC2106
> > with FAT16. You can download the source file from his web site.
> >
> > Regards,
> > Sebastien
> >
> >
> >
> > ----- Original Message -----
> > From: "achargis" <jdarling@e...>
> > To: <lpc2000@lpc2...>
> > Sent: Tuesday, July 26, 2005 7:48 PM
> > Subject: [lpc2000] LPC2138, VGA, and SD/MMC
> >
> >
> > > Has anyone actually managed to use a standard VGA or SVGA monitor
> with
> > > the LPC2138? I've googled myself to death and can't find much on
> the
> > > processor let alone the processor and VGA.
> > >
> > > I've also looked at uVGA witch is a viable solution to my problem,
> but
> > > if it can be done in the processor itself it would be nice. I've
> > > found source and schematics for hooking up other ARM7's but they
> have
> > > a built in TFT driver that makes this possiable.
> > >
> > > Also I'd like to add an SD/MMC reader to my board so I can load
> > > external graphics (JPEG and BMP). Basically I'm trying to build a
> > > digital picture frame. CF Card would be more ideal, but I'm sure
> that
> > > its also more difficult to implement.
> > >
> > > I tried searching the group first, so hopefully my eyes didn't miss
> > > answers to either question. This is my first project with ARM so
> I'm
> > > also learning the ins and outs and oops.
> > >
> > > Jeremy > SPONSORED LINKS Microcontrollers Microprocessor Intel
> microprocessors Pic microcontrollers 8085 microprocessor > YAHOO! GROUPS LINKS
> >
>




I have done 192x480 with 640x480 VGA timing on a 2106. I am just waiting
on my 2148s so I can run 640x480 with the faster port speeds. Mind you,
there are limitiations though. At present I only run 4-bits per pixel
and simply connect 220 ohm resistors from 3 pins straight to the RGB
lines, the VGA input impedance brings this down to the correct level. I
could run 8-bits into a ladder network to get 256 colors (no palette).
The limited (for video) RAM makes it a problem too, but at least I can
mix high and low res in software.

Oh yes, I have interfaced SD cards as well and have written my FAT16 and
drawing routines etc in Forth. The whole thing works so well that even
when it's in video terminal mode I can still enter command sequences as
Forth execution words for the more complicated drawing commands. I
suppose it's a bit like postscript.

But as Scotty says "there is only so much I can do with her captain" and
the limited internal RAM rules out full resolution/hi-color graphics.
How-ever, there are a plethora of ways to implement video but still, I
really like the simplicity of the minimal implementation that is
possible with the LPC2s, plus the small footprint.

*Peter*

achargis wrote:

>Has anyone actually managed to use a standard VGA or SVGA monitor with
>the LPC2138? I've googled myself to death and can't find much on the
>processor let alone the processor and VGA.
>
>I've also looked at uVGA witch is a viable solution to my problem, but
>if it can be done in the processor itself it would be nice. I've
>found source and schematics for hooking up other ARM7's but they have
>a built in TFT driver that makes this possiable.
>
>Also I'd like to add an SD/MMC reader to my board so I can load
>external graphics (JPEG and BMP). Basically I'm trying to build a
>digital picture frame. CF Card would be more ideal, but I'm sure that
>its also more difficult to implement.
>
>I tried searching the group first, so hopefully my eyes didn't miss
>answers to either question. This is my first project with ARM so I'm
>also learning the ins and outs and oops.
>
>Jeremy




I don't suppose you could give me some pointers on how exactly you
interface the VGA monitor to the 06? 640x480 would be perfect, I think
with a simple SRAM hanging off for "Video Memory" I could get around the
problem of space to put things and the graphics will be loaded from the
card so again not a problem. Simply read a block, push it to the SRAM
and once a screen is loaded change the display pointer to the new
screen location (double buffer it basically). I have a few 512 SRAM
chips laying around and even thou the 2138 doesn't support external
memory, it does have an I2C bus that I could use to access the chip.
So I come back to would you be kind enough to post a simple examlpe
(heck flash the screen red, then blue, then green). The DAC doesn't
have me too confused and I've mangled together a rough one for testing
:).

Thanks,
Jeremy

> -------- Original Message --------
> Subject: Re: [lpc2000] LPC2138, VGA, and SD/MMC
> From: Peter Jakacki <peterjak@pete...>
> Date: Tue, July 26, 2005 4:17 pm
> To: lpc2000@lpc2...
>
> I have done 192x480 with 640x480 VGA timing on a 2106. I am just waiting
>
> on my 2148s so I can run 640x480 with the faster port speeds. Mind you,
> there are limitiations though. At present I only run 4-bits per pixel
> and simply connect 220 ohm resistors from 3 pins straight to the RGB
> lines, the VGA input impedance brings this down to the correct level. I
> could run 8-bits into a ladder network to get 256 colors (no palette).
> The limited (for video) RAM makes it a problem too, but at least I can
> mix high and low res in software.
>
> Oh yes, I have interfaced SD cards as well and have written my FAT16 and
>
> drawing routines etc in Forth. The whole thing works so well that even
> when it's in video terminal mode I can still enter command sequences as
> Forth execution words for the more complicated drawing commands. I
> suppose it's a bit like postscript.
>
> But as Scotty says "there is only so much I can do with her captain" and
>
> the limited internal RAM rules out full resolution/hi-color graphics.
> How-ever, there are a plethora of ways to implement video but still, I
> really like the simplicity of the minimal implementation that is
> possible with the LPC2s, plus the small footprint.
>
> *Peter*
>
> achargis wrote:
>
> >Has anyone actually managed to use a standard VGA or SVGA monitor with
> >the LPC2138? I've googled myself to death and can't find much on the
> >processor let alone the processor and VGA.
> >
> >I've also looked at uVGA witch is a viable solution to my problem, but
> >if it can be done in the processor itself it would be nice. I've
> >found source and schematics for hooking up other ARM7's but they have
> >a built in TFT driver that makes this possiable.
> >
> >Also I'd like to add an SD/MMC reader to my board so I can load
> >external graphics (JPEG and BMP). Basically I'm trying to build a
> >digital picture frame. CF Card would be more ideal, but I'm sure that
> >its also more difficult to implement.
> >
> >I tried searching the group first, so hopefully my eyes didn't miss
> >answers to either question. This is my first project with ARM so I'm
> >also learning the ins and outs and oops.
> >
> >Jeremy
> >
> >
>
> SPONSORED LINKS Microcontrollers Microprocessor Intel
> microprocessors Pic microcontrollers 8085 microprocessor > YAHOO! GROUPS LINKS
> >
>




Hmmmm, me thinks with all this "hanging this" and "simply this" that you
might need more than a few pointers. An external RAM defeats the purpose
of this kind of solution, although mind you I have seen someone employ a
humble PIC in this fashion for VGA purposes (slow!!!). Just how were you
thinking that you could use the I2C bus to access an external RAM???
Besides, the I2C is way too slow for any real kind of screen updating.
The ARM has to perform real-time video so I don't think that it could
wait around for slow access devices. If you want to use an external RAM
then consider using an external memory bus version of the ARM.

Flashing colours etc is neither here nor there as the primary problem is
simply generating the video stream in real-time and then finding time to
render fonts and graphics etc.

Maybe you might rethink your requirements and adjust your parameters
accordingly.

*Peter*

BTW, try cropping the quoted text to the relevant material. Regardless
of posting styles the whole aim is to reduce clutter and make reading
posts easier.

jdarling@jdar... wrote:

>I don't suppose you could give me some pointers on how exactly you
>interface the VGA monitor to the 06? 640x480 would be perfect, I think
>with a simple SRAM hanging off for "Video Memory" I could get around the
>problem of space to put things and the graphics will be loaded from the
>card so again not a problem. Simply read a block, push it to the SRAM
>and once a screen is loaded change the display pointer to the new
>screen location (double buffer it basically). I have a few 512 SRAM
>chips laying around and even thou the 2138 doesn't support external
>memory, it does have an I2C bus that I could use to access the chip.
>So I come back to would you be kind enough to post a simple examlpe
>(heck flash the screen red, then blue, then green). The DAC doesn't
>have me too confused and I've mangled together a rough one for testing
>:).
>
>Thanks,
>Jeremy
>




Sorry about the overpost thing. I don't use Mail Groups very often, and
News Groups have got me spoiled
to that point :).

> Maybe you might rethink your requirements and adjust your parameters
> accordingly.

I had thought of using something as a driver chip, but everything I've
found is either too costly,
over my head as far as skills go, or depricated. Course then again this
may be over my head
too :). Honestly I didn't figure that VGA could be that difficult since
the old 8088's could do it
and still have time to pull off simple graphics. Maby an FPGA as a
driver would be better,
but my lack of knowledge in this section of the world puts me at a great
disadvantage.

Course thats where my confusion is. I figured that the display update
cycles wern't going
to be all that bad. So I would have plenty of time to read from the SPI
bus to get the next
segment of the screen. Guess I was wrong.

Do you tink its possiable to pull off full screen grapics with the 2138?
I figured it took:
2457600 bits or 307,200 bytes to store a screen. Since the 2138 has
512k bytes
I could store a full screen and still have 201,800 bytes for code. I
also figured that
I could cheat and use two of the PWM channels to handle the H-Sync and
V-Sync
signals, thus lowering the overhead again. For image switching I would
simply point
to a blank screen, load over my image buffer and then point back. It
sounds like
this won't be the case :). I'm quite new to all of this ARM stuff, only
done AVR's
in the past, and I have to admit I have probiably bitten off more then I
can chew at the
moment.

Jeremy


you can probably found several examples of output to a TV with a
simple Google search, even for 8 bits mcu. it's really easier to make
a small TV output for text screens..
if u need to display pictures it's not so simple, but a simple TV
output is easier to make than a VGA outpout.

a pong game for MSP430 from Texas Instruments :
http://focus.ti.com/lit/an/slaa177/slaa177.pdf

a Dungeon game for Atmel ATMega32 :
http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2005/gts7
/

just did a rapid search on google, there's probably some more
elaborate.. if you really need VGA, u should probably look at old VGA controllers
that where used on PC cards, but could be dificult to get one..


See there CF: http://www.compactflash.org/
http://focus.ti.com/lit/an/spra803/spra803.pdf - it is very simple
instruction it s for DSP? but i think it's same for LPC --- In lpc2000@lpc2..., "Sebastien Jacquemard"
<sejacquemard@w...> wrote:
> Hi, I'm actually designing my card to connect a qvga display. I
use an epson
> controller S1D13706 with built in ram. The problem is this
controller has an
> external bus interface and you need a lpc22xx to use it (16 data
line, 16
> adress line + some control line.
> I connect also an sd card to it on the SPI bus.
> IGo to the keil web site, www.keil.com , there is an sdcard on the
new
> mcb2140 eval board, you can download the schematics.
> Search "Ingo Busker" from google. He has made sdcard port for the
LPC2106
> with FAT16. You can download the source file from his web site.
>
> Regards,
> Sebastien >
> ----- Original Message -----
> From: "achargis" <jdarling@e...>
> To: <lpc2000@lpc2...>
> Sent: Tuesday, July 26, 2005 7:48 PM
> Subject: [lpc2000] LPC2138, VGA, and SD/MMC > > Has anyone actually managed to use a standard VGA or SVGA
monitor with
> > the LPC2138? I've googled myself to death and can't find much
on the
> > processor let alone the processor and VGA.
> >
> > I've also looked at uVGA witch is a viable solution to my
problem, but
> > if it can be done in the processor itself it would be nice. I've
> > found source and schematics for hooking up other ARM7's but they
have
> > a built in TFT driver that makes this possiable.
> >
> > Also I'd like to add an SD/MMC reader to my board so I can load
> > external graphics (JPEG and BMP). Basically I'm trying to build
a
> > digital picture frame. CF Card would be more ideal, but I'm
sure that
> > its also more difficult to implement.
> >
> > I tried searching the group first, so hopefully my eyes didn't
miss
> > answers to either question. This is my first project with ARM
so I'm
> > also learning the ins and outs and oops.
> >
> > Jeremy
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >




The 2024 Embedded Online Conference