Data-address 0x1 does nothing

My goal is to understand the write method

In the write method, it run i2cset twice, 1st for data-address 0x0 and 2nd for data-address 0x1.

First, i run i2cset -y 10 0xc 0x0 0x59 and can see the effect.

The problem is when I tried to run i2cset -y 10 0xc 0x1 0x90. I can’t see the effect.

  1. 0xc is the chip-address
  2. 0x1 is the data-address
  3. 0x90 is the value, calculated from value = 350; value <<= 4; value & 0xFF.

My assumption based on PTZ-Camera-Controlle repository

  1. data-address 0x0 is for focusing
  2. data-address 0x1 is for zooming.


chipaddr: 0x0c, vcm control high addr: 0x00 , low addr: 0x01

Need to initialize before use: chipaddr: 0x0c, vcm init addr: 0x02, write 0x00 to active vcm

vcm is valid within a certain range of values, not all values are valid

The current example always exceed 0x80. Changing to 0x90 does not make difference, may I know the range of values and the expected result?

Our actual result is that there is no visible difference.


The theoretical range is (0, 4096)
The actual value you can adjust to the maximum value by using the manual focus program, and read the register to get the actual value.

I am sorry but I don’t know 0x1 usage. I am aware that I need to initialize before use vcm init addr: 0x02 with value 0x0. The problem is I am not sure what is low addr: 0x01 is for.

Could you please give example why I should do i2cset -y 10 0xc 0x1 value like in the Data-address 0x1 does nothing - #2 by Edward?


The effective bit of the control register of vcm is 12bit, which requires two 8bit registers.
So 0x00 is the high register address and 0x01 is the low register.
For example, if you want to write 2000 to vcm, you should write 0x7e to 0x00 register and 0x70 to 0x01 register.
2000 (dec) = 0x7e7 (hex)
0x7e7 << 4 = 0x7e70 (high 12bit is valid)
high = (0x7e70 & 0xFF00) >> 8 = 0x7e
low = (0x7e70 & 0x00FF) = 0x70

Ah. I get it, 12 bits. Noted.