Does OV7670 really support GRB4:2:2?

kdharbert

Well-known member
I have an OV7670 working at a basic level with a T4.1, where I can store the frame in an add-on RAM unit and forward it to a PC via ethernet. The camera documentation says GRB4:2:2 is supported but I don't see any configuration registers supporting it. Is it enabled by an undocumented combination of other registers?

I have a very specific application requiring an 8 color image...ie RGB111. It lets me use only 3 of the 8 data lines and lets me pipe them to timers that will run-length encode the data easily by capturing the transitions. If the data arrives in two byte sequences, this will not work, so only GRB 4:2:2 and YUV 4:2:2 can be used this way.
 
I am not sure looking at one of their documents I see:
1726521236327.png

But I don't see much more.
 
I am not sure looking at one of their documents I see:
View attachment 35797
But I don't see much more.

Can you share where you got your doc? The one I'm using doesn't have that table. Also, the register documentation I'm using shows the COM15 config of x0 listed as 'Normal RGB'...? Further, the pixel data output cells in the table don't seem to describing YUV4:2:2 or RGB4:2:2...does the text make any sense to you?
 
I've got the camera running now and I'm hitting something you may be familiar with. I’m viewing RGB565 output of an 8 color vertical test pattern with an oscilloscope and the output only sort of makes sense. I can see the pins change state on the test pattern boundaries, but the output is not as expected.

For RGB 565, each pin will hit two of the 16 bits for each pixel. For the test pattern, each pixel should have all 1’s or all 0’s for the R G and B components. The bits will land on R, G and B as follows:
0-3 \ 8-10 -> GB
4-5 \ 11-12 -> RB
5-7 \ 13-15 -> RG
This means that each pin should show one of three behaviors: As the camera scans horizontally, each pin should show: high for white (All), low for black (none), high for one of turquoise (GB), yellow (RG) or magenta (RB) (both), low for one of the primaries R, G or B(neither), and fluctuating for the others (one of two). This is not what I see. Unless I'm not getting all this right, it seems like there has to be funny setting biting me in the butt, but I'm working off of defaults ...?

My goal is to output GRB 4:2:2 and YUV 4:2:2…but its doing strange things as well, so I’m debugging in the more common RGB565 format to figure out what’s going on. In these modes, there is no byte alternation, so I should not see fluctuating values…but I still do.
 
Back
Top