Please enable JavaScript to view this site.

uEye .NET Manual 4.97

hint_info

I2C functions are only supported by the following PCB versions:

uEye LE USB 3.1 Gen 1

USB 3 uEye LE

USB uEye LE

GigE uEye LE

Class

uEye.I2C

Accessible

Camera.I2C.Write

Syntax

uEye.I2C.Write(int s32DeviceAddr, int s32RegisterAddr, byte[] byData)

Description

Writes data via the I2C bus of a board level camera.

The uEye camera processes I2C addresses in a 7-bit format that is created from the 8-bit format by a bit shift to the right. The eighth bit indicates whether an address is a read (1) or write (0) address. For example, the 7-bit address 0x48 is the write address 0x90 and the read address 0x91 in 8-bit format.

hint_info

The following addresses for nDeviceAddr are assigned to the uEye camera and must not be used:

7-bit format: 0x10, 0x48, 0x4C, 0x50, 0x51, 0x52, 0x55, 0x5C, 0x5D, 0x69, 0x77

8-bit format: 0x20, 0x90, 0x98, 0xA0, 0xA2, 0xA4, 0xAA, 0xB8, 0xBA, 0xD2, 0xEE

For UI-336x/UI-536x and UI-337x/UI-537x: 0x82

For information on the signals applied to the I2C bus, refer to the uEye manual.

hint_info

If you write data on a micro controller via the uEye camera, make sure that the micro controller confirms the transfer with an ACK message.

Parameter

s32DeviceAddr

Device address (8 bit format)

s32DeviceAddr | uEye.Defines.I2C.DontWait

By default, it is polled when the byte is actually written to the storage cell. If uEye.Defines.I2C.DontWait is used with "OR" in combination with s32DeviceAddr there will be no polling.

s32RegisterAddr

Address of a 8 bit register (only 8-bit addresses are valid)

s32RegisterAddr | uEye.Defines.I2C.BitRegister16

Address of a 16 bit register

s32RegisterAddr | uEye.Defines.I2C.BitRegister0

If only a device address but no register address exists.

byData

Data to be written

Example

byte[] data = { 0x01, 0x02 };
int address = 0x4b;
int register = 0x02;
camera.I2C.Write(address, register | (int)uEye.Defines.I2C.BitRegister16, data);