This page is provided so that our customers can view some example programs showing them how to use some of the features on our controller cards. If you have a short piece of code that you think would serve as a good example for other customers please feel free to email it into us. If we agree we will post it on this web site. Our email address is support@cms.uk.com. To enable us to sort examples from problems please put EXAMPLES in the subject field.
These examples are made freely available to customers as example programs. They may copy, change or adapt these programs to meet their own specification. The code is provided 'as is' and is supplied without any warranties as to its suitability for any particular application.
Using Data Modules
Data modules are special modules that can be used to store information. It could be set up information, logging information, databases etc. The data module has a valid Minos header and a name. It can be loaded, saved, unloaded, locked or unlocked just like any other module. Where it differs from any other module is that it does not have a check sum and the contents of the data module is entirely up to the application program that is going to use it. There is usually an example of data modules in the shipping software (kttgen) which generates a key table to remap keys on a matrix key pad. Here are a few more examples.
KTTGEN.C
This program is provided in most Starter and Development Packs. It creates a data module that acts as a key conversion table to convert the key codes returned by a matrix key pad into real values.
DATAMOD.C
When this program runs it checks to see if there is a data module with the name "MyData". If there is not, then the program attempts to create one. If a data module is created then a message is displayed showing the start address of the module and the data. The data module is then filled with data. If when the program starts running a data module is found then the data in the module is printed on the screen.
CARD.C
This program is an example of a database application. It uses swipe cards on an RS232 card reader to identify users. It could be used as a basis for a security application. This application uses simple compression techniques to compress the data stored.