Forum Rule: Always post complete source code & details to reproduce any issue!
Page 6 of 9 FirstFirst ... 4 5 6 7 8 ... LastLast
Results 126 to 150 of 207

Thread: Problem trying to read OV7670 camera under IRQ Teensy 4.0

  1. #126
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,752
    Quote Originally Posted by mborgerson View Post
    I think the pin definitions in OV7670_MB are commented out. They should have been removed as they are not used.

    The output is an 640 x 480 array of 16-bit RGB565 values. My PC host converts that frame to an array of RGB888 values for PC display. As I said, distributing PC executables is a questionable thing, so I'm thinking about code to write files to the SD in .bmp format.

    It would be interesting to see if a Python program using PySerial could capture a transfer from the T4.1. That would solve the executable distribution problem and result in a nice cross-platform option. Alas, my Python skills are still at the "Hello World" stage.
    @mborgerson - any chance you are on Windows - or using MSFT Visual Studio? myself, KurtE and afaik mjs513 are all current with that for projects on Windows like @luni does.

    You posted what seemed a PC displayer app of some sort ...

    Overrun with distractions here - have not even gotten the labels printed to solder against yet.

  2. #127
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,752
    Quote Originally Posted by mjs513 View Post
    Ok just want to check I2C address but when I run I2c scanner it doesnt see the camera?
    According to the code it should be:
    Code:
    // define I2C address for OV7670
    static int const camAddress = 0x21; // i2c address of camera's sccb device

  3. #128
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,909
    Quote Originally Posted by defragster View Post
    According to the code it should be:
    Code:
    // define I2C address for OV7670
    static int const camAddress = 0x21; // i2c address of camera's sccb device
    Just hooked up sda, scl, 3.3v and GND and ran scanner and got no i2c devices found. THought it s 0x21 as well

  4. #129
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,752
    Quote Originally Posted by mjs513 View Post
    Just hooked up sda, scl, 3.3v and GND and ran scanner and got no i2c devices found. THought it s 0x21 as well
    Did you add pullups? They are not on camera board

  5. #130
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,909
    Quote Originally Posted by defragster View Post
    Did you add pullups? They are not on camera board
    Tried with and without- going to try again though - 2.2k if i remember your note

  6. #131
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,752
    Quote Originally Posted by mjs513 View Post
    Tried with and without- going to try again though - 2.2k if i remember your note
    (understood) 2.2K was typical for 3.3V - though @mBorg used 4K in his note.

    Maybe one of the other lines is needed to be set properly and isn't? Reset? ???

  7. #132
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,936
    Quote Originally Posted by mborgerson View Post
    I think the pin definitions in OV7670_MB are commented out. They should have been removed as they are not used.

    The output is an 640 x 480 array of 16-bit RGB565 values. My PC host converts that frame to an array of RGB888 values for PC display. As I said, distributing PC executables is a questionable thing, so I'm thinking about code to write files to the SD in .bmp format.

    It would be interesting to see if a Python program using PySerial could capture a transfer from the T4.1. That would solve the executable distribution problem and result in a nice cross-platform option. Alas, my Python skills are still at the "Hello World" stage.
    Thanks,

    Actually both sets were in comment blocks, but different. The one you used just happened to be the ones I had setup earlier so worked.

    Have not done anything since posting... Changing tractor oil...

    Will play again

  8. #133
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,936
    Quote Originally Posted by defragster View Post
    (understood) 2.2K was typical for 3.3V - though @mBorg used 4K in his note.

    Maybe one of the other lines is needed to be set properly and isn't? Reset? ???
    Note: I did not add any and so far have not appeared to run into issues. Maybe I will throw on a QWIIC device to have it's resistors added

  9. #134
    Senior Member
    Join Date
    Feb 2018
    Location
    Corvallis, OR
    Posts
    256
    Quote Originally Posted by defragster View Post
    @mborgerson - any chance you are on Windows - or using MSFT Visual Studio? myself, KurtE and afaik mjs513 are all current with that for projects on Windows like @luni does.

    You posted what seemed a PC displayer app of some sort ...

    Overrun with distractions here - have not even gotten the labels printed to solder against yet.
    I'm using Arduino 1.8.13 on Win10x64.

    I've added some code to save the bitmap to a .bmp file on the SD card so you can plug it in to your PC to view the image.

    Code:
    //  t4.1 PIN input  and image packet test
    //  New CameraBB with new pinouts for wired breadboard
    //  Use this version with an SD card to save your image
    //  MJB  10/27/2020
    
    #include <stdint.h>
    #include <Wire.h>
    #include <SD.h>
    #define FRAME_WIDTH 640l
    #define FRAME_HEIGHT 480l
    
    #define FB_WIDTH 640l
    #define FB_HEIGHT 480l
    #define FB_COUNT 2  // two frames in EXTMEM
    
    #define FRAMEBYTES (FRAME_WIDTH * FRAME_HEIGHT *2)
    #define FRAMEBUFFBYTES (FB_WIDTH *FB_HEIGHT *2)
    
    uint8_t fb1[FRAMEBUFFBYTES] EXTMEM;
    uint8_t fb2[FRAMEBUFFBYTES] EXTMEM;
    
    uint32_t masterfreq = 24;
    volatile uint32_t last_csistat, csiIrqCount;
    volatile uint32_t fb1count, fb2count;
    volatile uint32_t bswitcherrors;
    uint32_t framecount;
    
    
    const char compileTime [] = " Compiled on " __DATE__ " " __TIME__;
    
    const int ledpin    = 13;
    const int imarkpin = 32;
    const int pinCamReset = 14;
    
    
    // this file header structure needs to be packed because of the first uin16_t being
    // followed by a uint32_t.  Without packing you get 2 0x00 bytes after the bfType.
    # pragma pack (2)
    typedef struct  tBMPHDR565{
      uint16_t  bfType = 0x4d42;   //'bm';
      uint32_t  bfSize = 614466;// 614400 pixels + 66 header 
      uint16_t  bfReserved1 = 0;
      uint16_t  bfReserved2 = 0;
      uint32_t  bfOffBits =  66; // 14 bytes to here
      uint32_t  biSize = 40;
      int32_t   biWidth = 640;
      int32_t   biHeight = -480;  // windows wants negative for top-down image
      int16_t   biPlanes = 1;
      uint16_t  biBitCount = 16 ;
      uint32_t  biCompression = 3;  // bitfields used
      uint32_t  biSizeImage = 614400;  // 640 * 480 * 2
      int32_t   biXPelsPerMeter = 0;
      int32_t   biYPelsPerMeter = 0;
      uint32_t  biClrUsed  = 0;
      uint32_t  biClrImportant = 0;// 54 bytes
      uint32_t  rmask = 0x0000F800;
      uint32_t  gmask = 0x000007E0; 
      uint32_t  bmask = 0x0000001F;  //66 bytes
    } BMPHDR565;
    
    tBMPHDR565 fileheader;
    File bmpfile;
    
    #define  LEDON digitalWriteFast(ledpin, HIGH); // Also marks IRQ handler timing
    #define  LEDOFF digitalWriteFast(ledpin, LOW);
    #define  LEDTOGGLE digitalToggleFast(ledpin);
    
    #define  IMARKHI digitalWriteFast(imarkpin, HIGH); // Also marks IRQ handler timing
    #define  IMARKLO digitalWriteFast(imarkpin, LOW);
    #define  IMARKTOGGLE digitalToggleFast(imarkpin);
    
    void setup() {
      Serial.begin(9600);
      delay(200);
      Wire.begin();
    
      pinMode(ledpin, OUTPUT);
      pinMode(imarkpin, OUTPUT);
      pinMode(pinCamReset, OUTPUT);
      Serial.print("Initializing SD card...");
    
      if (!SD.begin(BUILTIN_SDCARD)) {
        Serial.println("initialization failed!");
        while (1){
            LEDON; delay(100);
            LEDOFF; delay(100);
          }
      }
      Serial.println("initialization done.");
    
      delay(100);
    
      memset(&fb1, 0, FRAMEBUFFBYTES * 2);
    
      digitalWriteFast(pinCamReset, LOW);
      delay(10);
      digitalWriteFast(pinCamReset, HIGH);  // subsequent resets via SCB
    
    
      Serial.printf("\n\nOV7670 Camera Test 3 %s\n", compileTime);
      
    
       cameraBegin(640, 480, fb1, fb2);
    
       Serial.printf("Size of file header is %u\n",sizeof(fileheader));
    
    
    }
    
    void loop() {
      static uint32_t lastfc;
      static uint32_t fc = 0;
      char ch;
      if(Serial.available()){
        ch = Serial.read();
        if (ch == 's') CMSI();
        if (ch == 'c') CMCS();
        if (ch == 'r') CMCR();
        if (ch == 'f') CMGF();
      }
    
      //  This extends frame count from 16 to 32 bits
      fc  = CSI_CSICR3 >> 16; // get the 16-bit frame count
     
      framecount += (fc - lastfc);
      lastfc = fc;
    }
    
    
    // Show information
    void CMSI(void) {
    
      Serial.printf("\n\nOV7670 Camera Test 3 %s\n", compileTime);
      Serial.printf("buff1 at %p   buff2 at %p\n", &fb1, &fb2);
      Serial.printf("Camera frame count = %lu \n", framecount);
      Serial.printf("Base Address Change errors: %lu\n", bswitcherrors);
      Serial.printf("csistat: %08X, csiIrqCount: %lu\n", CSI_CSISR, csiIrqCount);
      Serial.printf("fb1 count: %6lu   fb2 count %6lu\n",fb1count,fb2count);
    }
    
    void CMCS(void) {  // Show CSI registers
      print_csi_registers();
    }
    
    
    
    // Show Camera Registers
    void CMCR(void) {
      uint8_t regs[200];
      cameraReadAll(regs);
      cameraShowAll(regs);
    }
    
    
    // Get a frame of data and write to .bmp file
    void CMGF(void) {
      uint32_t imagesize, fbc;
      imagesize = (FRAME_WIDTH * FRAME_HEIGHT * 2);
      fbc = fb2count;
      while (fbc == fb2count); // wait until a new frame in fb2 is finished
      // Don't try sending unless your program can handle 614400 bytes in a hurry!
      //Serial.write(fb2,magesize);
      Serial.printf("fb2 ready to save %lu bytes.", imagesize);
      Serial.println("Saving OV7670.bmp ");
      if (SD.exists("OV7670.bmp")) {
        // delete the file:
        Serial.println("Removing OV7670.bmp...");
        SD.remove("OV7670.bmp");
      }
      bmpfile = SD.open("OV7670.bmp", FILE_WRITE);
      bmpfile.write((const uint8_t *)&fileheader, sizeof(fileheader));
      bmpfile.write(fb2, imagesize);
      bmpfile.close();
      Serial.println("File saved to SD card.");
    }
    I used the standard SD library, so you don't need SDFat. This has two effects:

    1. writing to SD is slow because there are no multi-sector writes.
    2. You have to use an SD card formatted as FAT16 of FAT32, an EXFAT card won't work.

    When you plug in the card, you can double-click on OV7670 to see the image. Because the image is stored top down, the height is negative in the BMP file header. It will be right-side-up if opened in photos, but the preview pane may show it upside down.

    I'm not sure why people are having I2C comm problems. 4K pullups seem OK on my board. Perhaps they aren't OK on board with more capacitance like plugboards. Those boards may require lower resistance values to get clean rising edges.

  10. #135
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,909
    Ok after spending most of the day wiring and rewiring finally got it working I think:
    Code:
    OV7670 Camera Test 3  Compiled on Oct 27 2020 20:36:31
    buff1 at 0x70096000   buff2 at 0x70000000
    Camera frame count = 483 
    Base Address Change errors: 476
    csistat: 84204001, csiIrqCount: 484
    fb1 count:     45   fb2 count     44
    ==== CSI ====
    CSI_CSICR1: 401B0912
    CSI_CSICR2: C0000000
    CSI_CSICR3: 73311020
    CSI_CSISTATFIFO: 0
    CSI_CSIRFIFO: 61704180
    CSI_CSIRXCNT: 9600
    CSI_CSISR: 80204001
    CSI_CSIDMASA_STATFIFO: 0
    CSI_CSIDMATS_STATFIFO: 0
    CSI_CSIDMASA_FB1: 70096000
    CSI_CSIDMASA_FB2: 70000000
    CSI_CSIFBUF_PARA: 0
    CSI_CSIIMAG_PARA: 50001E0
    CSI_CSICR18: 800AD210
    CSI_CSICR19: 10
    CSI_CSIRFIFO: FDFDFDFD
    fb2 ready for processing 614400 nytes.
    Did have to modify the posted sketch to read:
    Code:
      digitalWriteFast(pinCamReset, LOW);
      delay(10);
      digitalWriteFast(pinCamReset, HIGH);  // subsequent resets via SCB
      delay(10);
      digitalWriteFast(pinCamReset, LOW);
    as opposed to
    Code:
      digitalWriteFast(pinCamReset, LOW);
      delay(10);
      digitalWriteFast(pinCamReset, HIGH);  // subsequent resets via SCB
    Now I guess tomorrow I can play some more

  11. #136
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,936
    Good morning all,

    I am playing with the code but so far I am seeing garbage on a display... Need to figure out what is going on.

    Current sketch included. Was not sure if bytes reversed or not. Thought maybe something else going on...

    I am trying to display the data on an ILI9341 display...

    But then I also added dumping the data at the center... Maybe I am calculating something wrong. Will try some more stuff...

    I tried double checking the wiring. Will check again

    I probably screwed up something simple.

    @mjs513 adding the change to reset pin, caused mine not to read frames...
    Attached Files Attached Files

  12. #137
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,909
    Quote Originally Posted by KurtE View Post
    Good morning all,

    I am playing with the code but so far I am seeing garbage on a display... Need to figure out what is going on.

    Current sketch included. Was not sure if bytes reversed or not. Thought maybe something else going on...

    I am trying to display the data on an ILI9341 display...

    But then I also added dumping the data at the center... Maybe I am calculating something wrong. Will try some more stuff...

    I tried double checking the wiring. Will check again

    I probably screwed up something simple.

    @mjs513 adding the change to reset pin, caused mine not to read frames...
    Interesting just copied your version and loaded it up and got nothing until I added the reset to LOW? Strange....

  13. #138
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,936
    Quote Originally Posted by mjs513 View Post
    Interesting just copied your version and loaded it up and got nothing until I added the reset to LOW? Strange....
    Yes is strange If I uncomment those two lines I then try running and f command I see:
    Code:
    OV7670 Camera Test 3  Compiled on Oct 28 2020 08:02:01
    EXT Memory size: 16
    cam clock  12.00 with pll=1 and div=1
    After cameraBegin(end setup)
    
    s - Show Information
    
    c - Print CSI Registers
    
    r - Show Camera registers
    
    f - Show a frame
    
    Command character received: f
    Waiting for next FB2
    And it hangs. But maybe I have it hooked up on wrong pin?
    I have it on the Camera to the one RET? Smaybe should be the one PWDN?

  14. #139
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,909
    Quote Originally Posted by KurtE View Post
    Yes is strange If I uncomment those two lines I then try running and f command I see:

    And it hangs. But maybe I have it hooked up on wrong pin?
    I have it on the Camera to the one RET? Smaybe should be the one PWDN?
    Nope it was me - I had PWDN and RET reversed. Once I fixed it all works as originally posted Dumb mistake on my part.

    BTW: went back to my arducam stuff to try and get the bmp sent to there windows application, data gets sent but the image that comes across looks more like its smeared:

    EDIT: It does look like it wants low byte first in my case.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	11-22-44.png 
