Hi all !
I am struggling with a step that seems simple, but I may be missing something :
I just want the OV2640 to send me an image
Ok so first things first :
- I have both Mega 2560 and Due to work this out
- I have the OV2640 that comes with an inboard oscillator (12 mhz from what I gathered on the Googles) --> which means I don't have the XCLK pin that every Arducam has
What I have so far :
- I have been able to reach the I2C communication and read all the registers
- I have checked with the Datasheet (Here) that registers values were consistent with the standard "factory" values
And most important :
I was trying to know if the sync signals were actually being sent --> When I tried to digitalRead the HREF, VSYNC and DCLK (I think it's the same as PCLK ?), I get a serial plot that looks like a clock cycle, meaning the three of them come HIGH around the same time, and then all three LOW, and back HIGH again, etc. very fast. At that time my Serial was set at 115200 Bauds.
The only weird thing is that according to the datasheet the Vsync should come LOW, and then I should have HREF HIGH and finally PCLK HIGH --> That's the moment when the data is valid for a pixel.
So it looked to me as if I can read the syncronizing signals (my clock-looking serial plot), therefore I should be able to use them to read the pixel bytes and from there, build up until I get a workable image ?
So I've tried to digitalRead the D0 to D7 pins only when VSYNC LOW, HREF HIGH and PCLK HIGH but I never seem to get a workable reading, if any.
The thing I'm not understanding - and believe me I've searched for days now all over the place - is how am I supposed to sync my digital readings with the 12Mhz oscillator ? My Serial is max 2000000 Bauds so it's not like I can read the values real time, right ?
BTW I am doing all this because I couldn't make the Arducam library work for my module, I guess it's mainly because the XCLK is expected to be controlled... I don't know. Maybe I missed something and went the hard way for nothing... I hope not
I tried to go over the Arducam library code but there's an awful lot of things in there I don't yet understand.
My main goal is to have the Serial show be all the byte readings from a single frame (and then second step will be to process it to make an image).
Can anyone help me please ?
(Oh, before you send me back to google, please know I really made an effort to find the answers by myself :
Yes, I have tried to use the Arducam library, unfortunately it didn't work for this module.
Yes, I have seen a lot of documentation about using it with a ESP32 but I don't have one anyways
No, the other topics about OV2640 didn't help because unfortunately again, there never was a definite answer about how to handle this particular model of OV2640, how to get a frame reading, etc.
Yes I have tried to look at the documentation for other OmniVision modules but again, I couldn't find anything that helped me on the right path )
Thank you in advance for your wisdoms !