Calibre UK ICA93LV Getting Started Resetting the Adapter, Introduction to the Utilities

Page 6

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.

Revision 1.7

Page 5 of 27

09/12/1999

 

Image 6
Contents Contents ICA93LVIntroduction Packing ListConfiguring the Adapter Setting the Adapter Base AddressWait State Generator Installing the Adapter Bus Termination and ProtectionVariable Voltage Bus Power Supply Connecting the Adapter to your System Connector PinoutNormal/Long Distance Mode Bus Capacitance Limitations/Cable ChoiceLibrary/Programs Getting Started Resetting the AdapterIntroduction to the Utilities TurboBASIC Library/ProgramsUsing the Utilities Routines 1. I2C Setup/Initialisation Routine2. I2C Status Checking Routine 3. I2C Address and Start Sending Routine 4. I2C Read Data Byte from Slave Routine Write Data Byte to Slave Routine Send an I2C Stop RoutineTurboBASIC Routines 1. I2C Setup/Initialisation Routines 7. I2C Restart and Address Sending Routine2. I2C Status Checking Routine 3. I2C Address and Start Sending Routine Write Data Byte to Slave Routine 7. I2C Restart and Address Sending Routine Setup Visual Basic 3.0 functionSendaddress Sendaddress SendstopRestart Getstatus SendbytesGetbytes Slavelastbyte Further Information BUS Error Real-Time Bus MonitorBit 6 Not Used Appendix a I2C Communications Adapter Status CodesBit 7 MSB The PIN Bit Bit 5 The STS BitAppendix B I2C Communications Adapter Control Codes Question Do you have software to talk to my........? DOS Software QuestionsHkeylocalmachine System