OV7670 with both arduino uno and now mega

Mr_arduino:
The connections are simple. Start by plugging in SIO_C to A5 and SIO_D to A4 since this is i2c/twi you must have a 4k7 resistor 10k also works. Make sure you have the resistor to pull up 3.3v not 5v. Also edit twi.c in the arduino ide folder/libraries/Wire/utility search for these lines and comment them out or remove them

 // activate internal pullups for twi.

digitalWrite(SDA, 1);
  digitalWrite(SCL, 1);


This is to remove the internel pullup resistor by not removing these 2 lines you could cause damage to the sensor. Then plug d7 to digital pin 7 d6 to 6 d5 to 5 d4 to 4 d3 to A3 d2 to A2 d1 to A1 and d0 to A0 now plug in VSYNC to digital pin 3 and PCLK to pin 2. Now change the fuse bits to be exacly the same except enable the CLKOUT pin. This will output a clock run this through a buffer or level shifter to 3.3v if you do not get the 5v signal down to 3.3v it could damage the sensor. The sd card and spi ram is just standard spi wiring nothing special.

Hi, this is the closest thing I have found to a real library for this module, besides the over-priced arduCam shield/library, so kudos to you first of all.

I am using a Sainsmart 3.2" TFT that depends on the UFTF and UTouch libraries to work. I use TinyFat to store to SD. I am using a mega board, and I'm looking thru your code to see if I need to change any pin definitions, as the only pins available to me are A0 thru A7 and the i2C bus and a few other digital pins, some with PWM. The shield uses the rest. Plus I'm having a few errors getting main.c, ov7670.h and ov7570.c to compile. I know no other way so I have all 3 source files tabbed out in the Arduino IDE. I get an error about an undefined wrReg, which I see is a function and IS prototyped in ov7670.h.

Can you explain what changes to code I may need to make for the mega boards, and why I"m getting the compile error. I also have NO idea how to use the frame grabber.

Also, a keyword.txt file would be most useful for the library. And one more question .. I read that the library sets up the camera and grabs frames saving them to SD card (I'll have to use TinyFat somehow, not sure how) but are there functions in the library to output to a TFT screen? If not, how do you suggest going about displaying on a screen, or would it be faster to send the data over bluetooth to the Processing IDE.

Sorry if these are noob questions but a lot of these methods are new to me, as so far I've only worked with single .ino files.