High Frequency Speed digitalRead/Write (Arduino MEGA 2560)

Hi,

I am trying to read/write one image from OV7670 (640x480) at 30 fps. So I need read pixel/pixel in (~10MHZ).
I would like to know, how can I do this in Arduino MEGA 2560, cause the structure digitalRead/Write is very slow for this application.

I know the clock in Arduino MEGA 2560 is 16 MHz, so I need help to know how to use this in best performance.

Thank you.

You can use SPI on any 16 MHz Arduino to transfer data at about 8 megabits per second. I doubt the Arduino will be able to do much with data arriving that quickly.

640*480 = 307,200 pixels.
Is it 1 bit/pixel? Or 8?
Say 8, just for B/W data.
You can't store/buffer 1 frame's worth of data without extra hardware.
1 frame then takes at least 2,457,600 bits of data to come in.

http://www.voti.nl/docs/OV7670.pdf

I would say 8 bit processor at 16 MHz is really underpowered for this device.

I am using ov7670 + al422b , so it's not a problem to capture and save in the camera. The problem is the speed to read at the arduino board.

Do you have a spec? Idon't know what the interface is to the AL422B.

I was some other hits on "ov7670 arduino" when I googled earlier. Basic amount of data to read & write out? to what? would seem to preclude 30 fps with 16 MHz uC tho.

Hi Guys,
Why use OV7670, it outputs uncompressed image, that is really to large for Arduino to handle.
You can try other image sensors from Omnivision like OV2640, OV3640 ,OV5642 which can output compressed JPEG image. And the output data is really small than OV7670.
You can take a look at OV5642 camera module sample pictures from 5MP: OV5642 - Arducam

It is possible to capture data from the ov7670 enspecially if you have the one with the fifo or as ardufans said get an arducam. However I have gotten the ov7670 to work without a fifo see OV7670 with both arduino uno and now mega - Sensors - Arduino Forum