Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

OV7670 configuration problems

Status
Not open for further replies.

mindthomas

Member level 4
Joined
Mar 2, 2007
Messages
75
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Location
Denmark
Activity points
1,855
Hi there.
This weekend I started working on a new project including the OV7670 camera module.
I have been searching the internet and found different source code examples - both for AVR and for STM32.
In this project I am going to use the STM32 so it was great that a source was already available.

I have now hooked everything up to the STM32, made nessecary changes to the code to match the pins, and uploaded it. It didn't work though :(
On the LCD I just have yellow garbage as you can see in the image below.
Yellow_Screen.jpg


The OV7670 is connected to an AL422B FIFO chip, which is then connected to the STM32 for reading.
The schematic of this circuit can be seen here:



The camera module seems to work fine, as both PCLK, VSYNC and HREF (HSYNC) is correct in timing.
I have attached some images of the different signal lines.

PCLK Line
PCLK.bmp


VSYNC
VSYNC.bmp


HREF (top) + PCLK (bottom)
HREF(top)_PCLK(bottom).bmp


My current source code can be downloaded here: https://www.tkjelectronics.dk/uploads/OV7670_Display.zip

I think the problem lies in the configuration. The configuration bytes are probably all OK, but then maybe there is a problem in the communication part (writing bytes via SCCB).
I hope some of you have an clue of the problem.

Thank you

Best Regards
Thomas Jespersen
 

Go for a search on eBay for "OV7670".
Fx **broken link removed**, which has FIFO onboard.
 

Hello Thomas

I have been planning to use the ov7670 with STM32F4 and was looking in for some reference source while I found your thread.
I took the liberty to download your code from the link you provided and have adapted it to be used with gcc and gcc makefile in a Linux environment.
This is going well for the moment even though I haven't reach goal yet, started yesterday, but I just wondered if you ever solved your problem above and if your reference code linked above is more or less outdated...

A few minor itches and compiler complains though. When you include header files, make sure to use same upper/lower-case in include prep. as in the real filename. Else they will not be found in a NIX environment which sees them as two different files. I know M$ don't care, but its good to be consequent .

By the way, which device did you use?

breg
 
Last edited:

Hello Thomas

I have been planning to use the ov7670 with STM32F4 and was looking in for some reference source while I found your thread.
I took the liberty to download your code from the link you provided and have adapted it to be used with gcc and gcc makefile in a Linux environment.
This is going well for the moment even though I haven't reach goal yet, started yesterday, but I just wondered if you ever solved your problem above and if your reference code linked above is more or less outdated...

A few minor itches and compiler complains though. When you include header files, make sure to use same upper/lower-case in include prep. as in the real filename. Else they will not be found in a NIX environment which sees them as two different files. I know M$ don't care, but its good to be consequent .


breg
Hi Breg.

No I didn't get it to work and had some higher priority projects that I had to deal with first.
But we will soon be getting an existing OV7670 module WITH on board FIFO, so I will be able to test that with the code and confirm if it works - and thereby conclude that the problem relied in our FIFO PCB.

I will let you know if I remember ;-)

Or please let me know if you find any mistakes in the software which makes your camera work.

Ps. Regarding the code overview, includes etc. the uploaded code were only a quickly made mock-up of a library.

Best Regards
Thomas Jespersen
 

Hi

Thank for your quick response, fared that since the thread was a year old you would be long gone from this topic..
I have ordered my camera and will use STM32F4_discovery as base which mean I will have to rewrite quite som bits and bytes before having anything up'n running. But I will post here if I get some good result.

small note: In main.c I added the following to avoid warnings from line6 since compiler could not find LCD_Text

Code:
#include "SSD2119_api.h"

// Local declarations
void RefreshImage(void);
 

In this project I am going to use the STM32 so it was great that a source was already available.

One question, the ov7670 + fifo source/library. Is this also a part of available source somewhere, and if yes, where did you get it from. Is it ST that provide this?

Breg
Vidar
 

Hello,

Any progress on this project? I am also using OV7670 camera module with custom built board using STM32F4. I have not yet captured a good image, but I think I am close. The main stumbling block is lack of good data sheet, there seems to be many undocumented registers that needs to be set up the camera properly.

More info about the project is here
https://sites.google.com/site/negtronics/vision-module

Cheers
brijehs
 

Hi

I just started with this short time ago and have not even got the camera modules yet which I ordered through ebay. For the moment I have been working on a graphics interface driver routine that will work with the display used in atmels "Display Xplained". My project does not have great requirements regarding performance so I will in the beginning start using the camera without a fifo.

breg
Vidar

EDIT: Wort to mention is this Linux driver for ov7670: http://tomoyo.sourceforge.jp/cgi-bin/lxr/source/drivers/media/video/ov7670.c
 
Last edited:

Hi
thanx o' Big Dog, for the datasheet.

I have been asking OVT for this and I got an really suspicious email in response, "Where did you get this device, who sold it to you, this is an discontinued product and it should not have been available. In which country do you live(!)"... and so on. Needless to say I never got the data-sheet. I replied and explained that I bought it from a supplier on ebay and if they wanted me to not redistribute the data-sheet I would keep it private, i.e. like an NDA. But, I have never got any response from OVT since ;) I'am waiting for them to come knocking on my door...

Well well, I like living life on the edge

Breg
Vidar (Z)
 

Hi i have same problem
If you solved, could you please let me know?
 

Hi i have same problem
If you solved, could you please let me know?

Hi there

I decided to write my own routines since I want to have fully controll with the camera regarding my own projects requirements. And NO... I have not finished them. I have had a year with very little time for own projects, but it is not forgotten.


I got the HW designed and produced though, and this is based around a stm32f4 device. Have had troubles configuring the built in i2c driver to talk sscb and eventually found that it is not possible to use it that way, so i must create my own driver here as well. This is my next project
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top