View previous topic :: View next topic |
Author |
Message |
Kevin Burtness Guest
|
I2C Comm with Omnivision OV7910 CMOS Camera |
Posted: Sat Apr 13, 2002 2:06 pm |
|
|
I've got an application using a 16F877 as I2C master. I'm communicating with 5 slaves (4 Phillips EEPROM chips and an OV7910 CMOS Camera).
I can R/W to the EEPROM chips fine. I can only write to the OV7910 chip. I send commands to set registers in the OV7910. When I try reading the registers back, I only receive 0xFF.
I'm seeing variations in the video signal coming out of the OV7910, so I know its receiving the commands I'm sending it over I2C. I just can't verify register contents. I can verify that I receive the ACK back from the OV7910 as expected.
The code used to read from the OV7910 is below. Thanks!
registerReadVal = 0xFE;
// read register data from camera
i2c_start(); // Start i2c
If (i2c_write(0x80) !=0) returnstat = fail; //Address OV7910(W)
If (i2c_write(0x14) != 0) returnstat = fail; // Register #
If (i2c_write(0x81) == 0) // Address OV7910(R)
registerReadVal = i2c_read(0); // Read value
else returnstat = fail;
i2c_stop(); // Stop I2C
___________________________
This message was ported from CCS's old forum
Original Post ID: 3770 |
|
![](templates/subSilver/images/spacer.gif) |
Kevin Burtness Guest
|
Re: I2C Comm with Omnivision OV7910 CMOS Camera |
Posted: Sat Apr 13, 2002 2:23 pm |
|
|
I just figured it out. Here's my revised code. Thx.
// Send a write cmd to the selected register
i2c_start(); // Start i2c
If (i2c_write(0x80) !=0) returnstat = fail;
If (i2c_write(register_num) != 0) returnstat = fail;
i2c_stop();
// Delay after the stop
delay_ms(5);
// Perform a read. OV7910 keeps track of the last register
// writtten to
i2c_start();
If (i2c_write(0x81) == 0)
registerReadVal = i2c_read(0);
else returnstat = fail;
i2c_stop();
-------------------
:=I've got an application using a 16F877 as I2C master. I'm communicating with 5 slaves (4 Phillips EEPROM chips and an OV7910 CMOS Camera).
:=
:=I can R/W to the EEPROM chips fine. I can only write to the OV7910 chip. I send commands to set registers in the OV7910. When I try reading the registers back, I only receive 0xFF.
:=I'm seeing variations in the video signal coming out of the OV7910, so I know its receiving the commands I'm sending it over I2C. I just can't verify register contents. I can verify that I receive the ACK back from the OV7910 as expected.
:=
:=The code used to read from the OV7910 is below. Thanks!
:=
:=registerReadVal = 0xFE;
:=
:=// read register data from camera
:=i2c_start(); // Start i2c
:=If (i2c_write(0x80) !=0) returnstat = fail; //Address OV7910(W)
:=If (i2c_write(0x14) != 0) returnstat = fail; // Register #
:=If (i2c_write(0x81) == 0) // Address OV7910(R)
:= registerReadVal = i2c_read(0); // Read value
:=else returnstat = fail;
:=i2c_stop(); // Stop I2C
:=
___________________________
This message was ported from CCS's old forum
Original Post ID: 3771 |
|
![](templates/subSilver/images/spacer.gif) |
Andrew Cole acole#hmc.edu Guest
|
I2C problem with OmniVision CameraChip |
Posted: Tue Dec 09, 2003 6:20 pm |
|
|
I'm using the same code to communicate with the OmniVision OV2610AA camera, which uses, i believe, the same control interface. I was having the same problem with receiving 0xFF back from reads, but I wasn't checking the ACK bits. Now I realize I'm not getting ACK back from the camera. Any ideas? |
|
![](templates/subSilver/images/spacer.gif) |
|