Pages: 1 ... 17 18 [19] 20 21 ... 26   Go Down
Author Topic: ov7670 with both arduino uno and now mega  (Read 69344 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 11
Posts: 327
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You DON'T need to change the fuse bits it is a waste of time. Just use the fast PWM mode it will output an 8mhz clock.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tryed this program http://pastebin.com/1nnRc5qL but dont send anything in serial monitor.
Logged

Offline Offline
Sr. Member
****
Karma: 11
Posts: 327
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok you tried the program but it seems as though you tried nothing to fix it. Please add fast PWM code to the program read the atmega328p datasheet if you are unsure of how to do so. Also I don't like that program anymore (the ones on pastebin). You should checkout https://github.com/ComputerNerd/arduino-camera-tft I am working on the ov7670 with the stm32f4 discovery but have been extremely busy with non-electronics stuff. I would rather do this but can't sorry.
« Last Edit: January 19, 2014, 01:07:08 pm by Mr_arduino » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tryed with this in void setup():
Code:
TCCR0B = TCCR0B & 0b11111000 | 0x01;
But dont work.
« Last Edit: January 19, 2014, 02:11:16 pm by Benji1992 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All
I fear that I share the frustration most of you had here, and unfortunately I am stuck.
Can someone help point me in the right direction?
(I literally went through the whole thread and because of the non-fifo, fifo v1, fifo v2 variances and different
arduino products it is getting much confusing!!)

What would your guess if the following is the output of a QQVGA, YUV...etc (basically the array of settings provided here
in the forum).
I am running only
uint8_t init_yuv_qqvga();
void init_camera_reset();
uint8_t init_default_values();

and commented out
        void init_negative_vsync();

as I have Version 1.

I added the Color bars of course, and reading two bytes, discarding the first one and sending the 2nd one (Y-values = grayscale)

Feedback is much appreciated, and sorry for not putting out any bits and pieces of code, i will do so as you ask as it iwll be difficult to put everything at once.


* Capture.PNG (28.33 KB, 190x177 - viewed 32 times.)
« Last Edit: January 20, 2014, 02:57:12 pm by Fadik » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello mr Arduino. I bought arducam shiel and i used it with aduino uno. and its work perfectly. but i want to change it to take several pictures at a single push in a button. like a picture serious.
this is the program
// ArduCAM demo (C)2013 Lee
// web: http://www.ArduCAM.com
// This program is a demo of how to use most of the functions
// of the library with a supported camera modules.
//
// This demo was made for Omnivision OV2640 sensor.
// 1. Set the sensor to JPEG output mode.
// 2. Capture and buffer the image to FIFO.
// 3. Store the image to Micro SD/TF card with JPEG format.
// 4. Resolution can be changed by myCAM.OV2640_set_JPEG_size() function.
// This program requires the ArduCAM V3.0.0 (or above) library and Rev.C ArduCAM shield
// and use Arduino IDE 1.5.2 compiler

#include <UTFT_SPI.h>
#include <SD.h>
#include <Wire.h>
#include <ArduCAM.h>
#include <SPI.h>
#if defined(__arm__)
  #include <itoa.h>
#endif

#define SD_CS 9
// set pin 10 as the slave select for SPI:
const int slaveSelectPin = 10;

ArduCAM myCAM(OV2640,10);
//UTFT myGLCD(slaveSelectPin);

void setup()
{
  #if defined (__AVR__)
    Wire.begin();
  #endif
  #if defined(__arm__)
    Wire1.begin();
  #endif
  Serial.begin(115200);
  Serial.println("hello");
  // set the slaveSelectPin as an output:
  pinMode(slaveSelectPin, OUTPUT);

  // initialize SPI:
  SPI.begin();

  myCAM.write_reg(ARDUCHIP_MODE, 0x00);

  //myGLCD.InitLCD();
  myCAM.set_format(JPEG);

  myCAM.InitCAM();

  //myCAM.OV2640_set_JPEG_size(OV2640_320x240);
  myCAM.OV2640_set_JPEG_size(OV2640_1600x1200);

  //Initialize SD Card
  if (!SD.begin(SD_CS))
  {
    //while (1);      //If failed, stop here
  }

  Serial.println("init done");
}

void loop()
{
  char str[8];
  File outFile;
  static int k = 0;
  static int n = 0;
  uint8_t temp,temp_last;
  uint8_t start_capture = 0;
 
  //Wait trigger from shutter buttom   
  if(myCAM.read_reg(ARDUCHIP_TRIG) & SHUTTER_MASK)   
  {
    //Wait until buttom released
    while(myCAM.read_reg(ARDUCHIP_TRIG) & SHUTTER_MASK);
    start_capture = 1;
  }
 
  //Start capture when detect a valid shutter press 
  if(start_capture)
  {
    //Flush the FIFO
    myCAM.flush_fifo();   
    //Clear the capture done flag
    myCAM.clear_fifo_flag();      
    //Start capture
    myCAM.start_capture();   
  }
 
  if(myCAM.read_reg(ARDUCHIP_TRIG) & CAP_DONE_MASK)
  {
    //Construct a file name
    k = k + 1;
    itoa(k, str, 10);
    strcat(str,".jpg");
    //Open the new file 
    outFile = SD.open(str,FILE_WRITE);
    if (! outFile)
    {
      Serial.println("open file failed");
      return;
    }

    temp = myCAM.read_fifo();
    outFile.write(temp);

    //Read JPEG data from FIFO
    while( (temp != 0xD9) | (temp_last != 0xFF) )
    {
      temp_last = temp;
      temp = myCAM.read_fifo();
      //Write image data to file
      outFile.write(temp);
    }
    //Close the file
    outFile.close();
   
    //Clear the capture done flag
    myCAM.clear_fifo_flag();
    //Clear the start capture flag
    start_capture = 0;
  }
}

   where do i need to change ??

 
Logged

Offline Offline
Sr. Member
****
Karma: 11
Posts: 327
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Fadik you are missing bytes or have configured the camera wrong. Please post the code you use to get bytes from the camera.
@sakeear After the button is pressed you just need to put the code that saves the image in a loop and in that loop make sure to "increment" the file-name so you don't overwrite the same image.
« Last Edit: January 21, 2014, 09:39:44 pm by Mr_arduino » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good night Mr_arduino! I'm from Brazil and do not understand English, but I I'm using Chrome tool that makes the automatic translation into Portuguese, translation is not very good, so some things are confusing this topic for me. I have the module ov7670 without the FIFO, an Arduino MEGA and SD card module, how do I take a picture with the camera and store it on the SD card? What other components are needed so that I can do this? And where each pin is docked? Thanks for attention and sorry for the inconvenience.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mr_Arduino,

this is a snippet of the code that reads back from the camera:
it loops for the height of the image, reading back each row by looping through the row's bytes.
I am working with QQVGA and YUV422.

Code:
int CameraAL422B::readFrame(/*OutputStream *out*/) {
    int i, n = 0;
   
resetReadPointer();
    for (i = 0; i < height; i++) {
        n += readRow(/*out*/);
}

//OE always LOW as it is GROUNEDED
//handle readClockPin
digitalWriteFast(readClockPin,HIGH);
    digitalWriteFast(readClockPin,LOW);
digitalWriteFast(readClockPin,HIGH);

    return n;
}
 
int CameraAL422B::readRow(/*OutputStream *out*/) {
    int i;
uint8_t b,b1,b2;
uint8_t b3,b4,b5,b6,b7,b8;

    for (i = 0; i < width; i++) {
        digitalWriteFast(readClockPin,HIGH);
        //out->write(read());
//read();f
//I want to waste the U/V component and take only the Y for gray scale.
//Fake a read for the first byte, take the second byte down below
digitalWriteFast(readClockPin,LOW);
//delayMicroseconds(1);
digitalWriteFast(readClockPin,HIGH);

//Low Byte in PINB
//High Byte in PIND
b1 = (PINB & (0b00001111));
b2 = (PIND & (0b11110000));

digitalWriteFast(readClockPin,LOW);

//combine and send to PC
b = b1 | b2;
Serial.write(b);   
    }
    return i;
}

I have also attached the code I am using. it has been modified a lot from the original source I found on the net by combining another fellow  contributor's work to do the list of reg. configurations.
missing some parent camera.cpp/.h files and digitalfastwrite.h library. but other than that i think you have all the necessary code.
I appreciate your time , this module has been driving me crazy!!!

* CameraAL422B.cpp (6.97 KB - downloaded 48 times.)
* CameraAL422B.h (19.73 KB - downloaded 47 times.)
* X.ino (1.03 KB - downloaded 36 times.)
* ov7670_reg.h (24.76 KB - downloaded 57 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oh and this is the latest image.


* color_bar.png (24.58 KB, 257x167 - viewed 34 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, I'm new here. I'm working with the camera OV7670 without fifo and am using a Arduino UNO to capture video from the camera and show this video to PC via USB. I will work with an 8MHz clock. Besides the Arduino UNO and OV7670 camera, I wonder which integrated circuits (ICs) will need to capture the video? And what is the lowest resolution camera possible?

Thank you!
Logged

Michigan
Offline Offline
Jr. Member
**
Karma: 0
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, so, I'm still as lost as can be and just don't understand some things.  First off, how did you know what registers to write to and in what order?  The more I look at datasheets for almost anything, the more frustrated I feel.  It honestly is like I'm trying to decipher some ancient language that I just can't seem to grasp.

I get the registers and how to write to them.  I get the code(for the most part), but I don't want to just copy yours.  I really want to just write it for myself.  That's why I ask how you knew which registers to write to.  Clearly you don't use them all.  I'm assuming you left more than a few to default.  I ask, cuz working with the 0V5642, I found some documentation for writing to the registers, but after going over it multiple times, it seems to be application specific, and also not for the camera module/included hardware that I am using.

I know the 5642 is different, but it follows the same concept.  You write to certain registers to adjust specific settings, then the camera responds when certain calls are made.  (I know that's a crude explanation, but you understand).  I know if I can get the proper order and how you derived that from the datasheet, I can figure out the rest.  I'm just not seeing anything about the order.  Did I miss something?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello. I have following questions:
1. What additional hardware is necessary to connect OV7670 with fifo to Uno or Mega?
2. Is it possible to connect 2 cameras (OV7670 with fifo) to Uno or Mega (or any other Arduino board) and what additional hardware is necessary?
3. Is it possible to process pixel level information from the camera (e.g. if the specific pixel color of the specific image equals to red, light up an LED or do something else)?
4. Is any Arduino board capable to connect and manipulate 2 cameras, 2 audio input devices (e.g. microphone), a speaker,  a gyro sensor and 4 or 5 motors? If yes, what additional hardware is necessary?
Many questions, but this is the right place to ask. Thank you in advance.
« Last Edit: January 26, 2014, 01:28:39 pm by Jivex » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tryed to use this code but it dosn't work. First I need read the pixels in Raw RGB mode and send to serial.
This is my code:
Code:
#include <Wire.h>
#include <SdFat.h>
#include <SdFatUtil.h>

const int sd_select = 4;
uint8_t sensor_addr = 0x42;

SdFat sd;
SdFile file;



void setup(){
 
  Wire.begin();
  Serial.begin(115200);
 
 
 
  DDRB|=47;//clock as output and SPI pins as output except MISO
  PORTB|=6;//set both CS pins to high
  DDRC&=~15;//low d0-d3 camera
  DDRD&=~252;//d7-d4 and interupt pins
 
  //set up twi for 100khz
  TWSR&=~3;//disable prescaler for TWI
  TWBR=72;//set to 100khz
 
  PgmPrintln("Camera init!");
 
 // wrReg(0x15,32);//pclk does not toggle on HBLANK COM10 vsync falling
  wrReg(0x12,0x80);
  wrReg(0x11,0x01 );
  wrReg(0x3a,0x04 );
  wrReg(0x12,0x01 );
  wrReg(0x17,0x12 );
  wrReg(0x18,0x00 );
  wrReg(0x32,0xb6 );
  wrReg(0x19,0x02 );
  wrReg(0x1a,0x7a );
  wrReg(0x03,0x00 );
  wrReg(0x0c,0x00 );
  wrReg(0x3e,0x00 );
  wrReg(0x70,0x3a );
  wrReg(0x71,0x35 );
  wrReg(0x72,0x11 );
  wrReg(0x73,0xf0 );
  wrReg(0xa2,0x02 );
  wrReg(0x13,0xe0 );
  wrReg(0x00,0x00 );
  wrReg(0x10,0x00 );
  wrReg(0x0d,0x40 );
  wrReg(0x14,0x38 );
  wrReg(0xa5,0x07 );
  wrReg(0xab,0x08 );
  wrReg(0x24,0x95 );
  wrReg(0x25,0x33 );
  wrReg(0x26,0xe3 );
  wrReg(0x9f,0x78 );
  wrReg(0xa0,0x68 );
  wrReg(0xa1,0x0b );
  wrReg(0xa6,0xd8 );
  wrReg(0xa7,0xd8 );
  wrReg(0xa8,0xf0 );
  wrReg(0xa9,0x90 );
  wrReg(0xaa,0x94 );
  wrReg(0x13,0xe5 );
  wrReg(0x0e,0x61 );
  wrReg(0x0f,0x4b );
  wrReg(0x16,0x02 );
  wrReg(0x21,0x02 );
  wrReg(0x22,0x91 );
  wrReg(0x29,0x07 );
  wrReg(0x33,0x03 );
  wrReg(0x35,0x0b );
  wrReg(0x37,0x1c );
  wrReg(0x38,0x71 );
  wrReg(0x3c,0x78 );
  wrReg(0x3d,0x08 );
  wrReg(0x41,0x3a );
  wrReg(0x4d,0x40 );
  wrReg(0x4e,0x20 );
  wrReg(0x69,0x55 );
  wrReg(0x6b,0x4a );
  wrReg(0x74,0x19 );
  wrReg(0x76,0x61 );
  wrReg(0x8d,0x4f );
  wrReg(0x8e,0x00 );
  wrReg(0x8f,0x00 );
  wrReg(0x90,0x00 );
  wrReg(0x91,0x00 );
  wrReg(0x96,0x00 );
  wrReg(0x9a,0x80 );
  wrReg(0xb0,0x8c );
  wrReg(0xb1,0x0c );
  wrReg(0xb2,0x0e );
  wrReg(0xb3,0x82 );
  wrReg(0xb8,0x0a );
  wrReg(0x43,0x14 );
  wrReg(0x44,0xf0 );
  wrReg(0x45,0x34 );
  wrReg(0x46,0x58 );
  wrReg(0x47,0x28 );
  wrReg(0x48,0x3a );
  wrReg(0x59,0x88 );
  wrReg(0x5a,0x88 );
  wrReg(0x5b,0x44 );
  wrReg(0x5c,0x67 );
  wrReg(0x5d,0x49 );
  wrReg(0x5e,0x0e );
  wrReg(0x6c,0x0a );
  wrReg(0x6d,0x55 );
  wrReg(0x6e,0x11 );
  wrReg(0x6f,0x9f );
  wrReg(0x6a,0x40 );
  wrReg(0x01,0x40 );
  wrReg(0x02,0x40 );
  wrReg(0x13,0xe7 );
  wrReg(0x34,0x11 );
  wrReg(0x92,0x66 );
  wrReg(0x3b,0x0a );
  wrReg(0xa4,0x88 );
  wrReg(0x96,0x00 );
  wrReg(0x97,0x30 );
  wrReg(0x98,0x20 );
  wrReg(0x99,0x20 );
  wrReg(0x9a,0x84 );
  wrReg(0x9b,0x29 );
  wrReg(0x9c,0x03 );
  wrReg(0x9d,0x4c );
  wrReg(0x9e,0x3f );
  wrReg(0x78,0x04 );
  wrReg(0x79,0x01 );
  wrReg(0xc8,0xf0 );
  wrReg(0x79,0x0f );
  wrReg(0xc8,0x20 );
  wrReg(0x79,0x10 );
  wrReg(0xc8,0x7e );
  wrReg(0x79,0x0b );
  wrReg(0xc8,0x01 );
  wrReg(0x79,0x0c );
  wrReg(0xc8,0x07 );
  wrReg(0x79,0x0d );
  wrReg(0xc8,0x20 );
  wrReg(0x79,0x09 );
  wrReg(0xc8,0x80 );
  wrReg(0x79,0x02 );
  wrReg(0xc8,0xc0 );
  wrReg(0x79,0x03 );
  wrReg(0xc8,0x40 );
  wrReg(0x79,0x05 );
  wrReg(0xc8,0x30 );
  wrReg(0x79,0x26 );
 
  if (!sd.begin(sd_select, SPI_FULL_SPEED)) sd.initErrorHalt(); 
 
  PgmPrintln("RDY2B!");
  ;
  pinMode(8,INPUT);
 
}

void loop(){
   //PgmPrintln("Send One key to start image save");
   
 int buttonState=1;
 buttonState = digitalRead(8);
   
   
   if(buttonState==0){
  PgmPrintln("Img Capture Ok");
  captureImg(0,0,1920,5);//each pixel is 2 bytes so 1280 instead of 640 for width
 
  /*captureImg(1920,96,1920,96);
 
  captureImg(1920,192,1920,96);
 
  captureImg(1920,288,1920,96);
 
  captureImg(1920,384,1920,96);*/
   }
 
 
}

byte wrReg(int regID, int regDat)
{
     //   Serial.println("Started"); 
        Wire.beginTransmission(sensor_addr >> 1);
     //    Serial.println("Began"); 
        Wire.write(regID & 0x00FF);   
        Wire.write(regDat & 0x00FF);   
        if(Wire.endTransmission())
        {
                return 0;
                PORTB|=32;
                while (1) {}
        }
   //     Serial.println("Done!");
        delay(1);
        return(1);
}

void captureImg(uint16_t ws,uint16_t hs,uint16_t wg,uint8_t hg)
{//TODO: speed up this loop it misses one byte partway through the first line
//right now I am correcting this in the image converter software it is just one byte and not very
//noticable but it would still be nice to fix in my opion I do not have this issue when this loop is compiled with avr-gcc with a setting of -O2
 Serial.end();
 delay(200);
 Serial.begin(115200);
 Serial.println("OK");
        uint16_t ls2,lg2;
        //skip 1 multiplies skip 2 same with get1 and get2
        //first wait for vsync it is on pin 3 (counting from 0) portD
        //start spi ram
//  cli();//make sure interupts are off
        char* str;
        char tmp;
       
        str=(char*)malloc(12*sizeof(char));
        while (!(PIND&8)) {}//wait for high
        while ((PIND&8)) {}//wait for low
       
        str[3]=';';
        str[7]=';';
        str[3]=';';
       
        //for (lg1=0;lg1<hg;lg1++)
        while ((uint8_t)hg--)
        {
                //for (lg2=0;lg2<wg;lg2++)
                lg2=wg;
                while (lg2--)
                {
                 
                        while (!(PIND&4)) {}//wait for high
                       // SPDR=(uint8_t)(PINC&15)|(PIND&240);
                        tmp=(PINC&15)|(PIND&240);
                        while ((PIND&4)) {}//wait for low
                       
                        str[0]=tmp/100;
                        str[1]=(tmp%100)/10;
                        str[2]=tmp%10;
                       
                        /*while (!(PIND&4)) {}//wait for high
                       // SPDR=(uint8_t)(PINC&15)|(PIND&240);
                        tmp=(PINC&15)|(PIND&240);
                        while ((PIND&4)) {}//wait for low
                       
                        str[4]=tmp/100;
                        str[5]=(tmp%100)/10;
                        str[6]=tmp%10;
                       
                        while (!(PIND&4)) {}//wait for high
                       // SPDR=(uint8_t)(PINC&15)|(PIND&240);
                        tmp=(PINC&15)|(PIND&240);
                        while ((PIND&4)) {}//wait for low
                       
                        str[8]=tmp/100;
                        str[9]=(tmp%100)/10;
                        str[10]=tmp%10;*/
                       
                        str[3]='\0';
                        //str[4]='\0';
                       
                        for(int i=0;i<3;i++)  str[i]+=48;
                        for(int i=4;i<7;i++)  str[i]+=48;
                        for(int i=8;i<11;i++)  str[i]+=48;
                       // str[4]='\0';
                     
                       //PgmPrintln(str);
                       Serial.println(str);
                       
                }
                /*
                str[1]='\0';
                str[0]='\r';
               
              StringPgm(str);
                str[0]='\n';
              StringPgm(str);*/
        }
}

uint8_t RdSerial(void)
{
        /* Wait for data to be received */
        while ( !(UCSR0A & (1<<RXC0)) );
        /* Get and return received data from buffer */
        return UDR0;
}

void spiCSt(void)
{
        //toggles spi CS used for reseting sram
        PORTB|=6;//cs high
        //_delay_ms(1);
        PORTB&=~4;//cs low
}
void spiWrB(uint8_t dat)
{
        SPDR = dat;
        // Wait for transmission complete
        while(!(SPSR & (1<<SPIF))) {}
}
void StringPgm(char * str)
{
        do {
                serialWrB(pgm_read_byte_near(str));
        } while(pgm_read_byte_near(++str));
}

void serialWrB(uint8_t dat)
{
        while ( !( UCSR0A & (1<<UDRE0)) ) {}
        UDR0=dat;
        while ( !( UCSR0A & (1<<UDRE0)) ) {} //wait for byte to transmit
}

I generate XCLOCK an external source and its 13MHz.
This is what send on serial:
Code:
Camera init!
RDY2B!
Img Capture Ok
OK
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
016
017
028
016
017
022
023
016
016
023
..... etc.
I converted the RGB code to bmp image but the pixels don't show what camera see.
Can anybody help me whats the problem?
Thanks!


* img_cam.PNG (3.98 KB, 639x8 - viewed 50 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As many others out there, I've been at this camera setup for quite a while... I have read and re-read the various forums and documentation out there. The pinouts are pretty self explanatory but I do believe there are still unanswered questions on behalf of this camera:

[OV7670 w/o FIFO]
  • Are frames captured automatically when the camera is powered on? (In other words, when I tie 3v3, Gnd, XCLK, PCLK, VSYNC/HREF, and [D7:D0] respectively, will I be able to observe rising and falling edges on a digital oscilloscope?) If not, which register do I need to write to to capture a frame? Answer: YES
  • Is this correct formatting? a) SCCB runs at at-most 100KHz; b) To start and end a transmission with SCCB, one must toggle { SIO_D->high, SIO_C->high, SIO_D->low, SIO_C->low } in that order. (Or in other words toggle data line while clock is high.) In between the start and stop signals, an 8-bit word is clocked { SIO_D->X, SIO_C->high, SIO_C->low }[7:0]. Following the word, a parity bit is received { SIO_D<-low, SIO_C->high, SIO_D<-X, SIO_C->low }. c) To write to an address, one must write 0x42, register, and data, in that order. d) To read from an address, one must write 0x42, register, end, start, 0x43, and then read data.
  • The OV chip is of type CMOS which are fragile to the electromagnetic environment. Do these cameras have built in protection or will I need to take the same precautions as with any other CMOS device? ie: anti-static wrist strap, and capacitive/inductive/zener voltage protection from sudden power on/off (un/plugging arduino). Answer: In a way they do in that they can be handled physically and come shipped w/o anti-static protection; This also seems to be the same with power - though I wouldn't risk pulling it's 3v3 line while hot.

At the very least, I needed to know the answer to the first.
Background: no queue (fifo), 20MHz XCLK (no PCKL signal at the moment - due to open circuit), 2v9 for logic high and power (330ohm/R:470ohm/R for voltage divider), using Arduino Uno R3 for prototyping and debugging

Source references:
SCCB Code: https://github.com/una1veritas/ARMWork/blob/master/stm32f3x_OV7670/sccb.cpp
SCCB Specification: http://www.ovt.com/download_document.php?type=document&DID=63
« Last Edit: February 06, 2014, 03:06:43 pm by TekuConcept » Logged

Pages: 1 ... 17 18 [19] 20 21 ... 26   Go Up
Jump to: