Calibre UK PICA93LV user manual Code. Why?

Page 34

CALIBRE

￿

￿

Windows 95 START - Run regedit

HKEY_LOCAL_MACHINE

--SYSTEM

--CurrentControlSet

--Services

--Class

--WinRT

--WinRTdev0

--Parameters --Section0 --Section1

Windows NT START - Run regedit

HKEY_LOCAL_MACHINE

--SYSTEM

--CurrentControlSet

--Services

--WinRT

 

 

--WinRTdev0

 

 

--Parameters

 

--Section0

 

--Section1

Question

I am using your Windows 95 / NT DLL and I am always getting a time out error

 

code. Why?

Answer

Check the Syntax of the setup function, this problem is most usually caused by

 

swapping the Status Wait and Sclk parameters.

 

The correct syntax is i2cstatus = setup (baseaddress, ownaddress, sclk, statuswait)

Question

I have read the manual and still cannot get the communications to run. What

 

do I do next?

Answer

Check that you have fully implemented the protocol between the adapter and the

 

other I2C devices see the device manufacturers data sheet for details.

 

Check that the software you have written is logically and syntactically correct - this is

 

probably the most common cause of software faults we have to deal with.

Send us the following details:-

1)The link settings of the adapter.

2)A sketch of the relevant I2C hardware including the location of bus termination.

3)The type and speed of processor within your PC and which operating system, you are running.

Issue 1.3

Page 31

22/07/99

Image 34
Contents Calibre Calibre CopyrightContents General Introduction Configuring the AdapterIntroduction Packing ListInstalling the Adapter Typical PC ConnectionPower Supply Connecting the Adapter to Your SystemConnector Pinout Bus Capacitance Limitations\C\CLIB\CPICA.LIB Software Utilities\C\CLIB\SPICA.LIB \C\CLIB\MPICA.LIB\B\SOURCE\PROMREAD.BAS DOS Qbasic Library/Programs\B\SOURCE\I2CINC.BAS \B\SOURCE\PROMWRIT.BASWindows LIB/DLL Functions Int ownaddress Using the UtilitiesRoutines Int sclkInt slaveaddress Int i2cstatusInt setnack Calibre Int i2cdata Calibre Int i2cstatus Number if the adapter is to read from the slave Sclk% Qbasic RoutinesOwnaddress% I2cstatus%Slaveaddress% Setnack% I2cdata%See Appendix a for details status codes I2cstatus% Is to read from the slave Int baseaddress Libraries for Programming in Microsoft Windows EnvironmentsInt statuswait Int ErrCode Int wrDataSendaddress Address to be accessed via the I2C, e.g. A1H Int far *transferarray Int sendbytesint far *transferarrayInt bsent Int getbytesint far *transferarray Int nobytesreadSlave using the adapter Further Information Bit 7 MSB The Pending Interrupt Not PIN Bit Bit 4 The Bus Error BER BitAppendix a Parallel I2C Communications Adapter Status Codes Bit 6 Not UsedAppendix B Parallel I2C Communications Adapter Control Codes Question Do you have software to talk to my........? Question Get corrupted transfers why is this?Most Commonly Asked I2C Questions QuestionCode. Why? Please Email Your Query to