LCM2 application development
The LCM2 display terminals are controlled via a serial interface. The controlling hardware can be an arbitrary customer device or module, even a PC.
From your system instructions are sent to the LCM2 which are then executed. The instructions consist of data packets which are generated by the controlling device. In order to simplify programming, the starterkit contains source code in ANSI-C for generating these data packets (we call this piece of software the "Example Master"). The example master provides various functions which can be used to write a complete display application.
A simple instruction sequence e.g. could be as follows:
/* Set the current writing position to coordinates 10,10 */
disp_set_cursor_position(10, 10);
/* At this place write the text "Hello World !" */
disp_text("Hello World !");
/* Now set the current writing position to coordinates 40,100 * /
disp_set_cursor_position(40, 100);
/* Draw a circle with radius 20 */
disp_circle(20);
The Example Master can easily be adapted to your individual system. Details are covered in the GUI Interpreter Manual. Here further examples, the function reference and the complete specification of the communications protocol can be found.
Note: For programming your controlling system you can of course use any programming language you like, not only C.
Special property: The functions, which are realized by the Example Master are compatible with the functions of the GUI library, to a large extend. This provides the following advantages:
- If in a future project you want to use a custom hardware with LCD interface, the existing application can be ported easily.
- The starterkits can be used for software development even if finally the applicaiton shall run on a custom LCD hardware.
|