Example Programs

Universal Driver Documentation

Table of contents

Types of Example Programs

Diamond Systems has prepared a number of example programs to demonstrate the use of our products and software. These examples are all available from our website as well as the product CD-ROM which is delivered with most product shipments.

Demo Programs

Each board has its own set of example programs packaged as a zip file in the Demos folder of the product CD-ROM. These are also available on our website in the software section. These demos come with source code and build files for each supported operating system. Executable versionf of the demos are included for DOS as well. The demo programs are organized by the Universal Driver function they demostrate. You can run the program to see how the feature works, and then copy and paste the code into your own projects as as start to your own programming.

Compiling Demos on DOS

A project file for each demo is included for Borland C++ 5.0. You can launch this program file to compile the demo using Borland. The demos are already compiled for DOS so you don't need to do this unless you'd like to make changes to the demo program. You must install the Universal Driver on your system before compiling the demo programs.

Compiling Demos on Windows or WinCE 6.0

For compiling the demo programs on Windows CE 6.0, you would require the Visual Studio 2005 IDE from Microsoft along with the Platform Builder 6.0.

The Demo programs already have the required include file DSCUD.H included in the code. The project needs to statically link with the library file dscud_api.lib to create the application executable.

The driver DLL file DSCUD_API.DLL MUST be present in the final image of the platform to run the demo program. All the demo prgorams for Helios board are included in the runtime image provided by DSC.

Compiling Demos on Linux

A Makefile is included at the root of each demo package which can be used to compile all the demos for either Linux. Just type "make" at the base directory of the demos where you see the Makefile and it will compile all the demos for that board. You must have installed the Universal Driver before compiling. The driver must be installed at /usr/local/dscud_6.00_1 on Linuxfor the Makefile to find the files it requires.

Utility Programs

Utility programs with source code are available for checking or diagnosing various features on some boards.

Source Code Examples

We also have written example source code which demonstrates how to program some Diamond Systems boards without using the Universal Driver. This is for customers who are using an operating system which is not supported, or for whatever reason are writing their own low level driver software instead of using the Universal Driver. These example programs use simple inp() and outp() type direct I/O calls to program the boards. To make use of the source code you'll need to port them to your own platform and find the local equivalent of those functions before compiling. Ask for the availability of such pre-written examples for your board.


This page was last modified 03:30, 13 Aug 2010.
Copyright (c) 2004 Diamond Systems. All Rights Reserved.