Open abbanerjeersm opened 9 years ago
I've try with your code already. VGA (640 X 480) and bayer RGB. USART speed is 9600 Bps. I've set Arduino to capture only 1 snapshot. OV7670 can transfer data to Arduino properly BUT many data lost. Every time that I reset It show "RDY" in the serial monitor and followed by 1,920 bytes of data.
I forgot to comment some details. I use 2 of 10K resisters for I2C on both SIOC and SIOD as you mentioned in "Fritzing.org" project and 74LS shift level at XCLK to reduce from 5V to 3V.
@abbanerjeersm actually datarate is even less. 2Mbaud uses 10 bits per byte (1 start bit, 8 data bits and 1 stop bit), so actual rate is 2M / 10 = 200 KBps. But I suspect, that PCLK is not working at full 8 MHz. I think, but I haven't checked yet, that there is a divisor used and the PCLK is actually running at much lower speed.
Hi, I've arduino nano connected to ov7670. I've similar problem while reading frames using simpleFrameGrabber application.
.... I read "Frames per second = 0.007594" After some time I get a noisy image.Can anybody help me in this regard. Thanks,
Hi,
In your main.c, you poll PORT D2 for rising edge to collect the 8 bits of pixel data. This is your PCLK. This clock is running at 8 Mhz - so essentially you are producing 64 Mbits per second or 8 mega bytes per second. Your UART is 2 Mbps or 250 Kilo Bytes per second.
Everytime you push the data into UDR0 - it gets transmitted at a much slower pace. This should lead to some sort of missing bytes or data buffer overrun but I guess it dosent.
So in summary, given your PCLK produces roughly 1 byte at 8 Mhz rate, and your serial connection is 250 KB/s , why dosent this mismatch lead to failure of transmission ?
As your code works, obviously I am missing something. Can you please enlighten me ?