EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

240 x 128 graphics tutorial for msp430

Started by Mike Raines January 21, 2009
Good morning,
Could someone please suggest a tutorial that might help me learn
how to write to a 240 x 128 graphical display using c functions from a
msp430 4xxx or 5xxx?
Thanks,
Mike Raines

Beginning Microcontrollers with the MSP430

Guys,
I know this depends on which display we use and that has not been decided.
Perhaps someone can recommend a display and its ease of programming using c,
or suggest a display to avoid based on your experiences. This will be shock mounted
on the exterior of trucks as well as industrial plants.
Thanks,
Mike Raines

________________________________
From: m... [mailto:m...] On Behalf Of Mike Raines
Sent: Wednesday, January 21, 2009 9:30 AM
To: m...
Subject: [msp430] 240 x 128 graphics tutorial for msp430
Good morning,
Could someone please suggest a tutorial that might help me learn
how to write to a 240 x 128 graphical display using c functions from a
msp430 4xxx or 5xxx?
Thanks,
Mike Raines


Mike,

what type of display? The control and data delivery portion is usually
specific to the controller on board the LCD board. The data, since it is a
graphic display, can be given to the controller in any number of ways...
some of them odd..like right to left, bottom to top...

I don't have any C tutorials on this, but the assembly work I've done with a
bunch of displays is my basis for knowing its a jungle out there in LCD
land.

Tony
On Wed, Jan 21, 2009 at 9:29 AM, Mike Raines wrote:

> Good morning,
> Could someone please suggest a tutorial that might help me learn
> how to write to a 240 x 128 graphical display using c functions from a
> msp430 4xxx or 5xxx?
> Thanks,
> Mike Raines
>
>
>

Hello!

A good start would be to download the driver (I mean the chip) specs
which is usually provided by the LCD maker or chip maker.
As for the C functions for any chip, there is a bunch of sample code
on TI site. If your LCD uses for instance SPI, then use the sample code
that shows how to use SPI, and send the commands / data to your
display. That's about it. The command sequence is (should be) provided
by the LCD driver maker.

Beside this, another hint: the best way to get your ow driver working
is to get it from the LCD maker. He will provide you at least the initialization
which is the most critical part. Once you can initialize it and write the
first pixel (90 % of the work) your're done. After this step, it's only fun.

Pascal

--- In m..., "Mike Raines" wrote:
>
> Good morning,
> Could someone please suggest a tutorial that might help me learn
> how to write to a 240 x 128 graphical display using c functions from a
> msp430 4xxx or 5xxx?
> Thanks,
> Mike Raines
>

Since you indicate that you need to control a bit-mapped LCD, the LCD
controller imbedded in the MSP430 MCUs won't help you. As Pascal
suggested, you need to look for an LCD controller chip to include in
your design which can be controlled through the SPI bus. Here's a
link to a Web page which lists a large number of LCD controller
vendors. I am not recommending this LCD vendor, just pointing you to
a list of controller mfrs.

http://www.pacificdisplay.com/lcd_ics.htm

Some of the more popular controller vendors are Hynix, Samsung,
Novatek and Epson. I personally do not recommend Solomon Systech: I
tried call their US sales office this week and only got an answering
machine. Don't expect much support from them.

Chris

--- In m..., "p_murayama" wrote:
>
> Hello!
>
> A good start would be to download the driver (I mean the chip) specs
> which is usually provided by the LCD maker or chip maker.
> As for the C functions for any chip, there is a bunch of sample code
> on TI site. If your LCD uses for instance SPI, then use the sample
code
> that shows how to use SPI, and send the commands / data to your
> display. That's about it. The command sequence is (should be)
provided
> by the LCD driver maker.
>
> Beside this, another hint: the best way to get your ow driver
working
> is to get it from the LCD maker. He will provide you at least the
initialization
> which is the most critical part. Once you can initialize it and
write the
> first pixel (90 % of the work) your're done. After this step, it's
only fun.
>
> Pascal
>
> --- In m..., "Mike Raines" wrote:
> >
> > Good morning,
> > Could someone please suggest a tutorial that might help me
learn
> > how to write to a 240 x 128 graphical display using c functions
from a
> > msp430 4xxx or 5xxx?
> > Thanks,
> > Mike Raines
>
Mike,

as noted in this reply, if your desire is to use the internal LCD controller
in the MSP430, you should note that it is useful for segmented LCDs like you
would see on a gas meter or voltmeter or a cheap LCD clock.
Tony
On Wed, Jan 21, 2009 at 10:24 AM, u...@sbcglobal.net <
c...@yahoo.com> wrote:

> Since you indicate that you need to control a bit-mapped LCD, the LCD
> controller imbedded in the MSP430 MCUs won't help you. As Pascal
> suggested, you need to look for an LCD controller chip to include in
> your design which can be controlled through the SPI bus. Here's a
> link to a Web page which lists a large number of LCD controller
> vendors. I am not recommending this LCD vendor, just pointing you to
> a list of controller mfrs.
>
> http://www.pacificdisplay.com/lcd_ics.htm
>
> Some of the more popular controller vendors are Hynix, Samsung,
> Novatek and Epson. I personally do not recommend Solomon Systech: I
> tried call their US sales office this week and only got an answering
> machine. Don't expect much support from them.
>
> Chris
>
> --- In m... , "p_murayama"
> wrote:
> >
> > Hello!
> >
> > A good start would be to download the driver (I mean the chip) specs
> > which is usually provided by the LCD maker or chip maker.
> > As for the C functions for any chip, there is a bunch of sample code
> > on TI site. If your LCD uses for instance SPI, then use the sample
> code
> > that shows how to use SPI, and send the commands / data to your
> > display. That's about it. The command sequence is (should be)
> provided
> > by the LCD driver maker.
> >
> > Beside this, another hint: the best way to get your ow driver
> working
> > is to get it from the LCD maker. He will provide you at least the
> initialization
> > which is the most critical part. Once you can initialize it and
> write the
> > first pixel (90 % of the work) your're done. After this step, it's
> only fun.
> >
> > Pascal
> >
> > --- In m... , "Mike Raines"
> wrote:
> > >
> > > Good morning,
> > > Could someone please suggest a tutorial that might help me
> learn
> > > how to write to a 240 x 128 graphical display using c functions
> from a
> > > msp430 4xxx or 5xxx?
> > > Thanks,
> > > Mike Raines
> > >
> >
>

