Skip to content

Instantly share code, notes, and snippets.

@taylanpince
Created December 20, 2014 21:05
Show Gist options
  • Save taylanpince/28e483c2dc81f99e95aa to your computer and use it in GitHub Desktop.
Save taylanpince/28e483c2dc81f99e95aa to your computer and use it in GitHub Desktop.
OV7670 Arduino UNO Simple Test
// OV7670+FIFO Simple Data Test
//
// OV7670 Arduino
// 3V3 3.3V
// GND GND
// SYNC 2
// D0-D7 6-13
//
void setup() {
pinMode(2, INPUT);
pinMode(13, INPUT);
pinMode(12, INPUT);
pinMode(11, INPUT);
pinMode(10, INPUT);
pinMode(9, INPUT);
pinMode(8, INPUT);
pinMode(7, INPUT);
pinMode(6, INPUT);
digitalWrite(2, LOW);
Serial.begin(9600);
Serial.println("Init");
}
void loop() {
int VSYN = digitalRead(2);
if (VSYN == 0) {
Serial.println("VSYN is LOW!");
int D0 = digitalRead(6);
int D2 = digitalRead(7);
int D4 = digitalRead(8);
int D6 = digitalRead(9);
int D1 = digitalRead(10);
int D3 = digitalRead(11);
int D5 = digitalRead(12);
int D7 = digitalRead(13);
Serial.println(D0);
Serial.print("\t");
Serial.print(D1);
Serial.print("\t");
Serial.print(D2);
Serial.print("\t");
Serial.print(D3);
Serial.print("\t");
Serial.print(D4);
Serial.print("\t");
Serial.print(D5);
Serial.print("\t");
Serial.print(D6);
Serial.print("\t");
Serial.print(D7);
Serial.println("\t");
}
}
@StoutRelic
Copy link

It repeatedly gives this output, What does it mean?
VSYN is LOW!
0
0 1 0 0 0 1 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment