Page 1 of 1

Timing problems of main loop

PostPosted: Mon Jul 14, 2008 7:45 am
by jackchung
As you said, because of the same clock source of the main microcontroller and the camera, we know that RB port will change value after 6 clock cycles. I read datasheet of the OV6620, 1 pclk just last 56 nns so how can you keep up with this fast data streaming. In the main loop you need 16 clock cycles to receive one pixel block and skip one pixel block. However in that amount of time, there might be 16 pixel was sent from camera because 1 pclk is equal with one machine cycle of the microcontroller. Can you explain more clearly about this calculation ? and why is your resolution is 88x144 but not 176x144, is it due to the skip of 1 pixel block in the main loop?

Re: Timing problems of main loop

PostPosted: Thu Jul 17, 2008 8:59 pm
by johno
Your calculation isn't quite right. The AVRcam uses the OV6620 in 16-bit mode, not 8-bit mode (in other words, both the "Y" port and the "UV" port are both actively producing pixel data), AND it uses the camera's QCIF mode (176 x 144) which drops the pixel rate in half. Thus the pixel clock timing is 224 nS per pixel not 56 nS. This basically equates to four clock cycles per 16-bit pixel pair provided on the Y/UV busses.

Yes, every other pixel block is skipped (in order to perform the necessary image processing tasks), which is why the resolution of the AVRcam is 88 x 144 instead of 176 x 144.