Page 1 of 3
ESP input ports?
Posted:
Fri Jul 24, 2015 1:44 am
by anvoice
I'm trying to set up an ESP8266-12 to read pixel data directly from a camera module (OV7670). The data must be taken directly from 8 data pins during a high state of a clock cycle, which means I'll need to sample all 8 pins rapidly to keep up with the 8MHz pixel clock. I'm not a usual read operation (either using native ESP8266 or the arduino ide) can provide enough speed.
The arduino for example has some ports registers which can read several input pins at the same time for much quicker access (e.g. PORTD can be used to read 8 pins at once), which seems to be exactly what's needed, but I can't find any information if ESP has a similar capability. Is there a port mapping for the ESP, or perhaps another way to read several pins rapidly?
Re: ESP input ports?
Posted:
Fri Jul 24, 2015 3:51 am
by kolban
I'm not an electronics guy, but I suspect we want to study the AL422 Integrated Circuit in conjunction with the camera module. If I am understanding this correctly, the AL422 can buffer a frame from the camera and hold that frame and feed it into an MCU at a slower clock rate than that needed to receive the buffer in the first place.
So for example, if the camera is generating 30fps, we can instruct the AL422 to "grab a frame" at full speed and then we can stream it into the ESP8266 at a rate that the ESP8266 can control. This means that we won't be grabbing 30fps but we will be grabbing at a rate that is achievable.
I too have this camera module and would be interested in collaborating as part of a community/team to get something going with the ESP8266. Send a personal message if interested in starting a sub-team.
Neil
Re: ESP input ports?
Posted:
Fri Jul 24, 2015 5:35 am
by tytower
Count me in I want to set up a security camera based on PIR so I'll be in it .No PM needed for me I'll be able to help if I can and will watch the thread
Re: ESP input ports?
Posted:
Fri Jul 24, 2015 8:42 pm
by anvoice
The camera I have has no FIFO buffer, which means it can't send the frame data directly: it must be grabbed in real-time from the 8 data pins on the module. For modules with FIFO, this questions is not as relevant since they are easier to interface. I was also hoping to use the ESP to send the data directly to a computer, thus bypassing the need for a separate MCU.
Without the FIFO, the biggest question is whether the ESP has a way of grabbing all the 8 bits during the PCLK high, which amounts to sampling 8 pins every 1/16 millionths of a second, at least for VGA resolution. I don't know if that is something ESP is capable of, and I'm guessing a typical digital read is not the best answer. I'll hook it up to an oscilloscope and try to see if the speed of read is good enough for this task, but a dedicated port register (if the ESP had one) could be a better answer.