On Wed, 21 Jan 2009 14:29:54 -0000, Mike Raines wrote:

> Could someone please suggest a tutorial that might help me learn
>how to write to a 240 x 128 graphical display using c functions from a
>msp430 4xxx or 5xxx?

Are you just focused on the details of operating some device you
didn't mention or on the kind of code involved in, say, drawing a line
from two points specified, drawing circles, etc? What's your goal?

Jon

Or "Visual C++"?

--- In m..., Jon Kirwan wrote:
>
> On Wed, 21 Jan 2009 14:29:54 -0000, Mike Raines wrote:
>
> > Could someone please suggest a tutorial that might help me learn
> >how to write to a 240 x 128 graphical display using c functions from a
> >msp430 4xxx or 5xxx?
>
> Are you just focused on the details of operating some device you
> didn't mention or on the kind of code involved in, say, drawing a line
> from two points specified, drawing circles, etc? What's your goal?
>
> Jon
>

Guys,
Thanks to all who responded, and yes, thanks for the gentle joking.
I've got the big picture now. Once the hardware guys (and the boss and marketing)
choose the display, I have to study the driver I'm stuck with. I then will probably
write c functions to interface with the driver to initialize, change modes, update data, etc.
Thanks again,
Mike Raines

________________________________
From: m... [mailto:m...] On Behalf Of old_cow_yellow
Sent: Wednesday, January 21, 2009 5:52 PM
To: m...
Subject: [msp430] Re: 240 x 128 graphics tutorial for msp430
Or "Visual C++"?

--- In m..., Jon Kirwan wrote:
>
> On Wed, 21 Jan 2009 14:29:54 -0000, Mike Raines wrote:
>
> > Could someone please suggest a tutorial that might help me learn
> >how to write to a 240 x 128 graphical display using c functions from a
> >msp430 4xxx or 5xxx?
>
> Are you just focused on the details of operating some device you
> didn't mention or on the kind of code involved in, say, drawing a line
> from two points specified, drawing circles, etc? What's your goal?
>
> Jon
>


Mike,
It is important to know that monocromatic graphic LCD displays normaly work with 1 byte for each 8 pixels. It means that when you need to change only one or few of these pixels you have two options: read the LCD's memory, change the content and then write it to LCD - which means your hardware guys must give you a bidirectional interface (you may also find a complete display refresh quite slow because in this case you have 3840 bytes to read-modify-write and MSP430 hasn't a friendly parallel interface normaly required in the low cost LCDs).
The other option would be to use a RAM portion to hold an image of the LCD. There would be much faster to perform the read-modify-write and then another routine (timer driven perhaps) would send the image to the LCD in an unidirectional mode.
Either way you have to account with interface timing that can make your system quite slow if you have to change lots of pixels often.
The unidirectional paralell interface for LCD can cost near 2us/byte with 8MHz clock using assembly coding. A single full display refresh would cost around 8ms of dedicated processing.
Of course, the unidirectional approach is faster but also demands 3840 bytes of RAM - only bigger MSP430 parts can give you that much just for display image.
If you have a color LCD you may have another problems because some displays are 6 bit deep for each color and means a not even distribution of pixel data in the memory, demanding more processing time and RAM space.
So, you have to read carefully the specifications of the LCD's controler to understand the interface mode limits. For example, for read-modify-write operation directly on the LCD you may need to perform few other commands to actually access the correct memory position every time. This can cost you over 10us/byte or 40ms per full refresh with no other processing runnig besides display refresh.
Maybe a talk to hardware guys about interface timing constraints can help you avoiding some headaches...
-Augusto

De:m...

Para:"m..." m...

Cia:

Data:Thu, 22 Jan 2009 08:28:07 -0500

Assunto:RE: [msp430] Re: 240 x 128 graphics tutorial for msp430

Guys,
Thanks to all who responded, and yes, thanks for the gentle joking.
I've got the big picture now. Once the hardware guys (and the boss and marketing)
choose the display, I have to study the driver I'm stuck with. I then will probably
write c functions to interface with the driver to initialize, change modes, update data, etc.
Thanks again,
Mike Raines

________________________________
From: m... [mailto:m...] On Behalf Of old_cow_yellow
Sent: Wednesday, January 21, 2009 5:52 PM
To: m...
Subject: [msp430] Re: 240 x 128 graphics tutorial for msp430

Or "Visual C++"?

--- In m..., Jon Kirwan wrote:
>
> On Wed, 21 Jan 2009 14:29:54 -0000, Mike Raines wrote:
>
> > Could someone please suggest a tutorial that might help me learn
> >how to write to a 240 x 128 graphical display using c functions from a
> >msp430 4xxx or 5xxx?
>
> Are you just focused on the details of operating some device you
> didn't mention or on the kind of code involved in, say, drawing a line
> from two points specified, drawing circles, etc? What's your goal?
>
> Jon
>





The 2024 Embedded Online Conference