📄 ov7620.h
字号:
#ifndef _OV7620_H_
#define _OV7620_H_
#include "camif.h"
//const
unsigned char OV7620_YCbCr8bit[][2] =
{
// OMNI Vision
{0x12, 0x80}, // Camera Soft reset. Self cleared after reset.
{0x00, 0x00},
{0x01, 0x80}, // set blue gain
{0x02, 0x80}, // set red gain
{0x03, 0xb0},
{0x06, 0x60}, // set brightness
{0x0c, 0x24}, // set blue background
{0x0d, 0x24}, // set red background
{0x10, 0xff}, // set exposure time, brightness control
{0x11, 0x80}, // set frame rate CLK_input = PCLK
{0x13, 0x21}, // set 8 Bit YUV mode
{0x14, 0x94},
{0x16, 0x03}, //
{0x17, 0x2f}, //
{0x18, 0xcf}, // (207-47)*4 = 640
{0x19, 0x06}, //
{0x1a, 0xf5}, // ((244-5)+1)*2=480
{0x1b, 0x00},
{0x20, 0x00},
{0x21, 0x80},
{0x22, 0x80},
{0x23, 0x00},
{0x26, 0xa2},
{0x27, 0xea},
{0x29, 0x00},
{0x2a, 0x00},
{0x2b, 0x00},
{0x2c, 0x88},
{0x2e, 0x80},
{0x2f, 0x44},
{0x60, 0x27},
{0x61, 0x82},
{0x62, 0x5f},
{0x63, 0xd5},
{0x64, 0x57},
{0x65, 0x83},
{0x66, 0x55},
{0x68, 0xcf},
{0x69, 0x76},
{0x6a, 0x22},
{0x6b, 0x00},
{0x6c, 0x08},
{0x6d, 0x48},
{0x6e, 0x80},
{0x6f, 0x0c},
{0x70, 0x89},
{0x71, 0x00},
{0x72, 0x14},
{0x73, 0x54},
{0x75, 0x0e},
{0x76, 0x00},
{0x77, 0xff},
{0x78, 0x80},
{0x79, 0x80},
{0x7a, 0x80},
{0x7b, 0xe6},
{0x7c, 0x00},
{0x24, 0x10},
{0x25, 0x8a},
{0x28, 0x20},
{0x2d, 0x95},
{0x67, 0x92},
{0x74, 0x00},
{0x15, 0x41}, // inversed PCLK : falling edge to get data, 8 Bit -U-V- sequence....
{0x12, 0x34}, // enable AGC/AWB, mirror image. YUYV-must set at last..
};
unsigned char OV7620_YCbCr8bit_TV[][2] =
{
//#if (CIS_TYPE == CIS_OV7620)
#if (CIS_TYPE == CIS_OV7620)
// OMNI Vision
{0x12, 0x80}, // Camera Soft reset. Self cleared after reset.
{0x00, 0x00},
{0x01, 0x80}, // set blue gain
{0x02, 0x80}, // set red gain
{0x03, 0xb0},
{0x06, 0x60}, // set brightness
{0x0c, 0x24}, // set blue background
{0x0d, 0x24}, // set red background
{0x10, 0xff}, // set exposure time, brightness control
{0x11, 0x80}, // set frame rate CLK_input = PCLK
{0x13, 0x21}, // set 8 Bit YUV mode
{0x14, 0x94},
{0x16, 0x03}, //
{0x17, 0x2f}, //
{0x18, 0xcf}, // (207-47)*4 = 640
{0x19, 0x06}, //
{0x1a, 0xf5}, // ((244-5)+1)*2=480
{0x1b, 0x00},
{0x20, 0x00},
{0x21, 0x80},
{0x22, 0x80},
{0x23, 0x00},
{0x26, 0xa2},
{0x27, 0xea},
{0x29, 0x00},
{0x2a, 0x00},
{0x2b, 0x00},
{0x2c, 0x88},
{0x2e, 0x80},
{0x2f, 0x44},
{0x60, 0x27},
{0x61, 0x82},
{0x62, 0x5f},
{0x63, 0xd5},
{0x64, 0x57},
{0x65, 0x83},
{0x66, 0x55},
{0x68, 0xcf},
{0x69, 0x76},
{0x6a, 0x22},
{0x6b, 0x00},
{0x6c, 0x08},
{0x6d, 0x48},
{0x6e, 0x80},
{0x6f, 0x0c},
{0x70, 0x89},
{0x71, 0x00},
{0x72, 0x14},
{0x73, 0x54},
{0x75, 0x0e},
{0x76, 0x00},
{0x77, 0xff},
{0x78, 0x80},
{0x79, 0x80},
{0x7a, 0x80},
{0x7b, 0xe6},
{0x7c, 0x00},
{0x24, 0x10},
{0x25, 0x8a},
{0x28, 0x20},
{0x2d, 0x95},
{0x67, 0x92},
{0x74, 0x00},
{0x15, 0x41}, // inversed PCLK : falling edge to get data, 8 Bit -U-V- sequence....
{0x12, 0x34}, // enable AGC/AWB, mirror image. YUYV-must set at last..
#endif
#if (CIS_TYPE == CIS_OV7620_Rev36)
{0xec,0x00},
{0x02,0x00},
{0x14,0x60},
{0x15,0x60},
{0x16,0x60},
{0x1b,0x20},
{0x1c,0x20},
{0x1d,0x20},
{0x1e,0x20},
{0x72,0xde},
{0x73,0x00}, //11
{0x76,0x84}, //82
{0x77,0x90},
{0x78,0x6c},
{0x0a,0x02},
{0x34,0x0d},
{0x35,0x0a},
{0x36,0x05},
{0x37,0x05},
{0x38,0x06},
{0x39,0x08},
{0x3A,0x0d},
{0x3B,0x0d},
{0x3C,0x18},
{0x3D,0xE0},
{0x3E,0x20},
{0x66,0x02},
{0x6c,0x40},
{0x7c,0x01},
{0x0D,0x24},
{0x40,0x1B},
{0x41,0x4F},
{0x42,0x24},
{0x43,0x3E},
{0x44,0x32},
{0x45,0x30},
{0x48,0xa0},
{0x49,0xd0},
{0x4A,0x28},
{0x4B,0x7d},
{0x4C,0xd0},
{0x4D,0xe0},
{0x4E,0x1a},
{0x4F,0xa0},
{0x50,0xc0},
{0x51,0xc0},
{0x52,0x42},
{0x53,0x7e},
{0x54,0xc0},
{0x55,0xf0},
{0x56,0x1e},
{0x57,0xe0},
{0x58,0xc0},
{0x59,0xa0},
{0x5A,0x4a},
{0x5B,0x7e},
{0x5C,0xc0},
{0x5D,0xf0},
{0x5E,0x2a},
{0x5F,0x10},
{0x79,0x00},
{0x7a,0x00},
{0xe0,0x0f},
{0xe3,0x14},
{0xe5,0x48},
{0xe7,0x58},
//=============== page1 ===============//
{0xec,0x01},
{0x10,0x05},
{0x20,0xde},
{0x0b,0x06},
{0x30,0x00},
{0x31,0x00},
{0x32,0x00},
{0x24,0x28},
{0x25,0x3F},
{0x26,0x65},
{0x27,0xA1},
{0x28,0xFF},
{0x29,0x96},
{0x2A,0x85},
{0x2B,0xFF},
{0x2C,0x00},
{0x2D,0x1B},
{0xB0,0x28},
{0xB1,0x3F},
{0xB2,0x65},
{0xB3,0xA1},
{0xB4,0xFF},
{0xB5,0x96},
{0xB6,0x85},
{0xB7,0xFF},
{0xB8,0x00},
{0xB9,0x1B},
{0x15,0x15},
{0x18,0x85},
{0x1f,0x05},
{0x87,0x40},
{0x37,0x60},
{0x38,0xd5},
{0x48,0xa0},
{0x61,0x54},
{0x62,0x54},
{0x63,0x14},
{0x64,0x14},
{0x6d,0x12},
{0x78,0x09},
{0x79,0xD7},
{0x7A,0x14},
{0x7B,0xEE},
//=============== page2 ===============//
{0xec,0x02},
{0x2c,0x76},
{0x25,0x25},
{0x27,0x27},
{0x30,0x29},
{0x36,0x08},
{0x38,0x04},
//=============== page3 ===============//
{0xec,0x03},
{0x08,0x00},
{0x09,0x33},
//=============== page4 ===============//
{0xec,0x04},
{0x00,0x21},
{0x01,0x00},
{0x02,0x9d},
{0x03,0x02},
{0x04,0x04},
{0x05,0x00},
{0x06,0x1f},
{0x07,0x02},
{0x08,0x21},
{0x09,0x00},
{0x0a,0x9d},
{0x0b,0x02},
{0x0c,0x04},
{0x0d,0x00},
{0x0e,0x20},
{0x0f,0x02},
{0x1b,0x3c},
{0x1c,0x3c},
//=============== page5 ===============//
{0xec,0x05},
{0x1f,0x00},
{0x08,0x59},
{0x0a,0x71},
{0x1e,0x23},
{0x0e,0x3c},
//=============== page7 ===============//
{0xec,0x07},
{0x11,0xfe},
// added by junon
{0xec,0x01},
{0x10,0x26}, // 0x21-ITU-R656(CbYCrY), 0x25-ITU-R601(CbYCrY), 0x26-ITU-R601(YCrYCb)
#endif
};
#endif // _OV7620_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -