-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datarate #10
Comments
I've try with your code already. |
I forgot to comment some details. |
@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. |
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 ?
The text was updated successfully, but these errors were encountered: