ov7670-no-ram-arduino-uno icon indicating copy to clipboard operation
ov7670-no-ram-arduino-uno copied to clipboard

Black screen

Open Mr-Julien opened this issue 10 years ago • 27 comments

Hello, I succeed at uploading your program to my Arduino Uno using in the main.c #define useQqvga but when after I use your simpleFrameGrabber-master program with the bash qqvga, I end up with a black screen. Do you know what am I doing wrong ? Thank you a lot.

Sincerly

Mr-Julien avatar Apr 23 '15 16:04 Mr-Julien

What does the frame grabber print? Does the orange led blink fast?

Also I know this may sound like stating the obvious but make sure you remove the lens cap when using the OV7670. I am just saying this on the off chance that you forgot to remove it.

ComputerNerd avatar Apr 23 '15 20:04 ComputerNerd

The frame grabber print: 160 120 1 4101 0, and yes the orange led blink fast. My lens cap was removed but yes it could have been the reason of a black screen ! An idea of the problem ? Thank you for your concern.

Mr-Julien avatar Apr 24 '15 08:04 Mr-Julien

It is a connection problem. The orange LED should not be blinking. I make the LED blink when there is an i2c error. Make sure you have pullup resistors to 3.3v on SIO_C and SIO_D and try again. Also did you see that I forgot to add two connections? See my latest commit and more specifically the changes I have made to README.

ComputerNerd avatar Apr 24 '15 21:04 ComputerNerd

it is still not working, I think I did all of it correctly except that I converted 5V to 2.5V for XCLK, I will monday buy some new resistors to be able to be more accurate, Perhaps this is the reason of my problems. Here my wiring: http://oi60.tinypic.com/nb9mvl.jpg

Mr-Julien avatar Apr 25 '15 18:04 Mr-Julien

You need to wire both RESET and PWDN otherwise i2c will not work. Also you need to wire D0-D7 to get an image.

ComputerNerd avatar Apr 25 '15 22:04 ComputerNerd

Yes I wired everything, I just didn't do it on the image because it would have been unreadable. I wired on the image only the 3 pins that need a resistor because I wasn't sure I did it correctly. PS: the only pin that I didn't use, is the HREF pin because you don't refer to it in the README, should I use it ?

Mr-Julien avatar Apr 26 '15 07:04 Mr-Julien

No

ComputerNerd avatar Apr 26 '15 14:04 ComputerNerd

I wired everything, and used the appropriate resistors, but my led is still blinking and my screen still black. What am I doing wrong ? The only 2 pins that need pull up resistor are SIOC and SIOD ?

Mr-Julien avatar Apr 27 '15 16:04 Mr-Julien

Yes. Make sure that you are reading the latest version of the README file.

ComputerNerd avatar Apr 28 '15 00:04 ComputerNerd

I did, could it be an informatic mistake. Here what I do: I change in main.c #define useQqvga and change nothing else even in the makefile. Then ( I am on Ubuntu ): cd /home/.../ov7670-no-ram-arduino-uno-master make make disasm make stats make hex make writeflash make clean cd /home/.../simpleFrameGrabber-master bash build bash qqvga Am I doing something wrong ?

Mr-Julien avatar Apr 28 '15 09:04 Mr-Julien

I doubt that is the cause. It is your connections.

ComputerNerd avatar Apr 29 '15 01:04 ComputerNerd

I begin a fritzing file presenting the connection for ov7670-no-ram-arduino-uno, because i'm more software developper than electronicians and I think that i'm not alone in my case ^^, i juste have no time to finish it but maybe today. i will shared to you. I personaly destroy 3 ov7670 when trying to make it work ( I2C resitor too small or tension divider), i think this repository is the more able to make it work

simon0356 avatar Apr 29 '15 07:04 simon0356

Here my wiring: http://oi59.tinypic.com/2nai554.jpg What am I doing wrong ? If it's good, I may be destroyed the camera ? Anyway, if my wiring is good, feel free to use it as an example.

Mr-Julien avatar Apr 29 '15 17:04 Mr-Julien

What software did you use ?

simon0356 avatar Apr 29 '15 17:04 simon0356

For the drawing ? Proteus Isis For the camera I used Arduino-mk I think.

Mr-Julien avatar Apr 29 '15 18:04 Mr-Julien

It's something like Proteus Isis that i search , i don't success to get something good on Fritzing.

Anyway i think your wiring is good and correspond to updated readme Mr-Julien is there a way to get your mail ? i don't see the the informations on your profile and i don't want to post more comment that not correspond to the topic here

simon0356 avatar Apr 29 '15 19:04 simon0356

sure, if we can help each other : [email protected]

Mr-Julien avatar Apr 29 '15 20:04 Mr-Julien

I admit to doing a few foolish things regarding incorrect wiring that may lead one to suspect damage to the sensor however my OV7670 camera module still works. What am not sure about in regards to your schematic is the resistor divider. The reason for this is that there may be lots of noise. Please verify this with an oscilloscope before drawing a conclusions.

ComputerNerd avatar Apr 29 '15 21:04 ComputerNerd

I will use that kind of regulator for my next OV7670 : http://boutique.semageek.com/fr/251-powerpod-1117-3v3.html

simon0356 avatar Apr 30 '15 08:04 simon0356

I did some test, and my camera still works. If it still works and there is no wiring mistakes, it must be a programming issue. Any idea of what could it be ?

Mr-Julien avatar May 01 '15 16:05 Mr-Julien

How did you test ?

simon0356 avatar May 01 '15 16:05 simon0356

I applied a 10 MHz clock on XCLK and when PCLK is rising I sample D0-D7 and read it on the serial port, and it is seems to respond correctly. Here what I did: https://github.com/Mr-Julien/OV7670/blob/master/OV7670.ino Could you help me deal with SCCB ?

Mr-Julien avatar May 01 '15 16:05 Mr-Julien

I found out my mistake: http://i60.tinypic.com/cs4zb.jpg But know I have some thing like that: http://i61.tinypic.com/24ydcgi.png And I use the adapted color space and serial speed for qqvga, I don't understand...

Mr-Julien avatar May 08 '15 08:05 Mr-Julien

Do you know what I can do to improve the quality ?

Mr-Julien avatar May 11 '15 17:05 Mr-Julien

Mr-Julien, I try to test your code, you program run? how is the conection???

juan-negron avatar May 12 '15 00:05 juan-negron

@Mr-Julien - I am getting a similar green noisy image from the camera. Did you find the solution to this problem?

themathgeek13 avatar Jun 10 '15 12:06 themathgeek13

The reason of the black screen can also be the register 0x11 which controls the pixel clock divider. Your XCLK is 8MHz, but the with the divider you transform the pixel clock in lower frequency, because generating 8MHz clock and sampling data a 8MHz with the Arduino Uno while sending it via UART looks pretty impossible to me.

So I think you should try different values for the register 0x11 (actually @ComputerNerd has already implemented a loop that tries different values, you only have to uncomment it).

But still, I am using a digital analyzer and yet not able to change the clock divider via SCCB, I always see 8MHz clock at XCLK and 8MHz clock at PCLK where I expect 4MHz, 2MHz,...

Regards. Todor.

TodorGinchev avatar Aug 10 '15 07:08 TodorGinchev