CALIBRE

￿

￿

SOFTWARE UTILITIES

3.1.Introduction

Unpack the software from the CD-ROM in accordance with the instructions provided with the licence.

The Software utilities contain simple DOS routines in both C, QBASIC and Windows DLL / LIB (16bit only) for use with Visual Basic and Microsoft C++.

These utilities can be used for setup the PICA and to perform basic communications.

3.2.DOS C Library/Programs

3.2.1.

Files on disc

 

\C\CLIB\SPICA.LIB

The library containing the low level functions (small memory

 

 

model)

\C\CLIB\CPICA.LIB

The library containing the low level functions (compact memory

 

 

model)

\C\CLIB\MPICA.LIB

The library containing the low level functions (medium memory

 

 

model)

\C\CLIB\LPICA.LIB

The library containing the low level functions (large memory

 

 

model)

\C\LIBSOURC\PICA.C

The source code for the libraries

\C\INC\PICA.H

The include file for the library

\C\SOURCE\I2CINC.C

The I2C transfer functions

\C\SOURCE\PROMREAD.C

Sample EEPROM reading function

\C\SOURCE\PROMWRIT.C

Sample EEPROM writing function

\C\SOURCE\READ.MAK

Make file for PROMREAD.C

\C\SOURCE\WRITE.MAK

Make file for PROMWRIT.C

3.2.2.Typical C Project Arrangement

#include DOS.H

PICA.H

MAKELIB

PICA.C

XPICA.LIB

#include PICA.H Compile I2CINC.OBJ I2CINC.C

User applicationCompile PROMREAD.OBJ e.g. PROMREAD.C

LINK

PROMREAD.EXE

Figure 2.0 Typical Project Arrangement.

Figure 2.0 shows a typical C project, Calibre UK Ltd have produced the library files, SPICA.LIB, MPICA.LIB, CPICA.LIB and LPICA.LIB, which contains all the low level functions required to interface to the adapter via the parallel port. These libraries cover the standard memory models, the library appropriate to the memory model of your project will require linking with the object files.

Issue 1.3

Page 4

22/07/99

Page 7
Image 7
Calibre UK PICA93LV user manual Software Utilities, C\Clib\Spica.Lib, C\Clib\Cpica.Lib, C\Clib\Mpica.Lib, C\Clib\Lpica.Lib