Go Down

Topic: High Frequency Speed digitalRead/Write (Arduino MEGA 2560) (Read 1 time) previous topic - next topic

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.

johnwasser

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.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

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.

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

ardufans

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 http://www.arducam.com/camera-modules/5mp-ov5642/

Mr_arduino

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 http://forum.arduino.cc/index.php?topic=159557.0

Go Up