views:

452

answers:

9

I want to create a GUI driven application for a micro-controller (Atmel XMEGA) that is connected to a 128x64 dots graphics LCD (EA DOGL128-6) and 4 buttons for navigation.

Controlling the display itself (e.g. drawing pixels and characters) is no problem but in order to prevent me from reinventing the wheel I was googling for a GUI-Library/-Toolkit that is written in c, includes its source code, will run on a 32 MHz 8-bit micro-controller and provides at least the following controls:

  • panel (to group elements)
  • menu (scrollable)
  • icon
  • label
  • button
  • line-graph (optional)

But I didn't find any thing useful. Does anyone know (or better uses) such a library(preferably for free)?

+3  A: 

I personally used PEG (at work), but it is not for free. You just need to write a small layer of adaptation and use it. You can also look at Qt or minigui.

Iulian Şerbănoiu
This is a small microcontroller based system. I doubt if QT would fit onto the platform and even if it did porting would be a disproportionately large effort.
ConcernedOfTunbridgeWells
Assuming the target is a monochrome LCD, does that rule out Qt?
Craig McQueen
The fact that the target is an 8-bit microcontroller pretty much eliminates Qt for those with any sort of practical decision making skills. ;)
Judge Maygarden
+2  A: 

I would consider rolling your own "immediate mode" GUI. Jari Komppa has a good tutorial about them. It's a lot easier than you may think, and you'll probably find most GUI libraries--even those targeting embedded systems--are a bit heavy-weight for your system.

If you insist on using a third-party library, below are a few I found. I've never used any of them and they are probably fairly expensive.

Judge Maygarden
I have used EasyGUI in a product. It has worked well for us. Our screen size is the same as the OP and based on an AVR32 processor.
Ian
A: 

You may want to have a look at the Nano-X framework (formerly known as Microwindows): http://www.microwindows.org/

It claims to support down to a 16-bit DOS system, so I'm not sure if it's suitable for an 8-bit, but maybe the library can be pared down to just what you need.

I haven't used it, but at one point was considering looking into using it for some simple display UI (though on a 32-bit ARM system). Unfortunately, the project shifted gears before I actually did anything with it. I'd be interested in what your take on it is (or how well it works if you decide to try to use it).

Michael Burr
I ran across that one too, but a even a light-weight xlib-type system seems to heavy-weight for a typical AVR.
Judge Maygarden
@Judge: I suspect you're right. I look forward to diving into the links you gave in your answer.
Michael Burr
A: 

In addition to Judge Maygarden's list RAMTEX provide libraries specifically aimed at small graphic LCDs. Again not free, but is this is for commercial use, remember that if you did it yourself, it may take many man hours to achieve a polished product, so consider that before building your own.

At the rates my company accounts for my time (as opposed to my pay rate), if it took more than five hours, I'd be better off buying the Ramtex library (about two days if you only take my pay rate into account). If however you have the time and inclination, it is not a difficult task, and probably fun.

Clifford
Does RAMTEX have GUI controls/widgets or is it just an LCD driver?
Judge Maygarden
The use of the term "driver" in their product name is unhelpful and misleading; they are GUI libraries. Look at the specific product links to see a screen-shot and feature list. The more capable the display, the more features. Probably bet to talk to the supplier for support for your device.
Clifford
A: 

Another alternative you might want to look at if this is going to be a commercial project would be the Storyboard Suite from Crank Software.

It was designed specifically for embedded systems, is portable to multiple operating systems, CPU architectures and rendering technologies and provides a GUI builder that lets you use images as your 'widgets' and use Lua scripting for the system and glue logic.

I think it is pretty neat, but I'm pretty biased =;-)

Thomas

Thomas
A: 

NuttX is a real-time operating system for microcontrollers. The author has starting a developing some gui primitives for LCD displays for it.

DoxaLogos
A: 

We've started using easyGui and it seems good. You design the screens in a PC app then it generates the source code - making the design stage really easy.

It does most of the things on the list. Line graphs are coming soon. You can make up buttons pretty easily as reusable structures.

It comes with template drivers for lots of displays - depending on how closely the template matches your display (colour depth & interface are the biggest issues) you might be able to use the code unmodified or change it to suit.

peter_mcc
A: 

I have been working on a similar project. Closest thing I could find are in the following links, but I doubt you will find a library with all the features you desire. These will only setup basic drawing functions, but it's a start. There are also some useful tools for bitmap converting and font creators if you dig around.

http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/glcd_dcf77/index.html

http://en.radzio.dxp.pl/

Almost everything else I have seen here is way overkill for what the poster seems to be asking for.

radix07
+1  A: 

You should take a look at Contiki [wikipedia.org]

Besides being a small and elegant operating system for many 8/16/32-bit microcontrollers, it also features a GUI toolkit. It runs on the Atmel AVR!

For your convenience, here is a direct link to the The Contiki Toolkit (CTK) source code.

Oskar N.
Unfortunately the offical website seems offline at the moment, but the project is also available at http://sourceforge.net/projects/contiki/
Oskar N.