Taking pictures with the OV7670 at 17fps.
Dependencies: ov7670_lib Project_test
main.h@4:d0d4760d32b2, 2014-02-15 (annotated)
- Committer:
- edodm85
- Date:
- Sat Feb 15 15:01:55 2014 +0000
- Revision:
- 4:d0d4760d32b2
- Parent:
- 2:bbd557817319
- Child:
- 5:4135ec0f88e6
Updated
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
edodm85 | 0:19429e334b75 | 1 | #pragma once |
edodm85 | 0:19429e334b75 | 2 | #include "mbed.h" |
edodm85 | 0:19429e334b75 | 3 | #include "ov7670.h" |
edodm85 | 0:19429e334b75 | 4 | #include "MODSERIAL.h" |
edodm85 | 0:19429e334b75 | 5 | |
edodm85 | 0:19429e334b75 | 6 | |
edodm85 | 0:19429e334b75 | 7 | |
edodm85 | 0:19429e334b75 | 8 | MODSERIAL pc(USBTX,USBRX); |
edodm85 | 0:19429e334b75 | 9 | Timer t; |
edodm85 | 0:19429e334b75 | 10 | bool new_send = false; |
edodm85 | 0:19429e334b75 | 11 | |
edodm85 | 0:19429e334b75 | 12 | DigitalOut led1(LED1); |
edodm85 | 0:19429e334b75 | 13 | DigitalOut led2(LED2); |
edodm85 | 0:19429e334b75 | 14 | DigitalOut led3(LED3); |
edodm85 | 0:19429e334b75 | 15 | DigitalOut led4(LED4); |
edodm85 | 0:19429e334b75 | 16 | |
edodm85 | 0:19429e334b75 | 17 | |
edodm85 | 0:19429e334b75 | 18 | //Camera |
edodm85 | 0:19429e334b75 | 19 | OV7670 camera |
edodm85 | 0:19429e334b75 | 20 | ( |
edodm85 | 0:19429e334b75 | 21 | p28,p27, // SDA,SCL(I2C / SCCB) |
edodm85 | 4:d0d4760d32b2 | 22 | p23,NC,p25, // VSYNC,HREF,WEN(FIFO) |
edodm85 | 0:19429e334b75 | 23 | Port0,0x07878000, // PortIn data p18(P0.26),p17(P0.25),p16(P0.24),p15(P0.23),p11(P0.18),p12(P0.17),p14(P0.16),p13(P0.15) |
edodm85 | 0:19429e334b75 | 24 | p26,p29,p30 // RRST,OE,RCLK |
edodm85 | 0:19429e334b75 | 25 | ); |
edodm85 | 0:19429e334b75 | 26 | |
edodm85 | 0:19429e334b75 | 27 | //RESET |
edodm85 | 0:19429e334b75 | 28 | extern "C" void mbed_reset(); |
edodm85 | 0:19429e334b75 | 29 | |
edodm85 | 0:19429e334b75 | 30 | //Serial |
edodm85 | 2:bbd557817319 | 31 | char word[25]; |
edodm85 | 0:19429e334b75 | 32 | int t1 = 0; |
edodm85 | 0:19429e334b75 | 33 | int t2 = 0; |
edodm85 | 0:19429e334b75 | 34 | int t3 = 0; |
edodm85 | 0:19429e334b75 | 35 | |
edodm85 | 0:19429e334b75 | 36 | // |
edodm85 | 0:19429e334b75 | 37 | void parse_cmd(); |
edodm85 | 2:bbd557817319 | 38 | void CameraSnap(); |
edodm85 | 0:19429e334b75 | 39 | void CameraGrab(); |