Calibre UK UCA93 manual Int BusVoltage, Int PullupVoltage

Page 16

CALIBRE

3.3.18.BlockSlaveReceiverStatus

Function specification

int BlockSlaveReceiverStatus (void))

Parameters are:

None

 

Parameters returned

int TransferStatus.

 

Returns 0 if the no data has been received.

 

Returns the a status if the transfer is completed (see below).

 

Bit 0

Not Used

 

Bit 1

Not Used

 

Bit 2

Not Used

 

Bit 3

Not Used

 

Bit 4

Stop detected

 

Bit 5 Set if the transfer timeout (Value in Setup function) occurred

 

Returns 900DH if the expected number of bytes is exceeded

 

Returns 900CH if the transfer time out.

Prerequisites

Adapter must be configured using Setup. The transfer must be started using

 

the BlockSlaveReceiver function.

Functional description

Returns the current status of the BlockSlaveReceiver transfer NOTE this

 

function will time out the BlockSlaveReceiver function.

Read two bytes of data from the Adapter using GetBlockData to determine how many bytes of data the master read from the slave.

Read the first two bytes to determine how many bytes of data the master read from the slave (high byte first), read 1 byte to determine the status.

3.3.19.CheckBusVoltage

Function specification

int CheckBusVoltage (void))

Parameters are:

None

Parameters returned

int BusVoltage

 

Returns the I2C bus output voltage multiplied by 100.

 

Returns 0x800C if the transfer timed out.

Prerequisites

Adapter should be configured using Setup. If this is not done the I2C bus

 

voltage will default to 3.3V.

Functional description

Returns the current bus voltage multiplied by 100 as measured on pin 7 of the

 

output socket. For example, will return 330 for a 3.3V bus voltage , 500 for a

 

5.0V bus voltage and 200 for a 2.0V bus voltage.

3.3.20.CheckPullupVoltage

Function specification

int CheckPullupVoltage (void))

Parameters are:

None

Parameters returned

int PullupVoltage

 

Returns the I2C pullup voltage multiplied by 100 measured upstream of the

 

output overcurrent protection device.

 

Returns 0x800C if the transfer timed out.

Prerequisites

Adapter should be configured using Setup. If this is not done the I2C bus

 

voltage will default to 3.3V.

Functional description

The pullup voltage is the same as the I2C output voltage but measured

 

upstream of the resettable polyfuse protection device. Returns the current

 

pullup voltage multiplied by 100. For example, will return 330 for a 3.3V pullup

 

voltage , 500 for a 5.0V pullup voltage and 200 for a 2.0V pullup voltage. If the

 

pullup voltage differs from the bus voltage (measured by the previous function)

 

by more than a few tens of millivolts then too much current is being drawn from

 

the Adapter. No more than 250mA should be drawn from the Adapter.

Issue 1.0

Page 13

01/07/03

 

Image 16
Contents Calibre Calibre Contents Connecting the Adapter to your System General IntroductionPacking List Bus Termination and ProtectionVariable Voltage Bus Power Supply Bus Capacitance Limitations/Cable ChoiceInstalling the Adapter IntroductionLibraries for Programming in Microsoft Windows Environments Function Prototypes Calibre Int SlaveBlockTimeout Int ownaddressInt ClockSpeed Int BusVoltageInt DataByte SendAddressInt I2CData NoneUsing the Adapter Int I2CstatusInt NoBytesToSend Int NoTriesInt DataVal Returns an unused integerInt RdData Int TimeoutInt NoBytesToTransmit Int NoBytesToReceive Int PullupVoltage Int IOState IntSendAddressNoStatus WriteByteNoStatus Real-Time Bus Monitor StopBit 4 The BER Bus Error Bit Appendix a I2C Communications Adapter Status CodesBit 7 MSB The old PIN Bit Bit 5 The old STS BitUSB Bus Characteristics Polling the Status Register and how to avoid itBlock Functions Block Write FunctionSlave Transmitter Function Slave Receiver FunctionCalibre When the the Most Commonly Asked I2C Questions Question Get corrupted transfers why is this?General Questions Question Do you have software to talk to my........?