Hi.
My CCDC camera chip OV7670 is connected onto the I2C bus by mean a voltage
translator PCA9306, because DM644x has 1.8V level I/O, while OV7670 uses 2.8V.
Following Darius's suggestions I've tryed to read OV7670's internal registers
using this function:
static u8 reg_read(struct i2c_client *client, const u8 reg)
{
u8 i2c_buf[2];
i2c_buf[0] = reg;
i2c_master_send(client, i2c_buf, 1);
i2c_master_recv(client, i2c_buf, 1);
return i2c_buf[0];
}
Using the following convention:
"___" for 0V level
"xxx" for 1V level
"---" for 2.8V level
on the oscilloscope I always see:
SCL ---__--__--__--__--__--__--__--__--__--____________ ... ___________-------
SDA --_____----________________----____xxxx------------ ... ----------__------
i.e.
START 0 1 0 0 0 0 1 W X ... STOP
In other words, the i2c master (DM644x) puts only the I2C address (0x21) onto
the bus, and nothing more!
I suppose "xxx" it is due to a conflict condition on the SDA line, and this
conflict condition prevents the first i2c_master_send() call to be completed.
Otherwise, could the device be damaged?
Any comment will be appreciated.
Gabriele
_____________________________________________
Da: Gabriele Filosofi
Inviato: mercoledì 1 ottobre 2008 12.11
A: '[email protected]'
Oggetto: How to interface to OV7670
Hi,
I need to write a loadable module to drive a CCDC device OMNIVISION OV7670 on
the I2C bus.
I found a guy who came across a problem similar to mine:
http://article.gmane.org/gmane.comp.video.video4linux/38082
Also, he told to me that there is no support for multi-message for this device,
as confirmed by Omnivision technical guy, and that I must use 8bit I2C commands
to communicate with OV7670.
However, there are a lot of functions (i2c_transfer, i2c_master_send/recv,
i2c_smbus_write/read_byte) and I don't know which I should use.
In brief, I'm wondering if anybody knows how to access this device (or a
similar one) onto the I2C bus.
A code implementation example it would be greatly appreciated.
Thanks in advance,
Gabriele
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source