complete ov7670

Dependencies:   BufferedSerial

Files at this revision

API Documentation at this revision

Comitter:
kangmingyo
Date:
Tue Aug 13 07:51:37 2019 +0000
Parent:
5:53dd2abce6b3
Child:
7:152fba230106
Commit message:
version3;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
ov7670.h Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Aug 13 07:38:19 2019 +0000
+++ b/main.cpp	Tue Aug 13 07:51:37 2019 +0000
@@ -46,7 +46,7 @@
 
 #ifdef QQVGA
 //    camera.InitQQVGA565(true,false) ;
-    camera.InitQVGAYUV(false,false);
+    camera.InitQQVGAYUV(false,false);
 
 #else 
     //camera.InitQVGA565(true,false) ;
--- a/ov7670.h	Tue Aug 13 07:38:19 2019 +0000
+++ b/ov7670.h	Tue Aug 13 07:51:37 2019 +0000
@@ -205,7 +205,7 @@
 
         WriteReg(0xb0,0x84);
     }
-    void  InitQVGAYUV(bool flipv,bool fliph)
+    void  InitQQVGAYUV(bool flipv,bool fliph)
     { 
         WriteReg(0x11,0x01);
         WriteReg(REG_COM7, 0x00);           // YUV
@@ -217,19 +217,18 @@
         WriteReg(0x3D, 0x40);//COM13
         WriteReg(REG_COM15, 0xC0);
         WriteReg(REG_TSLB,0x0C);
-         WriteReg(REG_COM14, 0x1a);          // divide by 4
+        WriteReg(REG_COM14, 0x1a);          // divide by 4
         WriteReg(0x72, 0x22);               // downsample by 4
         WriteReg(0x73, 0xf2);               // divide by 4
-        WriteReg(REG_HREF, 0xa4);
-        WriteReg(REG_HSTART, 0x16);
-        WriteReg(REG_HSTOP, 0x04);
-        WriteReg(REG_VREF, 0x0a);   
-        WriteReg(REG_VSTART, 0x02);
-        WriteReg(REG_VSTOP, 0x7a); 
+//        WriteReg(REG_HREF, 0xa4);
+//        WriteReg(REG_HSTART, 0x16);
+//        WriteReg(REG_HSTOP, 0x04);
+//        WriteReg(REG_VREF, 0x0a);   
+//        WriteReg(REG_VSTART, 0x02);
+//        WriteReg(REG_VSTOP, 0x7a); 
         WriteReg(0x70,0x3A);
         WriteReg(0x71,0x35);
-        WriteReg(0x72,0x22);
-        WriteReg(0x73,0xF2);
+
         WriteReg(0xA2,0x02);