1
\$\begingroup\$

I am having trouble interfacing a VC0706 Camera with only an AVR Microcontroller. I am using simple serial communication but the camera does not respond. I tried connecting it with a computer but still no response from the camera.

Moreover I am having difficulty in understanding the following:

  1. In What format will my image be stored in the MCU.
  2. Will ATMEGA32 be sufficient to store one image taken from the camera.
\$\endgroup\$
1
\$\begingroup\$

Usualy, the connetion in serial problems are due to difference in speed communication, CRC, odd or even parity, etc. So check if the configuration are the same.

No, I don't think you can store one image in the SRAM of the microcontroler. If the image resolution is 640x480, then you will need at least 640*480=307200=307kb to store a black and white image. It is larger than the SRAM of the microcontroler (2kb).

I is also a large memory for a single microcontroler, then you'll need to add an external RAM, as large as the microcontroller's pins allow addressing.

Hope I could help you.

\$\endgroup\$
  • \$\begingroup\$ My camera is 160*140 I think. very low resolution. \$\endgroup\$ – White Death Nov 22 '13 at 9:13
  • \$\begingroup\$ Well, if it is 160*140=22400=22kb, it is still larger than the SRAM memory of the microcontroller. Remember that the same memory is used for variables, so you'll need an external RAM. \$\endgroup\$ – Chirry Nov 22 '13 at 18:02
  • \$\begingroup\$ Are you sure about that resolution? I will suggest 160x120 is more likely \$\endgroup\$ – JockM Nov 24 '13 at 15:48
1
\$\begingroup\$

SPI/UART interfaces are only for controlling VC0706 . You should read digital video from CCIR656 output channel(8/16 databits, 1/2 frame syncs, pixel clock etc), you can convert to analog video using any video encoder like ADV7171.

The block diagram says it is not having internal image sensor, you should interface an external image sensor to it again through CCIR656 interface or analog input to video decoder like ADV7184 and then digital input video to it's inputs..

enter image description here

\$\endgroup\$
  • \$\begingroup\$ No, I just to capture a single frame using the camera. I don't want video. \$\endgroup\$ – White Death Nov 22 '13 at 9:12
  • \$\begingroup\$ still same...video is sequence of frames....please post block diagram of your interface....which image sensor you are using...any ruff sketch.... \$\endgroup\$ – user19579 Nov 22 '13 at 10:33
  • \$\begingroup\$ While the VC0706 supports CCIR656 most (all the ones I have seen for example) do not expose the needed pins. So you would have to do some tricky soldering onto a tqfp-144 to get access to them. \$\endgroup\$ – JockM Nov 24 '13 at 5:54
0
\$\begingroup\$

The image will be streamed over serial to your MCU as a JPEG image. And an ATmega32 (like the ATmega328p in the Arduino) only has 2K of SRAM, nowhere near enough to hold even a QQVGA (160x120) image.

With some savvy coding you might be able to decode the image on the fly if you are looking just for specific pixels, but since JPEGs are stored in "ZigZag" order it will be tricky.

Most people just stream the image directly to SD and don't analyze the image. Cameras such as the OV7670 are better suited to direct access by the microcontroller, but the image will still be too large to store in memory.

Even an ATmega1284p which has a whopping 16K of SRAM could only hold a QQQVGA (80x60 565RGB) image.

If you are looking to process images in memory, I would recommend looking at beefier microcontrollers, like the xmega384 (32K), the pic32 (up to 128K), or ARM microcontrollers (up to 262K IIRC). One option to consider is the Arduino Due which has an ARM Cortex-M3 MCU and 96K of ram which is enough for a 320x240 greyscale (or indexed color) image.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.