Calibre UK UCA93 manual Calibre

Page 9

CALIBRE

If you are using Visual Basic copy the file UCA93LV.BAS into the directory containing your project and add the file UCA93LV.BAS to your project:

The following functions are implemented in the windows libraries:-

Public Declare Function Setup% Lib "USBDLL_XP.dll" (ByVal OwnAddress%, ByVal Sclk%, ByVal BusVoltage%, ByVal PullUpsOn%, ByVal SlaveBlockTimeout%)

Public Declare Function SendAddress% Lib "USBDLL_XP.dll" (ByVal SlaveAddress%, ByVal setnack%) Public Declare Function Restart% Lib "USBDLL_XP.dll" (ByVal SlaveAddress%, ByVal setnack%) Public Declare Function WriteByte% Lib "USBDLL_XP" (ByVal wrdata%)

Public Declare Function ReadByte% Lib "USBDLL_XP.dll" (ByVal setnack%) Public Declare Function SendStop% Lib "USBDLL_XP.dll" ()

Public Declare Function GetStatus% Lib "USBDLL_XP.dll" ()

Public Declare Function Recover% Lib "USBDLL_XP.dll" () Public Declare Function SlaveLastByte% Lib "USBDLL_XP.dll" () Public Declare Function DLLVersion% Lib "USBDLL_XP.dll" ()

Public Declare Function SetBlockData% Lib "USBDLL_XP.dll" (ByVal DataVal%) Public Declare Function GetBlockData% Lib "USBDLL_XP.dll" ()

Public Declare Function BlockSlaveTransmitter% Lib "USBDLL_XP.dll" (ByVal TimeOut%) Public Declare Function BlockSlaveTransmitterStatus% Lib "USBDLL_XP.dll" ()

Public Declare Function BlockSlaveReceiver% Lib "USBDLL_XP.dll" (ByVal NoBytesToTransmit%, ByVal TimeOut%)

Public Declare Function BlockSlaveReceiverStatus% Lib "USBDLL_XP.dll" ()

NOTE A type is defined in UCA93LV.BAS to help passing parameters to the DLL, if you do not wish to use this local variables MUST be declared as static

Issue 1.0

Page 6

01/07/03

 

Image 9
Contents Calibre Calibre Contents General Introduction Connecting the Adapter to your SystemPacking List Bus Termination and ProtectionBus Capacitance Limitations/Cable Choice Variable Voltage Bus Power SupplyIntroduction Installing the AdapterLibraries for Programming in Microsoft Windows Environments Function Prototypes Calibre Int ownaddress Int SlaveBlockTimeoutInt ClockSpeed Int BusVoltageSendAddress Int DataByteInt I2CData NoneInt I2Cstatus Using the AdapterInt NoTries Int NoBytesToSendInt DataVal Returns an unused integerInt Timeout Int RdDataInt NoBytesToTransmit Int NoBytesToReceive Int PullupVoltage Int Int IOStateSendAddressNoStatus WriteByteNoStatus Stop Real-Time Bus MonitorAppendix a I2C Communications Adapter Status Codes Bit 4 The BER Bus Error BitBit 7 MSB The old PIN Bit Bit 5 The old STS BitPolling the Status Register and how to avoid it USB Bus CharacteristicsBlock Functions Block Write FunctionSlave Receiver Function Slave Transmitter FunctionCalibre Question Get corrupted transfers why is this? When the the Most Commonly Asked I2C QuestionsGeneral Questions Question Do you have software to talk to my........?