camera

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
moro_1580446
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

Hi every body.I am using psoc5 lp prototype kit.I want to run camera with psoc5 and take a picture then save on sdcard.Could you help me to do it?

How can i run camera with usb interfacing with psoc5 usb port?is it possible?

please give me a sample code or any project to do it faster.

thank you for attention...

0 Likes
1 Solution

Unfortunately I did not find examples for PSoC. I'll have to create my own project.

A good article to begin with: Hacking the OV7670 camera module

I plan to start a project for PSoC5 in the near future.

I purchased a camera ov7670 without fifo. If there is a result, I will post the project here.

View solution in original post

27 Replies
moro_1580446
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

no one is there?

0 Likes

The PSoC can not be a USB device wizard

May be:

OV7670

or OV7670 + fifo

or OV7670 + UART

0 Likes

could you please help me to run and tack pic with ov7670?

could you give me a sample code plz?

0 Likes

Unfortunately I did not find examples for PSoC. I'll have to create my own project.

A good article to begin with: Hacking the OV7670 camera module

I plan to start a project for PSoC5 in the near future.

I purchased a camera ov7670 without fifo. If there is a result, I will post the project here.

Perhaps you will be interested in the project for OV9650:

https://github.com/monash-wsrn/psoc-camera-firmware

I try to do this target and i am waiting for your project too

Thank you for attention...

0 Likes
lock attach
Attachments are accessible only for community members.

I found another OV9650 component in the project Test.cyprj_.Archive02.zip

I2C for HMC5883L compass    by  tmahfuz1993_1434601

I attached it from the bottom (OV9650L.cycomp)

My project is very primitive so far:

Has CY8C5888LTI DCMI?is it important ability to use ov7670 in micro controller?

0 Likes

PSOC does not have a DCMI interface

0 Likes

I am very confusing for running camera with psoc5.Is there any body to help me step by step in pin configuration and code programing for this target?
I want to tack a picture then save on SD CARD....

thanks for attention...

0 Likes

I want to ask question.Is OV0706 camera module good for my target?

I think it is easier with my psoc5lp?

is it true?

0 Likes
lock attach
Attachments are accessible only for community members.

it seems the VC0706 has a Serial Interface output.

In this case, there should not be any problems.

Even PSoC is not needed - only UART and PC.

I also do not have experience with cameras. Therefore, I use the simplest method - recording a frame into memory.

For example, for 120x160 and 2 bytes / pixels: 120 * 160 * 2 = 38400 bytes or 19200 for 1 frame of black and white image.

So first  i need a camera with a resolution of 120x160.

I created a primitive project for the OV7670 without a buffer using other people's libraries, but it does not work correctly.

Settings: (120 x 160) YUV422 The project is attached.

ov7670.PNG

Thanks for answering .Can you give me your project with OV7670?

OV7670 is lowest cost in camera.I like to run it but c code programing for OV7670 is hard for me...

0 Likes

Are you interested in the code for the PC?

My code on LAbVIEW5.0 (or .exe) it works only for XP (WIN32)

as you can see in the picture it does not work correctly.

Now I'm trying to find a sample frame (160x120 b / w) for debugging my program.

Dear Pavlov no .I want to do this target with psoc5lp and then save pictures on sd card.so if your project is similar give me?

thank you for attention...

0 Likes

My goal: learn to tune the camera to 160X120 b / W, get 1 frame and send it to USBUART. It's all for now.

Therefore, my camera OV7670 without UART and memory buffer.

Do you already have a camera?

What interface does it have: UART or how in my project?

p.s.

It seems we are missing a person who knows how to work with the camera ...

lock attach
Attachments are accessible only for community members.

At the moment I was able to get an image of 160x120 (QQVGA YUV422 b / w only) and send it to PC (UART) on request.

I created a simple program (XP,WIN7 32 only) for connecting PSoC and PC and viewing the image.

I do not know how to configure the camera settings yet.

I hope this helps someone in the beginning.OV7670_.png

In PSoC5LP memory, the frame array is 120x160 x 2 bytes (YUV422), so it makes sense to modify the PC program to display the color of the picture. The project for PSoC is practically unchanged.

The project is here (Russian).

The project archive and the .exe file (WIN32): OV7670_YUV_UART.zip
yuv422.png

Hi dear Evgeniy Pavlov.Thank you for your project.It seems very good.but above link of project Russion language can you give me explanation of project in english language?

Are you used OV7670 without FIFO? and can you explain to me when a camera tack a picture?it seems quality of picture is has not high quality.

best regards....

0 Likes

Yes, the camera does not have a FIFO and it's very bad.

If you have not bought a camera, then I advise you to purchase a camera with FIFO.

I'm using CY8CKIT-059 PSoC 5LP. The amount of memory will save the frame no more than 64 kB.

It is not more than 160x120x2 bytes for YUV422. You see it in the picture.

How does my project work:

at the beginning the camera must be set to allow QQVGA and YUV422 (#define useQqvga)

The frame rate is also reduced with the settings of the registers.

I used preconfigured settings from several sites.

I used 2 flags and 2 interrupts to write a frame to the PSoC memory buffer:

The buffer size is 160 * 120 * 2 = 38400 bytes. (myImage [38400])

isr_V - exposes the flag "ready" - a sign of data readiness. and zeroes the pixel counter.

The pixel counter counts the pulses (HS & PCLK) until the next zeroing (isr_V)

isr_Pixel - writes the pixel data to the corresponding cell of the buffer myImage [38400]

main.c checks the ready flag, blocks reception of new data (collect flag = 0;) and sends data to the PC with fragments of 64 bytes.

When the data is sent, the PSoC waits for the command from the PC.

Any array of data received via USBUART causes such actions:

-flag "collect" is set to 1 - enable read data from the buffer.

- the array data is written to camera registers:

     even elements - register address

    odd elements - the data to be written to this register.

The PC program must convert the received one-dimensional array myImage [38400] to a picture of 160x120pixels in YUV422 color format.

Anonymous
Not applicable

Hello Evgeniy Pavlov,

i tried to download the project and ran it on Windows 7 x32 VM. When I connect my psoc and program everything is fine. I ran the .exe program and it gives me a green color on the COM i’m using when I start the program. But I can’t see the image. What can be wrong? The hardware connection is similar to the one you provided, I just added resistors for the Xclk and of course I2C. What I am missing?

thank you in advance,

0 Likes

Simple test:

1. Connect any COM port monitor. I'm using Hercules Setup Utility

2. Send any symbol to the PSoC - this is a frame send signal.

3. you should see a stream of bytes.

Is VM a virtual machine? I had problems with USB ports

0 Likes
Anonymous
Not applicable

Hi

Yes VM is Virtual Machine.

I tried what you said I sent a symbol using Hercules and I did receive it back this is an image of what I did.

pastedImage_0.png

0 Likes

it seems this echo

Create a simple PSoC USBUART project that sends bytes to the UART and make sure it works

0 Likes
Anonymous
Not applicable

Hey Evygsniy Pvlov,

after several trials I couldn’t use USBUART on Windows 7 Virtual machine.

but I was able to perfectly use it on my Windows 10, is there a way to read the image in Windows 10?

0 Likes

YOU will have to redesign the project to one of the Grabbers:

JAVA_FrameGrabber

OV7670 Grabber USB V1.5c

or other

0 Likes
Anonymous
Not applicable

Thank you so much, the reference is very helpful

0 Likes