Page 1 of 1

I2C camera registers / set brigthness manually

PostPosted: Tue Oct 15, 2013 10:36 pm
by ntouros
hi community,

i am interesting to set brightness mannually in the srv_1 camera.i can prevent the blackfin from automatically adapting to lighting conditions with "vax" command but i want brightness in specific level. I watched the thread below from the oficial srv forum and i am not sure where exactly read/write registers of camera.
i found the address of I2C
I2C address map

I am using function I2CReadByte(deviceID,register) aforge
what is the valuse of camera ? deviceID = 0x21 according to map or 0x13 according to thread (admin answer) ? , the registers according to thread is 0x08,0x10 is that right ?

has anyone ever dealt with this?

thank you

Re: I2C camera registers / set brigthness manually

PostPosted: Wed Oct 16, 2013 1:15 am
by ntouros
Finally after a lot of tests ended in this deviceID = 0x21 and this register =0x10 has the ability to set the brightness in specific level. In my case the camera is Omnivision OV7725 VGA.

For this experiment i used I2CReadByte() everything works perfectly. But when i went to modify this register with my own brightness level in hex value with I2CWriteByte() the srv lost connection every time i try ?

any solution for this ?

thank yoou

Re: I2C camera registers / set brigthness manually

PostPosted: Wed Oct 16, 2013 2:31 am
by ntouros
i dont know why I2CWriteByte() doesnt work. I make an implementation using this function and works perfectly.

Here is the code :

//close the auto brightness
sendstr = StrToByteArray("va0");
//change value in register
byte[] sendstrir = new byte[5];
sendstrir[0] = (byte)0x69;//letter i
sendstrir[1] = (byte)0x77;//letter w
sendstrir[2] = (byte)0x21;//deviceID
sendstrir[3] = (byte)0x10;//register
sendstrir[4] = (byte)0x0;//value of brightness

thank you