Calibre UK UCA93 manual Int RdData, Int NoBytesToTransmit, Int Timeout

Page 14

 

 

CALIBRE

 

 

 

 

 

 

 

 

 

This is the number of times the Adapter is to try to send the address.

Parameters returned

None.

Prerequisites

Adapter must be configured using setup.

Functional description

This function causes the Adapter to read a block of data via the I2C bus.

3.3.13.GetBlockData

Function specification

int GetBlockData(void)

Parameters are:

None

Parameters returned

int RdData.

Prerequisites

Adapter must be configured using Setup. The block read function MUST have

 

been called and the BlockReadStatus should be called to determine if the

 

transfer has been completed

Functional description

Read data from the driver buffers. MAXIMUM DATA SIZE 2048 bytes.

3.3.14.BlockReadStatus

Function specification

int BlockReadStatus (void))

Parameters are:

None

Parameters returned

int TransferStatus.

 

Returns 0 if the transfer has not been completed.

 

Returns the I2C Bus status if the transfer is completed.

 

Returns 900AH if the transfer time out.

Prerequisites

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

 

the BlockRead function.

Functional description

Returns the current status of the BlockWrite transfer NOTE this function will

 

time out if the block is not sent in NoBytes / 100 seconds (or 1 second which

 

ever is the greater).

3.3.15.BlockSlaveTransmittter

Function specification

int BlockSlaveTransmitter(int NoBytesToTransmit, int Timeout)

Parameters are:

int NoBytesToTransmit

 

The number of bytes to be sent which MUST be pre loaded into the driver

 

buffers. The maximum size of this buffer is 2048 exceeding this WILL cause

 

the data to be corrupted.

 

Int Timeout

 

If the transfer is not completed within Timeout seconds the

 

BlockSlaveTansmitStatus will return a Timeout error.

Parameters returned

Returns an unused integer.

Prerequisites

Adapter must be configured using Setup. The data MUST be loaded into the

 

driver buffers PRIOR to calling this functions (see SetBlockData).

Functional description

This function causes the Adapter to respond to I2C master requests for data.

 

This function supports transfers where the master sends WordAddress pointers

 

to data locations within the transfer block. If the master does not request to

 

read data from the beginning of the data block the Adapter will remove the data

 

from the buffer until the byte requested by the master is reached it will then

 

transmit the data.

 

Should the master exceed the number of bytes available the Adapter will

 

honour all requests for data and the overflow will be reported see

 

BlockSlaveTransmitterStatus.

 

This function allows the user to emulate simple slave devices e.g. EEPROM

 

BUT once the master has completed the transfer the Adapter will NOT respond

 

to any further requests for data until the BlockSlaveTransmitter is called again.

Issue 1.0

Page 11

01/07/03

 

Image 14
Contents Calibre Calibre Contents Packing List Connecting the Adapter to your SystemGeneral Introduction 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 ClockSpeed Int SlaveBlockTimeoutInt ownaddress Int BusVoltageInt I2CData Int DataByteSendAddress NoneUsing the Adapter Int I2CstatusInt DataVal Int NoBytesToSendInt NoTries Returns an unused integerInt NoBytesToTransmit Int TimeoutInt RdData Int NoBytesToReceive Int PullupVoltage Int IOState IntSendAddressNoStatus WriteByteNoStatus Real-Time Bus Monitor StopBit 7 MSB The old PIN Bit Bit 4 The BER Bus Error BitAppendix a I2C Communications Adapter Status Codes Bit 5 The old STS BitBlock Functions USB Bus CharacteristicsPolling the Status Register and how to avoid it Block Write FunctionSlave Transmitter Function Slave Receiver FunctionCalibre General Questions When the the Most Commonly Asked I2C QuestionsQuestion Get corrupted transfers why is this? Question Do you have software to talk to my........?