Getting started, Resetting the adapter, Introduction to the utilities – Calibre UK IC Communication Adapter ICA93LV User Manual

Page 6: Getting, Started

Advertising
background image

Revision 1.7

Page 5 of 27

09/12/1999

4.

Getting Started

4.1.

Resetting the Adapter

A reset forces the adapter into a well defined state, ready for initialisation. The card uses the same reset
line as the PC so either a power up or hard reset (press the <RESET> button on your PC) will suffice.

4.2.

Introduction to the Utilities

The utilities supplied with the adapter contain simple DOS routines in both C and TurboBASIC, which can
be used for setup and basic communications. This is a list of the DOS utilities supplied:

C Library/Programs

Procedure or
File Name

Subroutine Name

Brief Functional Description

i2c.h

setup

Sets user defined initial conditions.

getstatus

Reads status register.

sendaddress

Sends slave address, data transmission mode and start signal.

sendstop

Sends stop signal.

writebyte

Writes a byte of data to a previously specified address.

readbyte

Reads a byte of data from a previously specified address.

restart

Sends Restart and slave address of device, which is to be
communicated with, without sending a Stop.

count.c

Sends a counting sequence of 0 to 99 to a seven segment
display driver.

count.exe

Executable version of above.

ram.c

Writes then reads back data from a series of RAM locations.
Checks for correct readback.

ram.exe

Executable version of above.

setup.c

Sets up typical initial conditions – Own Slave Address = AE
(Hex), SCL = 90KHz; assumes adapter’s base address = 0310
(Hex).

setup.exe

Executable version of above.

TurboBASIC Library/Programs
Procedure or
File Name

Subroutine Name

Brief Functional Description

i2c.inc

setup

Sets user defined initial conditions.

FNgetstatus%

Reads status register.

sendaddress

Sends slave address, data transmission mode and start signal.

sendstop

Sends stop signal.

writebyte

Writes a byte of data to a previously specified address.

FNreadbyte%

Reads a byte of data from a previously specified address.

restart

Sends restart and slave address of device which is to be
communicated with, without sending a Stop.

count.bas

Sends a counting sequence of 0 to 99 to a seven segment
display driver.

tbcount.exe

Executable version of above.

ram.bas

Writes then reads back data from a series of RAM locations.
Checks for correct readback.

tbram.exe

Executable version of above.

16 bit Windows DLLs for use with Visual Basic 3.0 and Microsoft C++1.5 are included on the disc. See
Section 7.3 for a detailed description of the routines available. All library functions listed for the DOS
routines are covered. Additionally some extra multiple operation functions are supplied.

Advertising