GUI for LCD

What steps do I need to follow to develope a GUI for LCD? Are there any specific tools which you would recommend?

Reply to
Ajab
Loading thread data ...

It will be a microcontroller controlled LCD display. So As I understand the code for LCD display(GUI) will be flashed in uC memory. Plz correct if I am wrong.

Reply to
Ajab

What exactly are you trying to acheive? What is the platform? What is the display?

Reply to
The Real Andy

You can buy a number of graphics libraries off the shelf. I use Segger's emwin and I am very pleased with it but I've heard other people get on well with C/PEG and C/PEG++. This is not cheap though. I remember there was also someone on this group a year or so ago who was developing a cut-down open source GUI - you'd have to check the archives.

To write one yourself then your biggest hurdle will be getting the LCD controller to function correctly - creating images is secondary to that. Some microcontroller vendors (Sharp for one although soon to be NXP) have software tools that will create C header files to initialise your LCD controller to suit your panel.

Once you can drive the LCD then you just need a few simple functions that will populate the frame buffer in the right way. You can go a long way toward a good GUI with simple functions like ClearScreen, DrawPoint, DrawLine, DrawBox, DrawCircle etc.

If you want predrawn pictures then bitmaps are easiest to work with and RLE encoding them can compress them if you are short of space. There are a number of programs available that will convert a bitmap file to a C file for inclusion in your project - bmp2c is one I believe is free. I use the one that came with emwin and it is very good but certainly not free. A function like DrawBitmap is not too tricky to implement and is mainly just setting the colour of the frame buffer pixels in sequence. A bit harder if you use compression.

Reply to
Tom Lucas

So with these tools (emwin/PEG..), I will develope the GUI (images,dialogs etc., which will be displayed on LCD). And then I need to write some event handler routines for each button/image. Whatever code will be written will be flashed into the microcontroller and then microcontroller will control the display. Is it this way?

Reply to
Ajab

That's exactly the way. You can use the graphic library's own event handling mechanisms or you can do your own. I started out using emwin's own window manager which uses callback mechanisms similar to MS windows but I started wanting to do messy things with the frame buffer and began to create my own window handling scheme but still used the library for actually drawing shapes, text and pictures. I've pretty much written my own touchscreen driver but I still use Segger's interface to inform the GUI that there has been a touch in a location.

It's not cheap though. From their website

formatting link
then you're looking at 8K euros for a comprehensive package with a window manager, bitmap and font converter and LCD drivers. Actually, in retrospect I've paid for a lot of things I don't really use but everything is clear in hindsight! IT will get you going quickly though and their support is good. I decided to pay for a bit of training and went to their offices in Germany and they got me running there and then. Admittedly I had also bought a development kit from LogicPD which they already supported so there were no mysteries there.

Reply to
Tom Lucas

I found a chip from Amulet Technologies. The chip is a combination LCD controller chip and a user interface chip. According to them this chip will reduce the complex coding.

Reply to
Ajab

I briefly looked at this myself. It's quite expensive so it's only really suitable for low volume production but it does save quite a lot of the coding. You are fixed to what Amulet think you need for the display though and getting data into it will be quite slow as IIRC it uses a serial interface.

Depends what you are looking for really - the chip wouldn't suit my needs but it might have what you need.

Reply to
Tom Lucas

Hello Ajab, A lot depends on the LCD and LCD driver. I've had very good luck with Ramtex

formatting link
The code is very fairly priced ~390E / 525USD

Good luck

Reply to
peejayblack

That looks pretty good actually. These people really need to work on their advertising though. I did a good bit of researching when I decided on the graphics library I would use and this is the first time I've ever heard of ramtex.

Reply to
Tom Lucas

The Ramtex code is quite messy. I had to spend quite a bit of time to get it going. They do stupid things like assuming that defining endianess based on a #ifdef __PC__, and at the same time also using this define when it is not an 8-bit architecture. I had to work through the code and replace these side effect #ifdefs with the real check. i.e. #ifdef LITTLE_ENDIAN, when different code was required for big and little endian architectures. And #ifdef EIGHT_BIT, and #ifdef SIZTEEN_BIT and #ifdef 32_BIT, when this made the difference.

They also sell some sort of software test harness, and it is clear that one is expected to have both the LCD code and the test harness code.

Their code also breaks if the alignment of certain data structures is not bytes. All in all, if one uses an MCU they directly supports it should be fairly simple. Getting it going on an ARM though is more trouble than it is worth.

Regards Anton Erasmus

Reply to
Anton Erasmus

Perhaps they are working on a 32bit version? From what you say, if they are not then they ought to be.

Segger's emWin certainly has none of these problems and is written very well and is very portable. Of course it is also considerably more expensive - it all depends what your time is worth I guess.

Reply to
Tom Lucas

They definately need to clean up the code. If they do that and remove the silly side effect dependancies, it would be quite a nice package. As it is, If you need something that will get you going quickly, Ramtex is currently not suitable.

Regards Anton Erasmus

Reply to
Anton Erasmus

I am using the ramtex GLCD libraries for LC7981 with a Renesas H8S. It was installed, configured and running within 2 hours. There are many modules and fonts, so I have grouped them separately in the compiler. The code and ram consumption is very moderate. I cannot recognize any silly side effects :-)

Reply to
aheadcon

We have also used Ramtex' LCD libraries in 3 products, ARM7 based and PIC based, with great pleasure. We spent a couple of hours each time to port it, not a big problem. Moreover their PC-based simulation is just great, allowing to actually test the LCD management embedded code and user interface on a PC. May be not a perfect product, but by far the best we've found up to now.

Friendly, Robert

formatting link

Reply to
Robert Lacoste

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.