Calibre UK UCA93 Owner's Manual

Manual is about: I2C Communications Adapter

Summary of UCA93

  • Page 1

    Calibre uk ltd 2003 calibre uca93 i2c communications adapter issue 1.0 01/07/2003.

  • Page 2: Calibre

    Calibre issue 1.0 page i 01/07/03 welcome to the calibre uca93 adjustable voltage i 2 c adapter. This adapter provides full i 2 c bi-directional compatibility as either a master or slave from within a windows 98 2000 or windows xp environment. If you have any queries relating to this or any other i ...

  • Page 3: Calibre

    Calibre issue 1.0 page ii 01/07/03 contents introduction 1 1.1. General introduction 1 1.2. Packing list 1 1.3. Configuring the adapter 1 1.4. Bus termination and protection 1 1.5. Connecting the adapter to your system 1 1.6. Bus capacitance limitations/cable choice 2 1.7. Variable voltage bus power...

  • Page 4: Calibre

    Calibre issue 1.0 page 1 01/07/03 introduction 1.1. General introduction the uca93 is a usb v1.1 to i 2 c adapter based on the pic 16f874 microcontroller using a philips pcf8584 for the bus monitor function. It features full i 2 c bi-directional compatibility as either a master or slave. I 2 c conne...

  • Page 5: Calibre

    Calibre issue 1.0 page 2 01/07/03 io 1 is a 5v ttl input and can only be used on 5v tolerant systems. Pin function 1 nc – do not connect 2 io 0 3 io 1 4 0v 1.6. Bus capacitance limitations/cable choice the maximum allowable capacitance on the i 2 c bus in normal mode depends on the value of the scl ...

  • Page 6: Calibre

    Calibre issue 1.0 page 3 01/07/03 installing the adapter under windows 2.1. Introduction this section details the installation of the uca93 i 2 c communications adapter under windows 98® / windows2000® and windows xp®. The appearance of the dialog boxes during the installation of new hardware varies...

  • Page 7: Calibre

    Calibre issue 1.0 page 4 01/07/03 libraries for programming in microsoft windows environments 3.1. Introduction each utility is documented in a standard format which lists its name, usage, function and effect on the adapter is given. The adapter should be setup prior to any data transfer. Within the...

  • Page 8: Calibre

    Calibre issue 1.0 page 5 01/07/03 3.2. Function prototypes if you are using ‘c’ or ‘c++’ copy the file caluca.H into the directory containing your project and add the line: #include " caluca.H" the following functions are implemented in the windows libraries:- extern __declspec(dllimport) int winapi...

  • Page 9: Calibre

    Calibre issue 1.0 page 6 01/07/03 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" (by...

  • Page 10: Calibre

    Calibre issue 1.0 page 7 01/07/03 3.3. Function description 3.3.1. Setup function specification int setup(int ownaddress, int clockspeed, int busvoltage, int pullupson, int slaveblocktimeout) parameters are: int ownaddress this is the i2c address to which the adapter is to respond in slave mode. Thi...

  • Page 11: Calibre

    Calibre issue 1.0 page 8 01/07/03 writebyte function specification int writebyte(int databyte) parameters are: int databyte this is the byte of data to be written. Parameters returned int errcode . If the transfer time out occurs error code 8002h is returned otherwise the status is returned. Prerequ...

  • Page 12: Calibre

    Calibre issue 1.0 page 9 01/07/03 usually a data pointer would already have been written using writebyte. Functional description sends a start code and the slave address. The function waits for the address to be sent. Should a time-out occur during the sending of an address then an error code 8004h ...

  • Page 13: Calibre

    Calibre issue 1.0 page 10 01/07/03 3.3.9. Blockwrite function specification void blockwrite(int slavewriteaddress, int msb_wordaddress, int lsb_wordaddress,int nobytestosend, int notries ) parameters are: int slaveaddress this is the address to be accessed via the i2c, e.G. A0h int msb_wordaddress, ...

  • Page 14: Calibre

    Calibre issue 1.0 page 11 01/07/03 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. Getblockd...

  • Page 15: Calibre

    Calibre issue 1.0 page 12 01/07/03 3.3.16. Blockslavetransmitterstatus function specification int blockslavetransmitterstatus (void)) parameters are: none parameters returned int transferstatus . Returns 0 if the transfer has not been completed. Returns the a status if the transfer is completed (see...

  • Page 16: Calibre

    Calibre issue 1.0 page 13 01/07/03 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...

  • Page 17: Calibre

    Calibre issue 1.0 page 14 01/07/03 3.3.21. Write_io_pin function specification int write_io_pin (int ionumber, int iostate) parameters are: int ionumber the number of the io pin (0 or 1) to be driven int iostate the required state (0 or 1) of the selected io pin parameters returned int returns a 0 i...

  • Page 18: Calibre

    Calibre issue 1.0 page 15 01/07/03 3.3.23. Sendaddressnostatus function specification void sendaddressnostatus(int slaveaddress, int setnack, int notries) parameters are: int slaveaddress this is the address to be accessed via the i2c, e.G. A0h. Int setnack this controls whether the adapter transmit...

  • Page 19: Calibre

    Calibre issue 1.0 page 16 01/07/03 3.3.27. Restartnostatus function specification void restartnostatus(int slaveaddress, int setnack, int notries) parameters are: int slaveaddress the address to be accessed via the i2c, e.G. A1h. Int setnack this controls whether the adapter transmits an acknowledge...

  • Page 20: Calibre

    Calibre issue 1.0 page 17 01/07/03 the real-time bus monitor to install the monitor run the setup program located in the \cd_usb\usb_monitor folder, follow the instructions given by the installation wizard. Before attempting to run the monitor program ensure that the device drivers are installed cor...

  • Page 21: Calibre

    Calibre issue 1.0 page 18 01/07/03 appendix a i 2 c communications adapter status codes this is an eight bit register, read using the getstatus routine. Each individual bit has its own meaning as follows: bit 7 (msb) - the (old) pin bit to all intents and purposes, this bit is now redundant. Previou...

  • Page 22: Calibre

    Calibre issue 1.0 page 19 01/07/03 appendix b migration notes for existing calibre i2c customers these notes are intended for customers who have code working on one or more of calibre uk’s existing at or pci based adapters and wish to convert it to work with the new uca93 adapter. The fundamental di...

  • Page 23: Calibre

    Calibre issue 1.0 page 20 01/07/03 the slave functions of the uca93 differ most from traditional calibre at and pci bus based products. A user must make a pre-determined decision whether to put the adapter into master, slave transmitter or slave receiver modes. The adapter’s own address is establish...

  • Page 24: Calibre

    Calibre issue 1.0 page 21 01/07/03 when the master terminates the transfer, the adapter completes sending the data block to the host together with a single status byte indicating how the transfer went, and the data is put into a global variable. The blockslavereceiverstatus function waits for this s...

  • Page 25: Calibre

    Calibre issue 1.0 page 22 01/07/03 when the the most commonly asked i2c questions general questions question i get corrupted transfers why is this? Answer the most likely reason for corrupted transfers is either incorrect bus termination or excessive capacitance - see the manual for details. Questio...