Python command line utility for viewing and changing the contents of the EEPROM incorporated into ByVac IC's. This is specifically:

BV4601, BV4603, BV4604, BV4619 (i2c interface)
PO12, P016, P018

The utility is called sv3_i2c_util and does require notSMB installing. It is intended to be run from the command line of the Raspberry pi as follows:

python <i2c Bus> <i2c address> <command options>

The i2c bus is either 0 or 1, for newer Raspberry pi's the bus will be 1, for older it will be 0. I2c address is what it says, this is the 7 bit address, the same address as reported by i2cdetect.

Command Options

-write <EEPROM address> <value>
Writes a value to the specified EEPROM address

-dump <start> <end>
Dumps the contents of the EEPROM to screen

print out the firmware version

Prints out the device id

Resets the device, for most EEPROM values to take effect the devices requires a reset as normally the EEPROM values are only read at start up.

Changing the I2C address

The I2C address for these devices is stored in three places, normally EEPROM locations 1,14 and 250 but check with the data sheet. To change the address of the device at least two of the EEPROM address require changing. Also the 8bit address is used so multiply the 7 bit address by 2 before storing.

As an example device x has the address 0x3d as reported by i2cdetect, this is the 7 bit address. A dump of locations 0 to 32 will reveal something like the following:

Adr  0   1   2   3   4   5   6   7  -- ASCII --
0    0   7a  2d   7  ff  ff  ff  ff . z - . . . . .
8    ff  ff  ff  ff  ff  ff  7a  ff . . . . . . z .
10   0   0   0   c8   5  1e  10   1 . . . . . . . .
18   9   c4  19  82  3c  ff  24  44

Note that address 1 and 14(0x0e) contains the address 0x71 (this is 0x3d * 2). To set the address to say 0x28, multiply by 2 (0x50) and then write this value to the locations 1 and 14 BEFORE resetting. The reset command will use the old address, thus:

python sv3_i2c_util 1 0x3d -reset

But from now on the new address will be needed thus:

python sv3_i2c_util 1 0x28 -dump 0 32