The graphic library emWin is a professional tool for creating embedded GUIs. Even resource-constrained microcontroller-based applications are capable of running sophisticated and interactive user interfaces with emWin. It is optimized to be used with any target and display and any application from battery-powered single-chip products to high-end embedded systems. emWin can be used with any IDE and does not require an RTOS.
- Any display controller supported (monochrome, grayscale, color)
- Support for any IDE and toolchain
- Any microcontroller supported
- No RTOS required
- Small footprint
- Source code available
- VNC server and VNC client with support for file transfers available
- Graphics, and fonts can be stored in any memory space or swapped out to an external medium
- Pre-defined standard skins for widgets
- Common image formats supported (BMP, GIF, PNG, JPEG)
emWin was developed for efficient, processor and display controller-independent graphical user interfaces for any application that uses a graphical display. It is compatible with single-task and multitask environments, with a proprietary operating system, or with any commercial RTOS, and can be adapted to any size of physical and virtual displays with any display controller and CPU.
Several microcontrollers provide true hardware acceleration for graphical operations. They offload the CPU for all or most of the graphical operations by using DMA engines or other hardware blocks, allowing high throughputs.
emWin supports hardware accelerators like ChromART by ST Microelectronics or the 2D Drawing Engine (DRW) by Renesas.
A lot of modern LCD controllers offer the ability to use multiple layers. In emWin each layer could be used with its own color depth, size, and position. Every single layer could use its own display driver. That makes it possible to use multiple displays simultaneously, or multiple layers and multiple displays.
Numerous display drivers for different purposes are supported by emWin. Any commonly used display is therefore supported, e.g monochrome, grayscale or color displays. emWin covers a broad number of applications ranging from medical devices such as heart rate monitors to complex car displays.
Thanks to emWin's unparalleled resource efficiency, even for larger systems including WindowManager and widgets, in many cases 130 KB of RAM and 256 KB of flash memory are enough to develop a user-friendly and modern application. In addition, emWin offers various settings to further optimize the RAM and ROM requirements, for example using the window manager without transparent windows or disabling text rotation.
While the output of text is reduced to simple output of the desired strings in most languages, the output of Arabic, Hebrew, Thai, or bidirectional texts requires a bit more effort.
To turn on the language support, only a few function calls are required when starting the application, and all text-based functions will automatically support the required languages.
The text and language resource files enable easy multi-language applications. One can store one or multiple text or CSV files containing text in different languages. This allows changing the text of an application without modifying the code.
Writing text in emWin is based on the UTF-8 encoding. It supports drawing all characters of the "Basic Multilingual Plane" (BMP, plane 0) which covers the code points from 0x0000 to 0xFFFF.
Furthermore, it contains the algorithm needed for bidirectional scripts and text. emWin supports various types of fonts which can be implemented as C font files, as TrueType font files, as SIF, XBF, and iType. To save memory emWin provides three options: The first one is a limitation of the character set to only those characters that are actually displayed on the screen. One can also save all codepoints, i.e. the characters, which are used in the application, in a pattern file. Last but not least, it’s also possible to specify the Unicode range which is used.
emWin supports a wide range of image formats, including several emWin specific formats as well as BMP, JPEG, GIF, and PNG files.
The recommended and most efficient way to display a bitmap known at compile time is to use one of the emWin specific formats. If the application needs to display images not known at compile-time, the image needs to be available in a graphic file format supported by emWin.
In this case, the image file can reside in memory or any other storage device; it can be displayed even if the amount of available memory is less than the size of the image file. emWin supports BMP, JPEG, GIF files. PNG file support can be achieved by adding the PNG library available on our website.
emWin offers a two-digit number of bitmap formats between 1-32 bit color depth including several RLE formats. Neighboring, identical color codes are combined, so that the corresponding color and the corresponding number of occurrences have to be stored only once. The RLE alpha format makes it possible to represent the same image with different colors.
A set of routines to easily create, move, resize, and manipulate any number of windows is supplied by the emWin PRO WindowManager (WM). It permits the use of multiple windows at once and the layering of different windows.
emWin widgets are windows with object-type properties. Those control elements react to certain events and enable user interaction. emWin provides dozens of available widgets which mostly can be “skinned” appearance-wise.
Bringing up motion into an application can be done in several ways. If a fixed sequence of pictures does not work and one or more objects happen to change properties like position, color, shape, size, or whatever within a given period of time, emWin offers an animation object for exactly that purpose.
It can animate multiple items during the timeline of an animation. An animation item is a custom-defined routine that receives a position value from the animation object. That value is calculated independent of the current point in time. The calculation could be done by predefined or custom-defined methods.
emWin comes with a specific movie format EMF (EmWin Movie File Format), which provides three main advantages: Only one frame is required in memory, no decompression algorithms are needed and no license fees are required. To make the conversion of nearly any movie format to EMF easy, emWin comes with a converter based on the open-source tool FFmpeg which is available under www.ffmpeg.org. The free software can convert files of nearly any movie file source format into any desired destination format, as well as into single JPEG files.
emWin enables rapid GUI development using a PC and a pixel-perfect simulation library. These combine to replicate the user experience, exactly — both display content, as seen on the target screen, and user input are supported for live interaction. Because the simulation uses the same C code as is compiled for the target, what is experienced on the PC is what is experienced on the target. It compiles and executes the application code on the Windows host system. This enables designing and debugging the user interface on the host PC. With this feature, working demonstrations of the application can be made for discussion of the user interface. Another advantage of simulation is that development can start well before hardware is ready, helping reduce time to market. If an application uses multiple display layers, such as foreground and background, emWin can show each display layer individually, in its own window, as well as a composite view which represents the final content to be seen by the user. To run in simulation, Microsoft Visual Studio or Code::Blocks/MinGW is needed.