Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 4:d0d4760d32b2, committed 2014-02-15
- Comitter:
- edodm85
- Date:
- Sat Feb 15 15:01:55 2014 +0000
- Parent:
- 3:b4e0cefc37f6
- Child:
- 5:4135ec0f88e6
- Commit message:
- Updated
Changed in this revision
--- a/main.cpp Sun Apr 07 10:52:10 2013 +0000
+++ b/main.cpp Sat Feb 15 15:01:55 2014 +0000
@@ -30,7 +30,8 @@
while(1)
{
- if(new_send){
+ if(new_send)
+ {
int i = 0;
while(pc.readable())
@@ -46,7 +47,8 @@
-void parse_cmd(){
+void parse_cmd()
+{
new_send = false;
if(strcmp("snap", word) == 0)
@@ -139,6 +141,22 @@
{
pc.printf("Tot time acq + send (mbed): %dms\r\n", t2-t1);
memset(word, 0, sizeof(word));
+ }else
+ if(strcmp("reg_status", word) == 0)
+ {
+ int i = 0;
+ pc.printf("AD : +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F");
+ for (i=0;i<OV7670_REGMAX;i++)
+ {
+ int data;
+ data = camera.ReadReg(i); // READ REG
+ if ((i & 0x0F) == 0)
+ {
+ pc.printf("\r\n%02X : ",i);
+ }
+ pc.printf("%02X ",data);
+ }
+ pc.printf("\r\n");
}
memset(word, 0, sizeof(word));
@@ -146,7 +164,8 @@
}
-void CameraSnap(){
+void CameraSnap()
+{
led4 = 1;
// Kick things off by capturing an image
@@ -172,12 +191,10 @@
}
camera.ReadStop();
- t2 = t.read_ms();
+ t2 = t.read_ms();
- // Immediately request the next image to be captured (takes around 45ms)
- camera.CaptureNext();
- // Now wait for the image to finish being captured
- while (camera.CaptureDone() == false);
+ camera.CaptureNext();
+ while(camera.CaptureDone() == false);
pc.printf("Snap_done\r\n");
led4 = 0;
--- a/main.h Sun Apr 07 10:52:10 2013 +0000
+++ b/main.h Sat Feb 15 15:01:55 2014 +0000
@@ -19,7 +19,7 @@
OV7670 camera
(
p28,p27, // SDA,SCL(I2C / SCCB)
- p23,p24,p25, // VSYNC,HREF,WEN(FIFO)
+ p23,NC,p25, // VSYNC,HREF,WEN(FIFO)
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)
p26,p29,p30 // RRST,OE,RCLK
);
--- a/mbed.bld Sun Apr 07 10:52:10 2013 +0000 +++ b/mbed.bld Sat Feb 15 15:01:55 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/5e5da4a5990b \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/869cf507173a \ No newline at end of file
--- a/ov7670.lib Sun Apr 07 10:52:10 2013 +0000 +++ b/ov7670.lib Sat Feb 15 15:01:55 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/edodm85/code/ov7670/#354a00023f79 +http://mbed.org/users/edodm85/code/ov7670/#b40a945dd672