I´m working on my OV7670 camera interface and I have some issues with the color/image settings. I use the color bar settings of the sensor to check my logic and the color bar looks good:
But I´m unsure if the order of the colors is correct because I have green and red swapped in the camera image. It doesn´t make any sense to me that the color bar from the camera has the correct order, but the camera image has green and red swapped.
Also, the camera image contains a black bar on the left side of the image (live image only); check the photo. I have checked the data with a logic analyzer and it seems that the camera transmits some black pixels at the beginning of the frame (see the signals OV7670_D_Out
and OV7670_HREF_Out
, which are the input signals from the camera):
I use the following settings for the image sensor (the first byte of an element is the register address and the second is the register value):
static uint8_t OV7670_Config[][2] =
{
{0x11, 0x01},
{0x0C, 0x00},
{0x12, 0x04},
{0x3E, 0x00},
{0x40, 0xD0},
{0x70, 0x3A},
{0x71, 0x35},
{0x72, 0x11},
{0x73, 0xF0},
{0xA2, 0x02},
};
Am I using the wrong configuration for the sensor? Where does the black bar in the live image and the red/green swap in the live image come from?