Go Down

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

luanferrari

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. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

luanferrari

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. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up