How to capture VGA (640×480) frames with RGB565 format from OV7670+FIFO (AL422B)

camerafifo

I made a platform with LPC1788 (Cortex M3) which had external 8MB NOR flash and external 32MB (16bit) SDRAM. I connected them a CF7670C-V3 (OV7670+AL422B (FIFO)) camera module and I capture QVGA,QQVGA frames in RGB565 format to FIFO and then I save images data to SDRAM perfectly. also I wrote a software on PC and save image data via USART and then show that. I have a big problem with VGA(640×480) resolution. At VGA resolution with RGB565 format, All the time I have picture ,like a on "OV7670 frames are 640×308 not 640×480" post. I search about a Algorithm that I capture a whole color VGA(640×480) frame data in the SDRAM. What can I do?
How can I control FIFO_WEN and FIFO_RRST signals to get image data and save in to the SDRAM?

CF7670C-V3 Schematic link

Best Answer

I often wonder why people don't read the datasheet. You will find that the al422 has 384kb of ram (384*1024)<(640*480*2). You need to get the module to output raw bayer data so that (384*1024)>(640*480) and use a demosaicing algorithm to get a full color image. You have plenty of ram and a fast processor to do such.