Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430FR5994: Example code for interacting OV7670 without FIFO

Part Number: MSP430FR5994
Other Parts Discussed in Thread: MSP430G2452,

Tool/software: Code Composer Studio

Hi,

I am using the MSP430FR5994 launch pad and want to use the camera OV7670 without FIFO to capture an image. I only found a post that shows how to interacting with OV7676-FIFO in an MSP430G2452.

https://www.rpg.fi/desaster/blog/ov7670-fifo-msp430-launchpad.html

It uses an OV7670 with FIFO. Also, it mentions the author tried OV7670 without FIFO but in a powerful LPC1769 microcontroller(running at 120Mhz). 

I also noticed a paper that mentions they used MSP430 with OV7670 by using MSP430's DMA. "The WISPCam takes advantage of an onboard microcontroller with 65KB of non-volatile low-power high-speed memory (FRAM) to capture the images via DMA at 48Mbps while consuming low-power." But the paper does not mention if their OV7670 has FIFO or not. 

https://www.researchgate.net/publication/283464051_Self-Localizing_Battery-Free_Cameras

I am wondering if MSP430 is able to interact with OV7670 without FIFO (for image taking).

Thanks,

Yubo

  • Hi Yubo,

    The MSP430FR5994 runs at lower frequencies and isn't designed to capture and process camera data.  I would propose that you consider a device which is designed for image processing applications such as TI's Sitara processors:

    http://www.ti.com/tool/TIDEP0018?keyMatch=SITARA%20CAMERA&tisearch=Search-EN-everything

    BR,
    Leo

  • Hi Leo,

    There are tutorials about using Arduino to read images from OV7670 without FIFO. I am wondering since Arduino can do this job, MSP430 should also be able to do it, right? isn't MSP430 more powerful than Arduino? 

    https://www.amazon.com/Beginning-Arduino-ov7670-Camera-Development/dp/1512357987

    https://www.instructables.com/id/OV7670-Arduino-Camera-Sensor-Module-Framecapture-T/

    Thanks,

    Yubo

  • Hi Yubo,

    I've talked to a colleague that has implemented something similar but with a slightly different camera module(TCM8230MD) with an MSP. He was only able to get 15 frames per second at a resolution of 320X240 in black and white working reliably. What is your resolution and framerate requirement?

    BR,
    Leo

  • Hi Leo,

    My requirement is very low. I only need to use it to sample an image perhaps every few seconds, so it would be 1 frame per few seconds (maybe 2s, 5s, etc.). I do not use it for video streaming. 

    Do you have any colleague who has implemented OV7670(without FIFO) with MSP430? if you can find one then it would be great so I can use his/her project code, or as least I can use it to build my own.

    Currently, I only found one tutorial which implements OV7670(without FIFO) with Arduino. What is your opinion about transfer the Arduino-based project into MSP one? do you think if it is possible?

    Thanks,

    Yubo

  • Hi Yubo,

    I've sent you a friend request so I can put you in contact with someone.

    BR,

    Leo

  • Hi Leo,

    Thanks. I accepted the request.

    BR,

    Yubo

  • Hi Yubo;

    Sorry for the late reply.

    I don't have the datasheet of OV7670 and never used one before. But I will try to answer based on my previously experience.

    General speaking:

    1. if the OV7670 has a frame buffer inside, then you should be able to read a frame of data from it at your own pace. but make sure to freeze the camera during the reading.

    2. if it does not has a frame buffer. Then you will have to read line by line, assume it has line buffer or pixel FIFO. That means the MSP430 has to read faster than pixels clock plus the horizontal blank period. If the horizontal blank is adjustable, usually you can do that by I2C or SPI interface, make it longer. Then you will have enough time to read the whole line before a new line comes. 

    Good luck!

    Wen Li

  • Hi Wen,

    Got it. Thanks for the explanation. I will try it.

    Best,

    Yubo

  • Hi Wen,

    I am now using the OV7670 with the FIFO version. As you mentioned, "if the OV7670 has a frame buffer inside, then you should be able to read a frame of data from it at your own pace", I assume that after the image is taken and saved into the butter, I would need to give a clock to the buffer and read the image out. 

    I am planning to use the DMA to read data out of the camera buffer. My understanding is that in order to make sure the DMA reads out the data from the camera's data ports (D0/D1/.../D7) properly at each cycle of the clock that we give to the camera buffer, we need to trigger the DMA with the same clock. 

    I know we can use some dedicated pins to source MCLK/SMCLK out to a peripheral. So, we can use that to source the MCLK or SMCLK to the camera buffer. However, I looked at the DMA trigger options on the MSP430FR5994 datasheet, table 6-11 DMA Trigger Assignments does not show there is an option that I can use MCLK or SMCLK as the trigger for DMA. 

    My questions are: (1) if I want to use DMA, how to source the camera buffer a clock and use that clock to trigger DMA at the same time? or there is another way I can use the DMA to read the image out properly? (2) if there is no solution for DMA, what other options I have to read the image out from the camera buffer?

    Thanks,

    Yubo

**Attention** This is a public forum