Views:	4 
Size:	48.7 KB 
ID:	22225  

  15. #140
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,909
    @KurtE
    You might want to check Adafruit OV7670 driver - has some good stuff on framesize, FPS etc on changing values: https://github.com/adafruit/Adafruit...ree/master/src

  16. #141
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,936
    @mjs513 - I have that one installed through library manager. Note: I believe it is based off of the Arduino library: https://github.com/arduino-libraries/Arduino_OV767X

    That is/was the one my other library code is off of... The one trying to get DMA to work...

    At some point should combine the two parts... i.e. Teensy41_OV670.

    Also thought about trying to build this in Sublimetext... But not sure the tset stuff is working very well for multiple INO files... So as an intermediate step I am thinking of renaming the INO files except the main one to be .cpp files.

    Will need to setup extern... stuff probably in header files.

  17. #142
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,909
    Quote Originally Posted by KurtE View Post
    @mjs513 - I have that one installed through library manager. Note: I believe it is based off of the Arduino library: https://github.com/arduino-libraries/Arduino_OV767X

    That is/was the one my other library code is off of... The one trying to get DMA to work...

    At some point should combine the two parts... i.e. Teensy41_OV670.

    Also thought about trying to build this in Sublimetext... But not sure the tset stuff is working very well for multiple INO files... So as an intermediate step I am thinking of renaming the INO files except the main one to be .cpp files.

    Will need to setup extern... stuff probably in header files.
    Thanks Kurt - didn't come across that one during the search - that processing sketch looks interesting,

    EDIT: Processing at least at know a bit. Just tried the processing sketch after modifying it for 640x480 but am pretty much seeing the same thing as in post #139 = are we sure we are dumpling RGB565?

  18. #143
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,909
    Ok just tried to save a bmp to the SD Card - must have something wrong with wiring?
    Click image for larger version. 

Name:	OV7670.png 
Views:	4 
Size:	287.0 KB 
ID:	22230

  19. #144
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,936
    Hi again, yep I am wondering about some of the settings and the like.

    I included my current set of hacks. Where I did rename most of the .ino files to .cpp and add header file with externals.

    Wondering about comparing the settings that are set versus the ones I have for the other camera using the hacked up library.

    May turn out we are trying to run the camera too fast for the jumper wires, or maybe I have something totally screwed up. Or???
    Attached Files Attached Files

  20. #145
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,909
    @KurtE
    Have 3 ways now to view the BMP - Arducam_Viewer (a little flaky to use since its a hack), that Processing sketch that was in the link you provided and save to an SD card. Al three show the distorted image. I also rewired it again but still shows same behavior.

    I have seen this before - a couple years ago when I was playing with Arducam - you may be right that we are trying to run the camera too fast. Guess next step is look at the settings as you said.

    heres what I have been playing with:
    Attached Files Attached Files

  21. #146
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,936
    Will have to take a look!

    Here is running the other (posted earlier up on github more or less)...

    Calling the init currently with: if (!Camera.begin(VGA, RGB565, 20)) {


    The I2C registers set are:
    Code:
    EXT Memory size: 8
    EXT Memory size: 8 EXTMEM variables: 25800 End: 70096000
    ::begin 0 255 255 255
    ILI9488_t3::begin - End
    frame_buffer: 7009600cframe_buffer aligned: 70096020OV767X Camera Capture
    
    OV767X::begin
      VS=41, HR=40, PC=4 XC=5
      _dpins(0)=14
      _dpins(1)=15
      _dpins(2)=17
      _dpins(3)=16
      _dpins(4)=22
      _dpins(5)=23
      _dpins(6)=20
      _dpins(7)=21
    arduino_i2c_write: address = 0x21, reg = 0x12, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x11, value = 0x1
    arduino_i2c_write: address = 0x21, reg = 0x3A, value = 0x4
    arduino_i2c_write: address = 0x21, reg = 0x12, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x17, value = 0x13
    arduino_i2c_write: address = 0x21, reg = 0x18, value = 0x1
    arduino_i2c_write: address = 0x21, reg = 0x32, value = 0xB6
    arduino_i2c_write: address = 0x21, reg = 0x19, value = 0x2
    arduino_i2c_write: address = 0x21, reg = 0x1A, value = 0x7A
    arduino_i2c_write: address = 0x21, reg = 0x3, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0xC, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x3E, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x70, value = 0x3A
    arduino_i2c_write: address = 0x21, reg = 0x71, value = 0x35
    arduino_i2c_write: address = 0x21, reg = 0x72, value = 0x11
    arduino_i2c_write: address = 0x21, reg = 0x73, value = 0xF0
    arduino_i2c_write: address = 0x21, reg = 0xA2, value = 0x2
    arduino_i2c_write: address = 0x21, reg = 0x15, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x7A, value = 0x20
    arduino_i2c_write: address = 0x21, reg = 0x7B, value = 0x10
    arduino_i2c_write: address = 0x21, reg = 0x7C, value = 0x1E
    arduino_i2c_write: address = 0x21, reg = 0x7D, value = 0x35
    arduino_i2c_write: address = 0x21, reg = 0x7E, value = 0x5A
    arduino_i2c_write: address = 0x21, reg = 0x7F, value = 0x69
    arduino_i2c_write: address = 0x21, reg = 0x80, value = 0x76
    arduino_i2c_write: address = 0x21, reg = 0x81, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x82, value = 0x88
    arduino_i2c_write: address = 0x21, reg = 0x83, value = 0x8F
    arduino_i2c_write: address = 0x21, reg = 0x84, value = 0x96
    arduino_i2c_write: address = 0x21, reg = 0x85, value = 0xA3
    arduino_i2c_write: address = 0x21, reg = 0x86, value = 0xAF
    arduino_i2c_write: address = 0x21, reg = 0x87, value = 0xC4
    arduino_i2c_write: address = 0x21, reg = 0x88, value = 0xD7
    arduino_i2c_write: address = 0x21, reg = 0x89, value = 0xE8
    arduino_i2c_write: address = 0x21, reg = 0x13, value = 0xE0
    arduino_i2c_write: address = 0x21, reg = 0x0, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x10, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0xD, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x14, value = 0x18
    arduino_i2c_write: address = 0x21, reg = 0xA5, value = 0x5
    arduino_i2c_write: address = 0x21, reg = 0xAB, value = 0x7
    arduino_i2c_write: address = 0x21, reg = 0x24, value = 0x95
    arduino_i2c_write: address = 0x21, reg = 0x25, value = 0x33
    arduino_i2c_write: address = 0x21, reg = 0x26, value = 0xE3
    arduino_i2c_write: address = 0x21, reg = 0x9F, value = 0x78
    arduino_i2c_write: address = 0x21, reg = 0xA0, value = 0x68
    arduino_i2c_write: address = 0x21, reg = 0xA1, value = 0x3
    arduino_i2c_write: address = 0x21, reg = 0xA6, value = 0xD8
    arduino_i2c_write: address = 0x21, reg = 0xA7, value = 0xD8
    arduino_i2c_write: address = 0x21, reg = 0xA8, value = 0xF0
    arduino_i2c_write: address = 0x21, reg = 0xA9, value = 0x90
    arduino_i2c_write: address = 0x21, reg = 0xAA, value = 0x94
    arduino_i2c_write: address = 0x21, reg = 0x13, value = 0xE5
    arduino_i2c_write: address = 0x21, reg = 0xE, value = 0x61
    arduino_i2c_write: address = 0x21, reg = 0xF, value = 0x4B
    arduino_i2c_write: address = 0x21, reg = 0x16, value = 0x2
    arduino_i2c_write: address = 0x21, reg = 0x1E, value = 0x7
    arduino_i2c_write: address = 0x21, reg = 0x21, value = 0x2
    arduino_i2c_write: address = 0x21, reg = 0x22, value = 0x91
    arduino_i2c_write: address = 0x21, reg = 0x29, value = 0x7
    arduino_i2c_write: address = 0x21, reg = 0x33, value = 0xB
    arduino_i2c_write: address = 0x21, reg = 0x35, value = 0xB
    arduino_i2c_write: address = 0x21, reg = 0x37, value = 0x1D
    arduino_i2c_write: address = 0x21, reg = 0x38, value = 0x71
    arduino_i2c_write: address = 0x21, reg = 0x39, value = 0x2A
    arduino_i2c_write: address = 0x21, reg = 0x3C, value = 0x78
    arduino_i2c_write: address = 0x21, reg = 0x4D, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x4E, value = 0x20
    arduino_i2c_write: address = 0x21, reg = 0x69, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x6B, value = 0x4A
    arduino_i2c_write: address = 0x21, reg = 0x74, value = 0x10
    arduino_i2c_write: address = 0x21, reg = 0x8D, value = 0x4F
    arduino_i2c_write: address = 0x21, reg = 0x8E, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x8F, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x90, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x91, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x96, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x9A, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0xB0, value = 0x84
    arduino_i2c_write: address = 0x21, reg = 0xB1, value = 0xC
    arduino_i2c_write: address = 0x21, reg = 0xB2, value = 0xE
    arduino_i2c_write: address = 0x21, reg = 0xB3, value = 0x82
    arduino_i2c_write: address = 0x21, reg = 0xB8, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0x43, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0x44, value = 0xF0
    arduino_i2c_write: address = 0x21, reg = 0x45, value = 0x34
    arduino_i2c_write: address = 0x21, reg = 0x46, value = 0x58
    arduino_i2c_write: address = 0x21, reg = 0x47, value = 0x28
    arduino_i2c_write: address = 0x21, reg = 0x48, value = 0x3A
    arduino_i2c_write: address = 0x21, reg = 0x59, value = 0x88
    arduino_i2c_write: address = 0x21, reg = 0x5A, value = 0x88
    arduino_i2c_write: address = 0x21, reg = 0x5B, value = 0x44
    arduino_i2c_write: address = 0x21, reg = 0x5C, value = 0x67
    arduino_i2c_write: address = 0x21, reg = 0x5D, value = 0x49
    arduino_i2c_write: address = 0x21, reg = 0x5E, value = 0xE
    arduino_i2c_write: address = 0x21, reg = 0x6C, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0x6D, value = 0x55
    arduino_i2c_write: address = 0x21, reg = 0x6E, value = 0x11
    arduino_i2c_write: address = 0x21, reg = 0x6F, value = 0x9F
    arduino_i2c_write: address = 0x21, reg = 0x6A, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x1, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x2, value = 0x60
    arduino_i2c_write: address = 0x21, reg = 0x13, value = 0xE7
    arduino_i2c_write: address = 0x21, reg = 0x4F, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x50, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x51, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x52, value = 0x22
    arduino_i2c_write: address = 0x21, reg = 0x53, value = 0x5E
    arduino_i2c_write: address = 0x21, reg = 0x54, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x58, value = 0x9E
    arduino_i2c_write: address = 0x21, reg = 0x41, value = 0x8
    arduino_i2c_write: address = 0x21, reg = 0x3F, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x75, value = 0x5
    arduino_i2c_write: address = 0x21, reg = 0x76, value = 0xE1
    arduino_i2c_write: address = 0x21, reg = 0x4C, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x77, value = 0x1
    arduino_i2c_write: address = 0x21, reg = 0x3D, value = 0xC3
    arduino_i2c_write: address = 0x21, reg = 0x4B, value = 0x9
    arduino_i2c_write: address = 0x21, reg = 0xC9, value = 0x60
    arduino_i2c_write: address = 0x21, reg = 0x41, value = 0x38
    arduino_i2c_write: address = 0x21, reg = 0x56, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x34, value = 0x11
    arduino_i2c_write: address = 0x21, reg = 0x3B, value = 0x12
    arduino_i2c_write: address = 0x21, reg = 0xA4, value = 0x88
    arduino_i2c_write: address = 0x21, reg = 0x96, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x97, value = 0x30
    arduino_i2c_write: address = 0x21, reg = 0x98, value = 0x20
    arduino_i2c_write: address = 0x21, reg = 0x99, value = 0x30
    arduino_i2c_write: address = 0x21, reg = 0x9A, value = 0x84
    arduino_i2c_write: address = 0x21, reg = 0x9B, value = 0x29
    arduino_i2c_write: address = 0x21, reg = 0x9C, value = 0x3
    arduino_i2c_write: address = 0x21, reg = 0x9D, value = 0x4C
    arduino_i2c_write: address = 0x21, reg = 0x9E, value = 0x3F
    arduino_i2c_write: address = 0x21, reg = 0x78, value = 0x4
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x1
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0xF0
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0xF
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x10
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x7E
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0xB
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x1
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0xC
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0xF
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0xD
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x20
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x9
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x2
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0xC0
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x3
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x5
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x30
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x26
    arduino_i2c_read: address = 0x21, reg = 0x1C, value = 0x7F
    arduino_i2c_read: address = 0x21, reg = 0x1D, value = 0xA2
    arduino_i2c_read: address = 0x21, reg = 0xA, value = 0x76
    arduino_i2c_read: address = 0x21, reg = 0xB, value = 0x73
    arduino_i2c_write: address = 0x21, reg = 0x12, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x11, value = 0x1
    arduino_i2c_write: address = 0x21, reg = 0x3A, value = 0x4
    arduino_i2c_write: address = 0x21, reg = 0x12, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x17, value = 0x13
    arduino_i2c_write: address = 0x21, reg = 0x18, value = 0x1
    arduino_i2c_write: address = 0x21, reg = 0x32, value = 0xB6
    arduino_i2c_write: address = 0x21, reg = 0x19, value = 0x2
    arduino_i2c_write: address = 0x21, reg = 0x1A, value = 0x7A
    arduino_i2c_write: address = 0x21, reg = 0x3, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0xC, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x3E, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x70, value = 0x3A
    arduino_i2c_write: address = 0x21, reg = 0x71, value = 0x35
    arduino_i2c_write: address = 0x21, reg = 0x72, value = 0x11
    arduino_i2c_write: address = 0x21, reg = 0x73, value = 0xF0
    arduino_i2c_write: address = 0x21, reg = 0xA2, value = 0x2
    arduino_i2c_write: address = 0x21, reg = 0x15, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x7A, value = 0x20
    arduino_i2c_write: address = 0x21, reg = 0x7B, value = 0x10
    arduino_i2c_write: address = 0x21, reg = 0x7C, value = 0x1E
    arduino_i2c_write: address = 0x21, reg = 0x7D, value = 0x35
    arduino_i2c_write: address = 0x21, reg = 0x7E, value = 0x5A
    arduino_i2c_write: address = 0x21, reg = 0x7F, value = 0x69
    arduino_i2c_write: address = 0x21, reg = 0x80, value = 0x76
    arduino_i2c_write: address = 0x21, reg = 0x81, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x82, value = 0x88
    arduino_i2c_write: address = 0x21, reg = 0x83, value = 0x8F
    arduino_i2c_write: address = 0x21, reg = 0x84, value = 0x96
    arduino_i2c_write: address = 0x21, reg = 0x85, value = 0xA3
    arduino_i2c_write: address = 0x21, reg = 0x86, value = 0xAF
    arduino_i2c_write: address = 0x21, reg = 0x87, value = 0xC4
    arduino_i2c_write: address = 0x21, reg = 0x88, value = 0xD7
    arduino_i2c_write: address = 0x21, reg = 0x89, value = 0xE8
    arduino_i2c_write: address = 0x21, reg = 0x13, value = 0xE0
    arduino_i2c_write: address = 0x21, reg = 0x0, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x10, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0xD, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x14, value = 0x18
    arduino_i2c_write: address = 0x21, reg = 0xA5, value = 0x5
    arduino_i2c_write: address = 0x21, reg = 0xAB, value = 0x7
    arduino_i2c_write: address = 0x21, reg = 0x24, value = 0x95
    arduino_i2c_write: address = 0x21, reg = 0x25, value = 0x33
    arduino_i2c_write: address = 0x21, reg = 0x26, value = 0xE3
    arduino_i2c_write: address = 0x21, reg = 0x9F, value = 0x78
    arduino_i2c_write: address = 0x21, reg = 0xA0, value = 0x68
    arduino_i2c_write: address = 0x21, reg = 0xA1, value = 0x3
    arduino_i2c_write: address = 0x21, reg = 0xA6, value = 0xD8
    arduino_i2c_write: address = 0x21, reg = 0xA7, value = 0xD8
    arduino_i2c_write: address = 0x21, reg = 0xA8, value = 0xF0
    arduino_i2c_write: address = 0x21, reg = 0xA9, value = 0x90
    arduino_i2c_write: address = 0x21, reg = 0xAA, value = 0x94
    arduino_i2c_write: address = 0x21, reg = 0x13, value = 0xE5
    arduino_i2c_write: address = 0x21, reg = 0xE, value = 0x61
    arduino_i2c_write: address = 0x21, reg = 0xF, value = 0x4B
    arduino_i2c_write: address = 0x21, reg = 0x16, value = 0x2
    arduino_i2c_write: address = 0x21, reg = 0x1E, value = 0x7
    arduino_i2c_write: address = 0x21, reg = 0x21, value = 0x2
    arduino_i2c_write: address = 0x21, reg = 0x22, value = 0x91
    arduino_i2c_write: address = 0x21, reg = 0x29, value = 0x7
    arduino_i2c_write: address = 0x21, reg = 0x33, value = 0xB
    arduino_i2c_write: address = 0x21, reg = 0x35, value = 0xB
    arduino_i2c_write: address = 0x21, reg = 0x37, value = 0x1D
    arduino_i2c_write: address = 0x21, reg = 0x38, value = 0x71
    arduino_i2c_write: address = 0x21, reg = 0x39, value = 0x2A
    arduino_i2c_write: address = 0x21, reg = 0x3C, value = 0x78
    arduino_i2c_write: address = 0x21, reg = 0x4D, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x4E, value = 0x20
    arduino_i2c_write: address = 0x21, reg = 0x69, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x6B, value = 0x4A
    arduino_i2c_write: address = 0x21, reg = 0x74, value = 0x10
    arduino_i2c_write: address = 0x21, reg = 0x8D, value = 0x4F
    arduino_i2c_write: address = 0x21, reg = 0x8E, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x8F, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x90, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x91, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x96, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x9A, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0xB0, value = 0x84
    arduino_i2c_write: address = 0x21, reg = 0xB1, value = 0xC
    arduino_i2c_write: address = 0x21, reg = 0xB2, value = 0xE
    arduino_i2c_write: address = 0x21, reg = 0xB3, value = 0x82
    arduino_i2c_write: address = 0x21, reg = 0xB8, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0x43, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0x44, value = 0xF0
    arduino_i2c_write: address = 0x21, reg = 0x45, value = 0x34
    arduino_i2c_write: address = 0x21, reg = 0x46, value = 0x58
    arduino_i2c_write: address = 0x21, reg = 0x47, value = 0x28
    arduino_i2c_write: address = 0x21, reg = 0x48, value = 0x3A
    arduino_i2c_write: address = 0x21, reg = 0x59, value = 0x88
    arduino_i2c_write: address = 0x21, reg = 0x5A, value = 0x88
    arduino_i2c_write: address = 0x21, reg = 0x5B, value = 0x44
    arduino_i2c_write: address = 0x21, reg = 0x5C, value = 0x67
    arduino_i2c_write: address = 0x21, reg = 0x5D, value = 0x49
    arduino_i2c_write: address = 0x21, reg = 0x5E, value = 0xE
    arduino_i2c_write: address = 0x21, reg = 0x6C, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0x6D, value = 0x55
    arduino_i2c_write: address = 0x21, reg = 0x6E, value = 0x11
    arduino_i2c_write: address = 0x21, reg = 0x6F, value = 0x9F
    arduino_i2c_write: address = 0x21, reg = 0x6A, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x1, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x2, value = 0x60
    arduino_i2c_write: address = 0x21, reg = 0x13, value = 0xE7
    arduino_i2c_write: address = 0x21, reg = 0x4F, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x50, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x51, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x52, value = 0x22
    arduino_i2c_write: address = 0x21, reg = 0x53, value = 0x5E
    arduino_i2c_write: address = 0x21, reg = 0x54, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x58, value = 0x9E
    arduino_i2c_write: address = 0x21, reg = 0x41, value = 0x8
    arduino_i2c_write: address = 0x21, reg = 0x3F, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x75, value = 0x5
    arduino_i2c_write: address = 0x21, reg = 0x76, value = 0xE1
    arduino_i2c_write: address = 0x21, reg = 0x4C, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x77, value = 0x1
    arduino_i2c_write: address = 0x21, reg = 0x3D, value = 0xC3
    arduino_i2c_write: address = 0x21, reg = 0x4B, value = 0x9
    arduino_i2c_write: address = 0x21, reg = 0xC9, value = 0x60
    arduino_i2c_write: address = 0x21, reg = 0x41, value = 0x38
    arduino_i2c_write: address = 0x21, reg = 0x56, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x34, value = 0x11
    arduino_i2c_write: address = 0x21, reg = 0x3B, value = 0x12
    arduino_i2c_write: address = 0x21, reg = 0xA4, value = 0x88
    arduino_i2c_write: address = 0x21, reg = 0x96, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x97, value = 0x30
    arduino_i2c_write: address = 0x21, reg = 0x98, value = 0x20
    arduino_i2c_write: address = 0x21, reg = 0x99, value = 0x30
    arduino_i2c_write: address = 0x21, reg = 0x9A, value = 0x84
    arduino_i2c_write: address = 0x21, reg = 0x9B, value = 0x29
    arduino_i2c_write: address = 0x21, reg = 0x9C, value = 0x3
    arduino_i2c_write: address = 0x21, reg = 0x9D, value = 0x4C
    arduino_i2c_write: address = 0x21, reg = 0x9E, value = 0x3F
    arduino_i2c_write: address = 0x21, reg = 0x78, value = 0x4
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x1
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0xF0
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0xF
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x10
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x7E
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0xB
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x1
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0xC
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0xF
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0xD
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x20
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x9
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x80
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x2
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0xC0
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x3
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x40
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x5
    arduino_i2c_write: address = 0x21, reg = 0xC8, value = 0x30
    arduino_i2c_write: address = 0x21, reg = 0x79, value = 0x26
    arduino_i2c_write: address = 0x21, reg = 0x12, value = 0x4
    arduino_i2c_write: address = 0x21, reg = 0x15, value = 0x20
    arduino_i2c_write: address = 0x21, reg = 0x8C, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x4, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x40, value = 0x10
    arduino_i2c_write: address = 0x21, reg = 0x14, value = 0x38
    arduino_i2c_write: address = 0x21, reg = 0x4F, value = 0xB3
    arduino_i2c_write: address = 0x21, reg = 0x50, value = 0xB3
    arduino_i2c_write: address = 0x21, reg = 0x51, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x52, value = 0x3D
    arduino_i2c_write: address = 0x21, reg = 0x53, value = 0xA7
    arduino_i2c_write: address = 0x21, reg = 0x54, value = 0xE4
    arduino_i2c_write: address = 0x21, reg = 0x3D, value = 0xC0
    arduino_i2c_write: address = 0x21, reg = 0x17, value = 0x13
    arduino_i2c_write: address = 0x21, reg = 0x18, value = 0x1
    arduino_i2c_read: address = 0x21, reg = 0x32, value = 0xB6
    arduino_i2c_write: address = 0x21, reg = 0x32, value = 0xB6
    arduino_i2c_write: address = 0x21, reg = 0x19, value = 0x2
    arduino_i2c_write: address = 0x21, reg = 0x1A, value = 0x7A
    arduino_i2c_read: address = 0x21, reg = 0x3, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0x3, value = 0xA
    arduino_i2c_write: address = 0x21, reg = 0x11, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x11, value = 0x0
    arduino_i2c_write: address = 0x21, reg = 0x6B, value = 0x4A
    arduino_i2c_write: address = 0x21, reg = 0x11, value = 0x3
    arduino_i2c_write: address = 0x21, reg = 0x6B, value = 0x4A
    Camera settings:
    	width = 640
    	height = 480
    	bits per pixel = 16
    
    Send the 'c' character to read a frame ...
    Send the 'd' character to read a frame using DMA ...
    Setup for ILI9488 and my function to do partial frame my not be fully correct, but is showing some reasonable stuff... (Not with DMA, but reading direct...)
    Now to see what they all do... versus this one...

  22. #147
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,909
    @KurtE

    Ok did a quick hack to add in ability to change resolution and format in setup. I also coverted over to your sketch but I added in my additions Still can't get a decent image. Wonder if bytes reverse?
    Attached Files Attached Files

  23. #148
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,936
    Good Morning,

    Will take a look. I was playing some later yesterday with the other library where I am reading in data using the reading of GPIO port...

    I hacked up their I2C write and read functions debug code to use a table to when possible show the register names. Probably should fill in their table more. I also added a command to dump the complete register set like the code we are debugging now. although one per line... So I can then maybe compare settings. Example output:
    Code:
    EXT Memory size: 8
    EXT Memory size: 8 EXTMEM variables: 25800 End: 70096000
    ::begin 0 255 255 255
    ILI9488_t3::begin - End
    
    frame_buffer: 7009600cframe_buffer aligned: 70096020OV767X Camera Capture
    
    
    
    OV767X::begin
    
      VS=41, HR=40, PC=4 XC=5
      _dpins(0)=14
      _dpins(1)=15
      _dpins(2)=17
      _dpins(3)=16
      _dpins(4)=22
      _dpins(5)=23
      _dpins(6)=20
      _dpins(7)=21
    I2C Write: reg: 0x12(REG_COM7), value = 0x80
    I2C Write: reg: 0x11(REG_CLKRC), value = 0x01
    I2C Write: reg: 0x3a(REG_TSLB), value = 0x04
    I2C Write: reg: 0x12(REG_COM7), value = 0x00
    I2C Write: reg: 0x17(REG_HSTART), value = 0x13
    I2C Write: reg: 0x18(REG_HSTOP), value = 0x01
    I2C Write: reg: 0x32(REG_HREF), value = 0xb6
    I2C Write: reg: 0x19(REG_VSTART), value = 0x02
    I2C Write: reg: 0x1a(REG_VSTOP), value = 0x7a
    I2C Write: reg: 0x03(REG_VREF), value = 0x0a
    I2C Write: reg: 0x0c(REG_COM3), value = 0x00
    I2C Write: reg: 0x3e(REG_COM14), value = 0x00
    I2C Write: reg: 0x70(REG_SCALING_XSC), value = 0x3a
    I2C Write: reg: 0x71(REG_SCALING_YSC), value = 0x35
    I2C Write: reg: 0x72(REG_SCALING_DCWCTR), value = 0x11
    I2C Write: reg: 0x73(REG_SCALING_PCLK_DIV), value = 0xf0
    I2C Write: reg: 0xa2(REG_SCALING_PCLK_DELAY), value = 0x02
    I2C Write: reg: 0x15(REG_COM10), value = 0x00
    I2C Write: reg: 0x7a(REG_SLOP), value = 0x20
    I2C Write: reg: 0x7b(REG_GAM_BASE), value = 0x10
    I2C Write: reg: 0x7c, value = 0x1e
    I2C Write: reg: 0x7d, value = 0x35
    I2C Write: reg: 0x7e, value = 0x5a
    I2C Write: reg: 0x7f, value = 0x69
    I2C Write: reg: 0x80(COM7_RESET), value = 0x76
    I2C Write: reg: 0x81, value = 0x80
    I2C Write: reg: 0x82, value = 0x88
    I2C Write: reg: 0x83, value = 0x8f
    I2C Write: reg: 0x84, value = 0x96
    I2C Write: reg: 0x85, value = 0xa3
    I2C Write: reg: 0x86, value = 0xaf
    I2C Write: reg: 0x87, value = 0xc4
    I2C Write: reg: 0x88, value = 0xd7
    I2C Write: reg: 0x89, value = 0xe8
    I2C Write: reg: 0x13(REG_COM8), value = 0xe0
    I2C Write: reg: 0x00(REG_GAIN), value = 0x00
    I2C Write: reg: 0x10(COM2_SSLEEP), value = 0x00
    I2C Write: reg: 0x0d(REG_COM4), value = 0x40
    I2C Write: reg: 0x14(REG_COM9), value = 0x18
    I2C Write: reg: 0xa5(REG_BD50MAX), value = 0x05
    I2C Write: reg: 0xab(REG_BD60MAX), value = 0x07
    I2C Write: reg: 0x24(REG_AEW), value = 0x95
    I2C Write: reg: 0x25(REG_AEB), value = 0x33
    I2C Write: reg: 0x26(REG_VPT), value = 0xe3
    I2C Write: reg: 0x9f(REG_HAECC1), value = 0x78
    I2C Write: reg: 0xa0(REG_HAECC2), value = 0x68
    I2C Write: reg: 0xa1, value = 0x03
    I2C Write: reg: 0xa6(REG_HAECC3), value = 0xd8
    I2C Write: reg: 0xa7(REG_HAECC4), value = 0xd8
    I2C Write: reg: 0xa8(REG_HAECC5), value = 0xf0
    I2C Write: reg: 0xa9(REG_HAECC6), value = 0x90
    I2C Write: reg: 0xaa(REG_HAECC7), value = 0x94
    I2C Write: reg: 0x13(REG_COM8), value = 0xe5
    I2C Write: reg: 0x0e(REG_COM5), value = 0x61
    I2C Write: reg: 0x0f(REG_COM6), value = 0x4b
    I2C Write: reg: 0x16, value = 0x02
    I2C Write: reg: 0x1e(REG_MVFP), value = 0x07
    I2C Write: reg: 0x21(REG_ADCCTR1), value = 0x02
    I2C Write: reg: 0x22(REG_ADCCTR2), value = 0x91
    I2C Write: reg: 0x29, value = 0x07
    I2C Write: reg: 0x33(REG_CHLF), value = 0x0b
    I2C Write: reg: 0x35, value = 0x0b
    I2C Write: reg: 0x37(REG_ADC), value = 0x1d
    I2C Write: reg: 0x38(COM7_SIZE_MASK), value = 0x71
    I2C Write: reg: 0x39(REG_OFON), value = 0x2a
    I2C Write: reg: 0x3c(REG_COM12), value = 0x78
    I2C Write: reg: 0x4d, value = 0x40
    I2C Write: reg: 0x4e, value = 0x20
    I2C Write: reg: 0x69(REG_GFIX), value = 0x00
    I2C Write: reg: 0x6b(REG_DBLV), value = 0x4a
    I2C Write: reg: 0x74(REG_REG74), value = 0x10
    I2C Write: reg: 0x8d, value = 0x4f
    I2C Write: reg: 0x8e, value = 0x00
    I2C Write: reg: 0x8f, value = 0x00
    I2C Write: reg: 0x90, value = 0x00
    I2C Write: reg: 0x91, value = 0x00
    I2C Write: reg: 0x96, value = 0x00
    I2C Write: reg: 0x9a, value = 0x00
    I2C Write: reg: 0xb0, value = 0x84
    I2C Write: reg: 0xb1(REG_ABLC1), value = 0x0c
    I2C Write: reg: 0xb2, value = 0x0e
    I2C Write: reg: 0xb3(REG_THL_ST), value = 0x82
    I2C Write: reg: 0xb8, value = 0x0a
    I2C Write: reg: 0x43(REG_AWBC1), value = 0x0a
    I2C Write: reg: 0x44(REG_AWBC2), value = 0xf0
    I2C Write: reg: 0x45(REG_AWBC3), value = 0x34
    I2C Write: reg: 0x46(REG_AWBC4), value = 0x58
    I2C Write: reg: 0x47(REG_AWBC5), value = 0x28
    I2C Write: reg: 0x48(REG_AWBC6), value = 0x3a
    I2C Write: reg: 0x59, value = 0x88
    I2C Write: reg: 0x5a, value = 0x88
    I2C Write: reg: 0x5b, value = 0x44
    I2C Write: reg: 0x5c, value = 0x67
    I2C Write: reg: 0x5d, value = 0x49
    I2C Write: reg: 0x5e, value = 0x0e
    I2C Write: reg: 0x6c(REG_AWBCTR3), value = 0x0a
    I2C Write: reg: 0x6d(REG_AWBCTR2), value = 0x55
    I2C Write: reg: 0x6e(REG_AWBCTR1), value = 0x11
    I2C Write: reg: 0x6f(REG_AWBCTR0), value = 0x9f
    I2C Write: reg: 0x6a(REG_GGAIN), value = 0x40
    I2C Write: reg: 0x01(REG_BLUE), value = 0x40
    I2C Write: reg: 0x02(REG_RED), value = 0x60
    I2C Write: reg: 0x13(REG_COM8), value = 0xe7
    I2C Write: reg: 0x4f(REG_MTX1), value = 0x80
    I2C Write: reg: 0x50(REG_MTX2), value = 0x80
    I2C Write: reg: 0x51(REG_MTX3), value = 0x00
    I2C Write: reg: 0x52(REG_MTX4), value = 0x22
    I2C Write: reg: 0x53(REG_MTX5), value = 0x5e
    I2C Write: reg: 0x54(REG_MTX6), value = 0x80
    I2C Write: reg: 0x58(REG_MTXS), value = 0x9e
    I2C Write: reg: 0x41(REG_COM16), value = 0x08
    I2C Write: reg: 0x3f(CLK_SCALE), value = 0x00
    I2C Write: reg: 0x75, value = 0x05
    I2C Write: reg: 0x76(REG_REG76), value = 0xe1
    I2C Write: reg: 0x4c(REG_DNSTH), value = 0x00
    I2C Write: reg: 0x77, value = 0x01
    I2C Write: reg: 0x3d(REG_COM13), value = 0xc3
    I2C Write: reg: 0x4b(REG_REG4B), value = 0x09
    I2C Write: reg: 0xc9(REG_SATCTR), value = 0x60
    I2C Write: reg: 0x41(REG_COM16), value = 0x38
    I2C Write: reg: 0x56(REG_CONTRAS), value = 0x40
    I2C Write: reg: 0x34(REG_ARBLM), value = 0x11
    I2C Write: reg: 0x3b(REG_COM11), value = 0x12
    I2C Write: reg: 0xa4, value = 0x88
    I2C Write: reg: 0x96, value = 0x00
    I2C Write: reg: 0x97, value = 0x30
    I2C Write: reg: 0x98, value = 0x20
    I2C Write: reg: 0x99, value = 0x30
    I2C Write: reg: 0x9a, value = 0x84
    I2C Write: reg: 0x9b, value = 0x29
    I2C Write: reg: 0x9c, value = 0x03
    I2C Write: reg: 0x9d, value = 0x4c
    I2C Write: reg: 0x9e, value = 0x3f
    I2C Write: reg: 0x78, value = 0x04
    I2C Write: reg: 0x79, value = 0x01
    I2C Write: reg: 0xc8, value = 0xf0
    I2C Write: reg: 0x79, value = 0x0f
    I2C Write: reg: 0xc8, value = 0x00
    I2C Write: reg: 0x79, value = 0x10
    I2C Write: reg: 0xc8, value = 0x7e
    I2C Write: reg: 0x79, value = 0x0a
    I2C Write: reg: 0xc8, value = 0x80
    I2C Write: reg: 0x79, value = 0x0b
    I2C Write: reg: 0xc8, value = 0x01
    I2C Write: reg: 0x79, value = 0x0c
    I2C Write: reg: 0xc8, value = 0x0f
    I2C Write: reg: 0x79, value = 0x0d
    I2C Write: reg: 0xc8, value = 0x20
    I2C Write: reg: 0x79, value = 0x09
    I2C Write: reg: 0xc8, value = 0x80
    I2C Write: reg: 0x79, value = 0x02
    I2C Write: reg: 0xc8, value = 0xc0
    I2C Write: reg: 0x79, value = 0x03
    I2C Write: reg: 0xc8, value = 0x40
    I2C Write: reg: 0x79, value = 0x05
    I2C Write: reg: 0xc8, value = 0x30
    I2C Write: reg: 0x79, value = 0x26
    I2C Read: reg: 0x1c(REG_MIDH), value = 0x7F
    
    I2C Read: reg: 0x1d(REG_MIDL), value = 0xA2
    
    I2C Read: reg: 0x0a(REG_PID), value = 0x76
    
    I2C Read: reg: 0x0b(REG_VER), value = 0x73
    
    I2C Write: reg: 0x12(REG_COM7), value = 0x80
    I2C Write: reg: 0x11(REG_CLKRC), value = 0x01
    I2C Write: reg: 0x3a(REG_TSLB), value = 0x04
    I2C Write: reg: 0x12(REG_COM7), value = 0x00
    I2C Write: reg: 0x17(REG_HSTART), value = 0x13
    I2C Write: reg: 0x18(REG_HSTOP), value = 0x01
    I2C Write: reg: 0x32(REG_HREF), value = 0xb6
    I2C Write: reg: 0x19(REG_VSTART), value = 0x02
    I2C Write: reg: 0x1a(REG_VSTOP), value = 0x7a
    I2C Write: reg: 0x03(REG_VREF), value = 0x0a
    I2C Write: reg: 0x0c(REG_COM3), value = 0x00
    I2C Write: reg: 0x3e(REG_COM14), value = 0x00
    I2C Write: reg: 0x70(REG_SCALING_XSC), value = 0x3a
    I2C Write: reg: 0x71(REG_SCALING_YSC), value = 0x35
    I2C Write: reg: 0x72(REG_SCALING_DCWCTR), value = 0x11
    I2C Write: reg: 0x73(REG_SCALING_PCLK_DIV), value = 0xf0
    I2C Write: reg: 0xa2(REG_SCALING_PCLK_DELAY), value = 0x02
    I2C Write: reg: 0x15(REG_COM10), value = 0x00
    I2C Write: reg: 0x7a(REG_SLOP), value = 0x20
    I2C Write: reg: 0x7b(REG_GAM_BASE), value = 0x10
    I2C Write: reg: 0x7c, value = 0x1e
    I2C Write: reg: 0x7d, value = 0x35
    I2C Write: reg: 0x7e, value = 0x5a
    I2C Write: reg: 0x7f, value = 0x69
    I2C Write: reg: 0x80(COM7_RESET), value = 0x76
    I2C Write: reg: 0x81, value = 0x80
    I2C Write: reg: 0x82, value = 0x88
    I2C Write: reg: 0x83, value = 0x8f
    I2C Write: reg: 0x84, value = 0x96
    I2C Write: reg: 0x85, value = 0xa3
    I2C Write: reg: 0x86, value = 0xaf
    I2C Write: reg: 0x87, value = 0xc4
    I2C Write: reg: 0x88, value = 0xd7
    I2C Write: reg: 0x89, value = 0xe8
    I2C Write: reg: 0x13(REG_COM8), value = 0xe0
    I2C Write: reg: 0x00(REG_GAIN), value = 0x00
    I2C Write: reg: 0x10(COM2_SSLEEP), value = 0x00
    I2C Write: reg: 0x0d(REG_COM4), value = 0x40
    I2C Write: reg: 0x14(REG_COM9), value = 0x18
    I2C Write: reg: 0xa5(REG_BD50MAX), value = 0x05
    I2C Write: reg: 0xab(REG_BD60MAX), value = 0x07
    I2C Write: reg: 0x24(REG_AEW), value = 0x95
    I2C Write: reg: 0x25(REG_AEB), value = 0x33
    I2C Write: reg: 0x26(REG_VPT), value = 0xe3
    I2C Write: reg: 0x9f(REG_HAECC1), value = 0x78
    I2C Write: reg: 0xa0(REG_HAECC2), value = 0x68
    I2C Write: reg: 0xa1, value = 0x03
    I2C Write: reg: 0xa6(REG_HAECC3), value = 0xd8
    I2C Write: reg: 0xa7(REG_HAECC4), value = 0xd8
    I2C Write: reg: 0xa8(REG_HAECC5), value = 0xf0
    I2C Write: reg: 0xa9(REG_HAECC6), value = 0x90
    I2C Write: reg: 0xaa(REG_HAECC7), value = 0x94
    I2C Write: reg: 0x13(REG_COM8), value = 0xe5
    I2C Write: reg: 0x0e(REG_COM5), value = 0x61
    I2C Write: reg: 0x0f(REG_COM6), value = 0x4b
    I2C Write: reg: 0x16, value = 0x02
    I2C Write: reg: 0x1e(REG_MVFP), value = 0x07
    I2C Write: reg: 0x21(REG_ADCCTR1), value = 0x02
    I2C Write: reg: 0x22(REG_ADCCTR2), value = 0x91
    I2C Write: reg: 0x29, value = 0x07
    I2C Write: reg: 0x33(REG_CHLF), value = 0x0b
    I2C Write: reg: 0x35, value = 0x0b
    I2C Write: reg: 0x37(REG_ADC), value = 0x1d
    I2C Write: reg: 0x38(COM7_SIZE_MASK), value = 0x71
    I2C Write: reg: 0x39(REG_OFON), value = 0x2a
    I2C Write: reg: 0x3c(REG_COM12), value = 0x78
    I2C Write: reg: 0x4d, value = 0x40
    I2C Write: reg: 0x4e, value = 0x20
    I2C Write: reg: 0x69(REG_GFIX), value = 0x00
    I2C Write: reg: 0x6b(REG_DBLV), value = 0x4a
    I2C Write: reg: 0x74(REG_REG74), value = 0x10
    I2C Write: reg: 0x8d, value = 0x4f
    I2C Write: reg: 0x8e, value = 0x00
    I2C Write: reg: 0x8f, value = 0x00
    I2C Write: reg: 0x90, value = 0x00
    I2C Write: reg: 0x91, value = 0x00
    I2C Write: reg: 0x96, value = 0x00
    I2C Write: reg: 0x9a, value = 0x00
    I2C Write: reg: 0xb0, value = 0x84
    I2C Write: reg: 0xb1(REG_ABLC1), value = 0x0c
    I2C Write: reg: 0xb2, value = 0x0e
    I2C Write: reg: 0xb3(REG_THL_ST), value = 0x82
    I2C Write: reg: 0xb8, value = 0x0a
    I2C Write: reg: 0x43(REG_AWBC1), value = 0x0a
    I2C Write: reg: 0x44(REG_AWBC2), value = 0xf0
    I2C Write: reg: 0x45(REG_AWBC3), value = 0x34
    I2C Write: reg: 0x46(REG_AWBC4), value = 0x58
    I2C Write: reg: 0x47(REG_AWBC5), value = 0x28
    I2C Write: reg: 0x48(REG_AWBC6), value = 0x3a
    I2C Write: reg: 0x59, value = 0x88
    I2C Write: reg: 0x5a, value = 0x88
    I2C Write: reg: 0x5b, value = 0x44
    I2C Write: reg: 0x5c, value = 0x67
    I2C Write: reg: 0x5d, value = 0x49
    I2C Write: reg: 0x5e, value = 0x0e
    I2C Write: reg: 0x6c(REG_AWBCTR3), value = 0x0a
    I2C Write: reg: 0x6d(REG_AWBCTR2), value = 0x55
    I2C Write: reg: 0x6e(REG_AWBCTR1), value = 0x11
    I2C Write: reg: 0x6f(REG_AWBCTR0), value = 0x9f
    I2C Write: reg: 0x6a(REG_GGAIN), value = 0x40
    I2C Write: reg: 0x01(REG_BLUE), value = 0x40
    I2C Write: reg: 0x02(REG_RED), value = 0x60
    I2C Write: reg: 0x13(REG_COM8), value = 0xe7
    I2C Write: reg: 0x4f(REG_MTX1), value = 0x80
    I2C Write: reg: 0x50(REG_MTX2), value = 0x80
    I2C Write: reg: 0x51(REG_MTX3), value = 0x00
    I2C Write: reg: 0x52(REG_MTX4), value = 0x22
    I2C Write: reg: 0x53(REG_MTX5), value = 0x5e
    I2C Write: reg: 0x54(REG_MTX6), value = 0x80
    I2C Write: reg: 0x58(REG_MTXS), value = 0x9e
    I2C Write: reg: 0x41(REG_COM16), value = 0x08
    I2C Write: reg: 0x3f(CLK_SCALE), value = 0x00
    I2C Write: reg: 0x75, value = 0x05
    I2C Write: reg: 0x76(REG_REG76), value = 0xe1
    I2C Write: reg: 0x4c(REG_DNSTH), value = 0x00
    I2C Write: reg: 0x77, value = 0x01
    I2C Write: reg: 0x3d(REG_COM13), value = 0xc3
    I2C Write: reg: 0x4b(REG_REG4B), value = 0x09
    I2C Write: reg: 0xc9(REG_SATCTR), value = 0x60
    I2C Write: reg: 0x41(REG_COM16), value = 0x38
    I2C Write: reg: 0x56(REG_CONTRAS), value = 0x40
    I2C Write: reg: 0x34(REG_ARBLM), value = 0x11
    I2C Write: reg: 0x3b(REG_COM11), value = 0x12
    I2C Write: reg: 0xa4, value = 0x88
    I2C Write: reg: 0x96, value = 0x00
    I2C Write: reg: 0x97, value = 0x30
    I2C Write: reg: 0x98, value = 0x20
    I2C Write: reg: 0x99, value = 0x30
    I2C Write: reg: 0x9a, value = 0x84
    I2C Write: reg: 0x9b, value = 0x29
    I2C Write: reg: 0x9c, value = 0x03
    I2C Write: reg: 0x9d, value = 0x4c
    I2C Write: reg: 0x9e, value = 0x3f
    I2C Write: reg: 0x78, value = 0x04
    I2C Write: reg: 0x79, value = 0x01
    I2C Write: reg: 0xc8, value = 0xf0
    I2C Write: reg: 0x79, value = 0x0f
    I2C Write: reg: 0xc8, value = 0x00
    I2C Write: reg: 0x79, value = 0x10
    I2C Write: reg: 0xc8, value = 0x7e
    I2C Write: reg: 0x79, value = 0x0a
    I2C Write: reg: 0xc8, value = 0x80
    I2C Write: reg: 0x79, value = 0x0b
    I2C Write: reg: 0xc8, value = 0x01
    I2C Write: reg: 0x79, value = 0x0c
    I2C Write: reg: 0xc8, value = 0x0f
    I2C Write: reg: 0x79, value = 0x0d
    I2C Write: reg: 0xc8, value = 0x20
    I2C Write: reg: 0x79, value = 0x09
    I2C Write: reg: 0xc8, value = 0x80
    I2C Write: reg: 0x79, value = 0x02
    I2C Write: reg: 0xc8, value = 0xc0
    I2C Write: reg: 0x79, value = 0x03
    I2C Write: reg: 0xc8, value = 0x40
    I2C Write: reg: 0x79, value = 0x05
    I2C Write: reg: 0xc8, value = 0x30
    I2C Write: reg: 0x79, value = 0x26
    I2C Write: reg: 0x12(REG_COM7), value = 0x04
    I2C Write: reg: 0x15(REG_COM10), value = 0x20
    I2C Write: reg: 0x8c(REG_RGB444), value = 0x00
    I2C Write: reg: 0x04(REG_COM1), value = 0x00
    I2C Write: reg: 0x40(COM1_R656), value = 0x10
    I2C Write: reg: 0x14(REG_COM9), value = 0x38
    I2C Write: reg: 0x4f(REG_MTX1), value = 0xb3
    I2C Write: reg: 0x50(REG_MTX2), value = 0xb3
    I2C Write: reg: 0x51(REG_MTX3), value = 0x00
    I2C Write: reg: 0x52(REG_MTX4), value = 0x3d
    I2C Write: reg: 0x53(REG_MTX5), value = 0xa7
    I2C Write: reg: 0x54(REG_MTX6), value = 0xe4
    I2C Write: reg: 0x3d(REG_COM13), value = 0xc0
    I2C Write: reg: 0x17(REG_HSTART), value = 0x13
    I2C Write: reg: 0x18(REG_HSTOP), value = 0x01
    I2C Read: reg: 0x32(REG_HREF), value = 0xB6
    
    I2C Write: reg: 0x32(REG_HREF), value = 0xb6
    I2C Write: reg: 0x19(REG_VSTART), value = 0x02
    I2C Write: reg: 0x1a(REG_VSTOP), value = 0x7a
    I2C Read: reg: 0x03(REG_VREF), value = 0xA
    
    I2C Write: reg: 0x03(REG_VREF), value = 0x0a
    I2C Write: reg: 0x11(REG_CLKRC), value = 0x00
    I2C Write: reg: 0x11(REG_CLKRC), value = 0x00
    I2C Write: reg: 0x6b(REG_DBLV), value = 0x4a
    I2C Write: reg: 0x11(REG_CLKRC), value = 0x03
    I2C Write: reg: 0x6b(REG_DBLV), value = 0x4a
    Camera settings:
    	width = 640
    	height = 480
    	bits per pixel = 16
    
    Send the 'c' character to read a frame ...
    Send the 'd' character to read a frame using DMA ...
    Send the 's' character to start/stop continuous display mode
    send the 'r' Show Camera register settings
    
    I2C Read: reg: 0x00(REG_GAIN), value = 0x7F
    I2C Read: reg: 0x01(REG_BLUE), value = 0xF0
    I2C Read: reg: 0x02(REG_RED), value = 0x40
    I2C Read: reg: 0x03(REG_VREF), value = 0xA
    I2C Read: reg: 0x04(REG_COM1), value = 0x0
    I2C Read: reg: 0x05(REG_BAVE), value = 0x50
    I2C Read: reg: 0x06(REG_GbAVE), value = 0x58
    I2C Read: reg: 0x07(REG_AECHH), value = 0x40
    I2C Read: reg: 0x08(REG_RAVE), value = 0x57
    I2C Read: reg: 0x09(REG_COM2), value = 0x1
    I2C Read: reg: 0x0a(REG_PID), value = 0x76
    I2C Read: reg: 0x0b(REG_VER), value = 0x73
    I2C Read: reg: 0x0c(REG_COM3), value = 0x0
    I2C Read: reg: 0x0d(REG_COM4), value = 0x40
    I2C Read: reg: 0x0e(REG_COM5), value = 0x61
    I2C Read: reg: 0x0f(REG_COM6), value = 0x4B
    I2C Read: reg: 0x10(COM2_SSLEEP), value = 0x7E
    I2C Read: reg: 0x11(REG_CLKRC), value = 0x3
    I2C Read: reg: 0x12(REG_COM7), value = 0x4
    I2C Read: reg: 0x13(REG_COM8), value = 0xE7
    I2C Read: reg: 0x14(REG_COM9), value = 0x38
    I2C Read: reg: 0x15(REG_COM10), value = 0x20
    I2C Read: reg: 0x16, value = 0x2
    I2C Read: reg: 0x17(REG_HSTART), value = 0x13
    I2C Read: reg: 0x18(REG_HSTOP), value = 0x1
    I2C Read: reg: 0x19(REG_VSTART), value = 0x2
    I2C Read: reg: 0x1a(REG_VSTOP), value = 0x7A
    I2C Read: reg: 0x1b(REG_PSHFT), value = 0x0
    I2C Read: reg: 0x1c(REG_MIDH), value = 0x7F
    I2C Read: reg: 0x1d(REG_MIDL), value = 0xA2
    I2C Read: reg: 0x1e(REG_MVFP), value = 0x7
    I2C Read: reg: 0x1f(REG_LAEC), value = 0x0
    I2C Read: reg: 0x20(COM7_SIZE_CIF), value = 0x4
    I2C Read: reg: 0x21(REG_ADCCTR1), value = 0x2
    I2C Read: reg: 0x22(REG_ADCCTR2), value = 0x91
    I2C Read: reg: 0x23(REG_ADCCTR3), value = 0x0
    I2C Read: reg: 0x24(REG_AEW), value = 0x95
    I2C Read: reg: 0x25(REG_AEB), value = 0x33
    I2C Read: reg: 0x26(REG_VPT), value = 0xE3
    I2C Read: reg: 0x27(REG_BBIAS), value = 0x80
    I2C Read: reg: 0x28(REG_GbBIAS), value = 0x80
    I2C Read: reg: 0x29, value = 0x7
    I2C Read: reg: 0x2a(REG_EXHCH), value = 0x0
    I2C Read: reg: 0x2b(REG_EXHCL), value = 0x0
    I2C Read: reg: 0x2c(REG_RBIAS), value = 0x80
    I2C Read: reg: 0x2d(REG_ADVFL), value = 0x0
    I2C Read: reg: 0x2e(REG_ADVFH), value = 0x0
    I2C Read: reg: 0x2f(REG_YAVE), value = 0x2D
    I2C Read: reg: 0x30(REG_HSYST), value = 0x8
    I2C Read: reg: 0x31(REG_HSYEN), value = 0x30
    I2C Read: reg: 0x32(REG_HREF), value = 0xB6
    I2C Read: reg: 0x33(REG_CHLF), value = 0xB
    I2C Read: reg: 0x34(REG_ARBLM), value = 0x11
    I2C Read: reg: 0x35, value = 0xB
    I2C Read: reg: 0x36, value = 0x0
    I2C Read: reg: 0x37(REG_ADC), value = 0x1D
    I2C Read: reg: 0x38(COM7_SIZE_MASK), value = 0x71
    I2C Read: reg: 0x39(REG_OFON), value = 0x2A
    I2C Read: reg: 0x3a(REG_TSLB), value = 0x4
    I2C Read: reg: 0x3b(REG_COM11), value = 0x12
    I2C Read: reg: 0x3c(REG_COM12), value = 0x78
    I2C Read: reg: 0x3d(REG_COM13), value = 0xC0
    I2C Read: reg: 0x3e(REG_COM14), value = 0x0
    I2C Read: reg: 0x3f(CLK_SCALE), value = 0x1
    I2C Read: reg: 0x40(COM1_R656), value = 0x10
    I2C Read: reg: 0x41(REG_COM16), value = 0x38
    I2C Read: reg: 0x42(REG_COM17), value = 0x0
    I2C Read: reg: 0x43(REG_AWBC1), value = 0xA
    I2C Read: reg: 0x44(REG_AWBC2), value = 0xF0
    I2C Read: reg: 0x45(REG_AWBC3), value = 0x34
    I2C Read: reg: 0x46(REG_AWBC4), value = 0x58
    I2C Read: reg: 0x47(REG_AWBC5), value = 0x28
    I2C Read: reg: 0x48(REG_AWBC6), value = 0x3A
    I2C Read: reg: 0x49, value = 0x0
    I2C Read: reg: 0x4a, value = 0x0
    I2C Read: reg: 0x4b(REG_REG4B), value = 0x9
    I2C Read: reg: 0x4c(REG_DNSTH), value = 0x20
    I2C Read: reg: 0x4d, value = 0x40
    I2C Read: reg: 0x4e, value = 0x20
    I2C Read: reg: 0x4f(REG_MTX1), value = 0xB3
    I2C Read: reg: 0x50(REG_MTX2), value = 0xB3
    I2C Read: reg: 0x51(REG_MTX3), value = 0x0
    I2C Read: reg: 0x52(REG_MTX4), value = 0x3D
    I2C Read: reg: 0x53(REG_MTX5), value = 0xA7
    I2C Read: reg: 0x54(REG_MTX6), value = 0xE4
    I2C Read: reg: 0x55(REG_BRIGHT), value = 0x0
    I2C Read: reg: 0x56(REG_CONTRAS), value = 0x40
    I2C Read: reg: 0x57(REG_CONTRAS_CENTER), value = 0x80
    I2C Read: reg: 0x58(REG_MTXS), value = 0x9E
    I2C Read: reg: 0x59, value = 0x88
    I2C Read: reg: 0x5a, value = 0x88
    I2C Read: reg: 0x5b, value = 0x44
    I2C Read: reg: 0x5c, value = 0x67
    I2C Read: reg: 0x5d, value = 0x49
    I2C Read: reg: 0x5e, value = 0xE
    I2C Read: reg: 0x5f, value = 0xF0
    I2C Read: reg: 0x60(COM11_NMFR), value = 0xF0
    I2C Read: reg: 0x61, value = 0xF0
    I2C Read: reg: 0x62(REG_LCC1), value = 0x0
    I2C Read: reg: 0x63(REG_LCC2), value = 0x0
    I2C Read: reg: 0x64(REG_LCC3), value = 0x50
    I2C Read: reg: 0x65(REG_LCC4), value = 0x30
    I2C Read: reg: 0x66(REG_LCC5), value = 0x0
    I2C Read: reg: 0x67(REG_MANU), value = 0x80
    I2C Read: reg: 0x68(REG_MANV), value = 0x80
    I2C Read: reg: 0x69(REG_GFIX), value = 0x0
    I2C Read: reg: 0x6a(REG_GGAIN), value = 0x5A
    I2C Read: reg: 0x6b(REG_DBLV), value = 0x4A
    I2C Read: reg: 0x6c(REG_AWBCTR3), value = 0xA
    I2C Read: reg: 0x6d(REG_AWBCTR2), value = 0x55
    I2C Read: reg: 0x6e(REG_AWBCTR1), value = 0x11
    I2C Read: reg: 0x6f(REG_AWBCTR0), value = 0x9F
    I2C Read: reg: 0x70(REG_SCALING_XSC), value = 0x3A
    I2C Read: reg: 0x71(REG_SCALING_YSC), value = 0x35
    I2C Read: reg: 0x72(REG_SCALING_DCWCTR), value = 0x11
    I2C Read: reg: 0x73(REG_SCALING_PCLK_DIV), value = 0xF0
    I2C Read: reg: 0x74(REG_REG74), value = 0x10
    I2C Read: reg: 0x75, value = 0x5
    I2C Read: reg: 0x76(REG_REG76), value = 0xE1
    I2C Read: reg: 0x77, value = 0x1
    I2C Read: reg: 0x78, value = 0x4
    I2C Read: reg: 0x79, value = 0x26
    I2C Read: reg: 0x7a(REG_SLOP), value = 0x20
    I2C Read: reg: 0x7b(REG_GAM_BASE), value = 0x10
    I2C Read: reg: 0x7c, value = 0x1E
    I2C Read: reg: 0x7d, value = 0x35
    I2C Read: reg: 0x7e, value = 0x5A
    I2C Read: reg: 0x7f, value = 0x69
    I2C Read: reg: 0x80(COM7_RESET), value = 0x76
    I2C Read: reg: 0x81, value = 0x80
    I2C Read: reg: 0x82, value = 0x88
    I2C Read: reg: 0x83, value = 0x8F
    I2C Read: reg: 0x84, value = 0x96
    I2C Read: reg: 0x85, value = 0xA3
    I2C Read: reg: 0x86, value = 0xAF
    I2C Read: reg: 0x87, value = 0xC4
    I2C Read: reg: 0x88, value = 0xD7
    I2C Read: reg: 0x89, value = 0xE8
    I2C Read: reg: 0x8a, value = 0x0
    I2C Read: reg: 0x8b, value = 0x0
    I2C Read: reg: 0x8c(REG_RGB444), value = 0x0
    I2C Read: reg: 0x8d, value = 0x4F
    I2C Read: reg: 0x8e, value = 0x0
    I2C Read: reg: 0x8f, value = 0x0
    I2C Read: reg: 0x90, value = 0x0
    I2C Read: reg: 0x91, value = 0x0
    I2C Read: reg: 0x92(REG_DM_LNL), value = 0x0
    I2C Read: reg: 0x93, value = 0x0
    I2C Read: reg: 0x94(REG_LCC6), value = 0x50
    I2C Read: reg: 0x95(REG_LCC7), value = 0x50
    I2C Read: reg: 0x96, value = 0x0
    I2C Read: reg: 0x97, value = 0x30
    I2C Read: reg: 0x98, value = 0x20
    I2C Read: reg: 0x99, value = 0x30
    I2C Read: reg: 0x9a, value = 0x84
    I2C Read: reg: 0x9b, value = 0x29
    I2C Read: reg: 0x9c, value = 0x3
    I2C Read: reg: 0x9d, value = 0x4C
    I2C Read: reg: 0x9e, value = 0x3F
    I2C Read: reg: 0x9f(REG_HAECC1), value = 0x78
    I2C Read: reg: 0xa0(REG_HAECC2), value = 0x68
    I2C Read: reg: 0xa1, value = 0x3
    I2C Read: reg: 0xa2(REG_SCALING_PCLK_DELAY), value = 0x2
    I2C Read: reg: 0xa3, value = 0x0
    I2C Read: reg: 0xa4, value = 0x88
    I2C Read: reg: 0xa5(REG_BD50MAX), value = 0x5
    I2C Read: reg: 0xa6(REG_HAECC3), value = 0xD8
    I2C Read: reg: 0xa7(REG_HAECC4), value = 0xD8
    I2C Read: reg: 0xa8(REG_HAECC5), value = 0xF0
    I2C Read: reg: 0xa9(REG_HAECC6), value = 0x90
    I2C Read: reg: 0xaa(REG_HAECC7), value = 0x94
    I2C Read: reg: 0xab(REG_BD60MAX), value = 0x7
    I2C Read: reg: 0xac, value = 0x0
    I2C Read: reg: 0xad, value = 0x80
    I2C Read: reg: 0xae, value = 0x80
    I2C Read: reg: 0xaf, value = 0x80
    I2C Read: reg: 0xb0, value = 0x84
    I2C Read: reg: 0xb1(REG_ABLC1), value = 0xC
    I2C Read: reg: 0xb2, value = 0xE
    I2C Read: reg: 0xb3(REG_THL_ST), value = 0x82
    I2C Read: reg: 0xb4, value = 0x0
    I2C Read: reg: 0xb5, value = 0x4
    I2C Read: reg: 0xb6, value = 0x0
    I2C Read: reg: 0xb7, value = 0x66
    I2C Read: reg: 0xb8, value = 0xA
    I2C Read: reg: 0xb9, value = 0x6
    I2C Read: reg: 0xba, value = 0x0
    I2C Read: reg: 0xbb, value = 0x0
    I2C Read: reg: 0xbc, value = 0x0
    I2C Read: reg: 0xbd, value = 0x0
    I2C Read: reg: 0xbe, value = 0x5
    I2C Read: reg: 0xbf, value = 0x5
    I2C Read: reg: 0xc0(COM15_RMASK), value = 0x44
    I2C Read: reg: 0xc1, value = 0x45
    I2C Read: reg: 0xc2, value = 0x0
    I2C Read: reg: 0xc3, value = 0x0
    I2C Read: reg: 0xc4, value = 0x0
    I2C Read: reg: 0xc5, value = 0x0
    I2C Read: reg: 0xc6, value = 0x0
    I2C Read: reg: 0xc7, value = 0x0
    I2C Read: reg: 0xc8, value = 0xE0
    I2C Read: reg: 0xc9(REG_SATCTR), value = 0x69
    I think I edited out all of the double line spacing from Terminal Monitor (CRLF issue). As TyCommander is currently not working well with the updated USB descriptor for Serial USB type.

  24. #149
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,909
    Morning again - tried to go back to sleep after I posted but no luck.

    Anyway, problem is when you go through the manuals each register has to be broken down into the various options. Still wondering about frame rates while trying to get an image. Are we getting good images from the sketch at all? or are they all corrupted?

  25. #150
    Senior Member
    Join Date
    Feb 2018
    Location
    Corvallis, OR
    Posts
    256
    Quote Originally Posted by mjs513 View Post
    @KurtE

    Ok did a quick hack to add in ability to change resolution and format in setup. I also coverted over to your sketch but I added in my additions Still can't get a decent image. Wonder if bytes reverse?
    If you have byte reversal, the image will look like a thermal sensor image with lots of bright red and green, but with the expected shapes.

    You can fix that by starting your bitmap upload offset by one byte. Instead of

    Serial.write(fb2, imagesize);

    do

    Serial.write(fb2+1, imagesize-1);

    If the image looks slanted, it is usually a problem with the HSTART and HSTOP settings.

    There is a function in the camera software to set the camera clock. If you suspect problems with noisy signals in the wiring, you can set the camera clock to 4MHz. I found that 3 or 4Mhz worked well with my plugboard prototype.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •