Instruction manual
Table Of Contents
- INTRODUCTION
- GETTING STARTED
- MAKING THE CONNECTIONS
- USING THE PC215E
- STRUCTURE AND ASSIGNMENTS OF THE REGISTERS
- Register Assignments
- Register Groups
- The Register Details
- Programmable Peripheral Interface PPI-X Data Register Port A
- Programmable Peripheral Interface PPI-X Data Register Port B
- Programmable Peripheral Interface PPI-X Data Register Port C
- Programmable Peripheral Interface PPI-X Command Register
- Programmable Peripheral Interface PPI-Y Data Register Port A
- Programmable Peripheral Interface PPI-Y Data Register Port B
- Programmable Peripheral Interface PPI-Y Data Register Port C
- Programmable Peripheral Interface PPI-Y Command Register
- Z1 Counter 0 Data Register
- Z1 Counter 1 Data Register
- Z1 Counter 2 Data Register
- Counter/Timer Z1 Control Register
- Z1 Counter/Timer Status Register
- Z2 Counter 0 Data Register
- Z2 Counter 1 Data Register
- Z2 Counter 2 Data Register
- Counter/Timer Z2 Control Register
- Z2 Counter/Timer Status Register
- Group Z Clock Connection Register
- Group Z Gate Connection Register
- Interrupt Source Selection Register
- Interrupt Status Register
- PROGRAMMING THE PC215E
- Copyright
- Files installed from the Distribution Diskette
- Windows DLL and Examples
- DOS 'C' Library and Examples
- Using the Dynamic Link Library
- Windows and DOS Library Functions
- Initialisation Functions
- Interrupt Control Functions
- Data Buffer Functions
- Timer/Counter Functions
- Differential Counter Functions
- Frequency Generation Functions
- Millisecond Stopwatch Functions
- Frequency Input and Output Functions
- Digitally- and Voltage-Controlled Oscillator Functions
- Digital Input/Output Functions
- Switch Scanner Matrix Functions
- Bi-Directional Data Bus Functions
- PC215E Library Error Codes
- PC215E Interface Guide For LABTECH NOTEBOOK
- Guide to User Programming
- Signal Centre
- CONTENTS
- DECLARATION OF CONFORMITY

Page
55
PC215E
6.3 Windows DLL and Examples
The PC215E DLL is a 16-bit Windows programmer's interface to the PC215E board. Provided
that the compiler/interpreter supports Windows, i.e. uses the Windows calling conventions, all
the functions can be called by software written in any language.
For C/C++ language applications, the software includes a ready prepared header file,
DIO_TC.H which covers all function definitions and declared constants. Similarly for Visual
Basic there is a module DIO_TC.BAS for inclusion in a project make file for DLL declarations
and constant definitions. For other languages the user will need to compile a suitable header in
which the DLL functions and constants are declared, and these files can be used as an
example.
The software includes Visual Basic examples as both runtime and source code. The runtime
examples can be used to exercise and become familiar with the hardware. The source code
serves two purposes. Firstly it can be used as a source of reference to see how the DLL
functions are used. Also it provides a starting point for anyone who wishes to write software
with similar functionality.
6.4 DOS 'C' Library and Examples
The 'C' library is a DOS programmer's interface to the PC215E board. The software includes
'C' examples as both runtime and source code. The source code can be compiled using the
Microsoft C/C++ or Borland C++ compilers - conditional compilation based on a #define at the
top of the program file allows the source code to be compatible with both languages.
To define the 'C' compiler in use, a single line in file DIO_TC.H must be changed for Microsoft or
Borland C/C++ users. The line that is not required must be removed (or made inoperative by
commenting out)
The following example extracted from the 'C' source shows the program set up for Borland C++
#define __BORLAND_C__ // Borland C++ users use this
//#define __MICROSOFT_C__ // Microsoft C/C++ users use this
Section 6.6 describes the library functions available. Please note that in C/C++, the function
syntax lines given should always end with a semi-colon. Where arguments to functions are
described as pointers, the address of a user-declared variable is required. This is easily done
by using the '&' reference operator. For example, function
TCgetCount
requires a pointer to a
variable declared as long, into which the count value result will be placed. A typical 'C' code
example for displaying the Z1 Counter 0 count value would be
long count; // declare count as long
TCgetCount( h, Z1, 0, &count ); // pass count by reference
printf( "count = %ld", count ); // count now contains new value
where h is a handle to a registered board. N.B. The large memory model should be used
when compiling the library and example programs.