ComputerNerd / ov7670-no-ram-arduino-uno

Allows you to use a non fifo ov7670 on the arudino uno without external spi ram like other examples. Sends the data to UART.
236 stars 111 forks source link

Black screen #6

Open Mr-Julien opened 9 years ago

Mr-Julien commented 9 years ago

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

ComputerNerd commented 9 years ago

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.

Mr-Julien commented 9 years ago

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.

ComputerNerd commented 9 years ago

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.

Mr-Julien commented 9 years ago

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

ComputerNerd commented 9 years ago

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

Mr-Julien commented 9 years ago

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 ?

ComputerNerd commented 9 years ago

No

Mr-Julien commented 9 years ago

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 ?

ComputerNerd commented 9 years ago

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

Mr-Julien commented 9 years ago

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 ?

ComputerNerd commented 9 years ago

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

simon0356 commented 9 years ago

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

Mr-Julien commented 9 years ago

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.

simon0356 commented 9 years ago

What software did you use ?

Mr-Julien commented 9 years ago

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

simon0356 commented 9 years ago

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

Mr-Julien commented 9 years ago

sure, if we can help each other : julien.lebloa@gmail.com

ComputerNerd commented 9 years ago

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.

simon0356 commented 9 years ago

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

Mr-Julien commented 9 years ago

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 ?

simon0356 commented 9 years ago

How did you test ?

Mr-Julien commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

juan-negron commented 9 years ago

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

themathgeek13 commented 9 years ago

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

TodorGinchev commented 9 years ago

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.