High Frequency digitalRead and digitalWrite (Arduino MEGA 2560)

Hi,

I am trying to read one image in real-time with arduino, but the simple digitalRead is slow for this application.

So I would like to know how to use the directDigitalRead/Write at the arduino MEGA 2560.

Do I need some library for C or some archive imported ? How can I do this ?

Thank you

Reading a port:
incomingByte = PIND;
reads 8 bits from Port D.

Read up on direct port manipulation:

I am trying to read one image in real-time with arduino, but the simple digitalRead is slow for this application.

What does reading an image have to do with reading or writing to digital pins?

I am trying to read one image in real-time with arduino, but the simple digitalRead is slow for this application.

What is the Image source? It is probable that ther whole arduino is too slow. What do you plan to do with it once you have read it? There is only a tiny ammount of memory so the image can not be very high res.

luanferrari:
image
real-time
with arduino

That doesn't sound like a promising combination.