首页 OV9650寄存器配置详解

OV9650寄存器配置详解

举报
开通vip

OV9650寄存器配置详解------------------------------------------作者xxxx------------------------------------------日期xxxxOV9650寄存器配置详解【精品文档】【精品文档】【精品文档】【精品文档】【精品文档】【精品文档】OV9650寄存器配置之YUVSetting:*******************************************************************************VGAmode******...

OV9650寄存器配置详解
------------------------------------------作者xxxx------------------------------------------日期xxxxOV9650寄存器配置详解【精品文档】【精品文档】【精品文档】【精品文档】【精品文档】【精品文档】OV9650寄存器配置之YUVSetting:*******************************************************************************VGAmode*******************************************************************************write_SCCB(0x12,0x80);//CommonControl;Resetallregisterstodefaultvalueswrite_SCCB(0x11,0x81);//DataFormatandInternalClock;Enabledoubleclockoption,//meaningthemaximumPCLKcanbeashighasinputclock;//Internalclockpre-scalar=00001write_SCCB(0x6b,0x0a);//DBLV,Reservedwrite_SCCB(0x6a,0x3e);//ManualBandingFilterValue(effectiveonlywhenCOM11[0]ishigh)write_SCCB(0x3b,0x09);write_SCCB(0x13,0xe0);write_SCCB(0x01,0x80);write_SCCB(0x02,0x80);write_SCCB(0x00,0x00);write_SCCB(0x10,0x00);write_SCCB(0x13,0xe5);//write_SCCB(0x39,0x43);//50for30fpswrite_SCCB(0x38,0x12);//92for30fpswrite_SCCB(0x37,0x00);write_SCCB(0x35,0x91);//81for30fpswrite_SCCB(0x0e,0x20);write_SCCB(0x1e,0x04);//write_SCCB(0xa8,0x80);write_SCCB(0x12,0x40);write_SCCB(0x04,0x00);write_SCCB(0x0c,0x04);write_SCCB(0x0d,0x80);write_SCCB(0x18,0xc6);write_SCCB(0x17,0x26);write_SCCB(0x32,0xad);write_SCCB(0x03,0x00);write_SCCB(0x1a,0x3d);write_SCCB(0x19,0x01);write_SCCB(0x3f,0xa6);write_SCCB(0x14,0x2e);write_SCCB(0x15,0x02);write_SCCB(0x41,0x02);write_SCCB(0x42,0x08);//write_SCCB(0x1b,0x00);write_SCCB(0x16,0x06);write_SCCB(0x33,0xe2);//c0forinternalregulatorwrite_SCCB(0x34,0xbf);write_SCCB(0x96,0x04);write_SCCB(0x3a,0x00);write_SCCB(0x8e,0x00);//write_SCCB(0x3c,0x77);write_SCCB(0x8b,0x06);write_SCCB(0x94,0x88);write_SCCB(0x95,0x88);write_SCCB(0x40,0xc1);write_SCCB(0x29,0x3f);//2fforinternalregulatorwrite_SCCB(0x0f,0x42);//write_SCCB(0x3d,0x92);write_SCCB(0x69,0x40);write_SCCB(0x5c,0xb9);write_SCCB(0x5d,0x96);write_SCCB(0x5e,0x10);write_SCCB(0x59,0xc0);write_SCCB(0x5a,0xaf);write_SCCB(0x5b,0x55);write_SCCB(0x43,0xf0);write_SCCB(0x44,0x10);write_SCCB(0x45,0x68);write_SCCB(0x46,0x96);write_SCCB(0x47,0x60);write_SCCB(0x48,0x80);write_SCCB(0x5f,0xe0);write_SCCB(0x60,0x8c);//0cforadvancedAWB(relatedtolens)write_SCCB(0x61,0x20);write_SCCB(0xa5,0xd9);write_SCCB(0xa4,0x74);write_SCCB(0x8d,0x02);write_SCCB(0x13,0xe7);//write_SCCB(0x4f,0x3a);write_SCCB(0x50,0x3d);write_SCCB(0x51,0x03);write_SCCB(0x52,0x12);write_SCCB(0x53,0x26);write_SCCB(0x54,0x38);write_SCCB(0x55,0x40);write_SCCB(0x56,0x40);write_SCCB(0x57,0x40);write_SCCB(0x58,0x0d);//write_SCCB(0x8c,0x23);write_SCCB(0x3e,0x02);write_SCCB(0xa9,0xb8);write_SCCB(0xaa,0x92);write_SCCB(0xab,0x0a);//write_SCCB(0x8f,0xdf);write_SCCB(0x90,0x00);write_SCCB(0x91,0x00);write_SCCB(0x9f,0x00);write_SCCB(0xa0,0x00);write_SCCB(0x3a,0x01);//write_SCCB(0x24,0x70);write_SCCB(0x25,0x64);write_SCCB(0x26,0xc3);//write_SCCB(0x2a,0x00);//10for50Hz???//DummyPixelInsertMSB//Bit[6:4]:3MSBfordummypixelinsertinhorizontaldirection//Bit[3:2]:HSYNCfallingedgedelay2MSB//Bit[1:0]:HSYNCrisingedgedelay2MSBwrite_SCCB(0x2b,0x00);//40for50Hz???//DummyPixelInsertLSB//8LSBfordummypixelinsertinhorizontaldirection////gammawrite_SCCB(0x6c,0x40);//GSP;6C-7B:Gammacurve(Gamma曲线)write_SCCB(0x6d,0x30);write_SCCB(0x6e,0x4b);write_SCCB(0x6f,0x60);write_SCCB(0x70,0x70);write_SCCB(0x71,0x70);write_SCCB(0x72,0x70);write_SCCB(0x73,0x70);write_SCCB(0x74,0x60);write_SCCB(0x75,0x60);write_SCCB(0x76,0x50);write_SCCB(0x77,0x48);write_SCCB(0x78,0x3a);write_SCCB(0x79,0x2e);write_SCCB(0x7a,0x28);write_SCCB(0x7b,0x22);write_SCCB(0x7c,0x04);//GST;7C-8A:Gammacurvewrite_SCCB(0x7d,0x07);write_SCCB(0x7e,0x10);write_SCCB(0x7f,0x28);write_SCCB(0x80,0x36);write_SCCB(0x81,0x44);write_SCCB(0x82,0x52);write_SCCB(0x83,0x60);write_SCCB(0x84,0x6c);write_SCCB(0x85,0x78);write_SCCB(0x86,0x8c);write_SCCB(0x87,0x9e);write_SCCB(0x88,0xbb);write_SCCB(0x89,0xd2);write_SCCB(0x8a,0xe6);*******************************************************************************SXGAmode*******************************************************************************write_SCCB(0x12,0x80);//Resetallregisterstodefaultvalues;write_SCCB(0x11,0x80);//DataFormatandInternalClock;Enabledoubleclockoption,//meaningthemaximumPCLKcanbeashighasinputclock;//Internalclockpre-scalar=00000write_SCCB(0x6b,0x0a);//Reservedwrite_SCCB(0x6a,0x41);//ManualBandingFilterValue(effectiveonlywhenCOM11[0]ishigh)write_SCCB(0x3b,0x09);//lightmodedisable;//Averagecalculationwindowoption:Usehalfframe//Manualbandingfiltermode[COM11]write_SCCB(0x13,0xe0);//EnablefastAGC/AECalgorithm//UnlimitedAECstepsize//BandingfilterONwrite_SCCB(0x01,0x80);//AWB-Bluechannelgainsetting:80write_SCCB(0x02,0x80);//AWB-Redchannelgainsetting:80write_SCCB(0x00,0x00);//AGC[7:0]-Gaincontrolgainsetting:00write_SCCB(0x10,0x00);//ExposureValueAEC[9:2]:00write_SCCB(0x13,0xe5);//AGCenable;AECenable//write_SCCB(0x39,0x43);//50for15fps??//(Linebufferpowerdown-mustbesetto‘1’beforechippowerdown)write_SCCB(0x38,0x12);//93for15fps???//ACOM;Reservedwrite_SCCB(0x37,0x00);//ADC;Reservedwrite_SCCB(0x35,0x91);//81for15fps???//RSVD;Reservedwrite_SCCB(0x0e,0x20);//Mastermode//Bit[7]:systemclockselection.Ifthesystemclockis48MHz,thisbit//shouldbesettohightoget15fpsforYUVorRGBwrite_SCCB(0x1e,0x04);//Mirror/VFlipEnabe:Normalimage,VFlipdisable//write_SCCB(0xa8,0x80);//ACOM;Reservedwrite_SCCB(0x12,0x00);//COM7;SCCBRegisternochangewrite_SCCB(0x04,0x00);//COM1;donothing(HREFNoSkip)write_SCCB(0x0c,0x00);//COM3;donothingwrite_SCCB(0x0d,0x00);//COM4;Tri-stateforoutputclockanddataatpower-downperiodwrite_SCCB(0x18,0xbd);//HSTOP;Outputformat//HorizontalFrame(HREFcolumn)endhigh8-bit(low3bitsareatHREF[5:3])write_SCCB(0x17,0x1d);//HSTART;Outputformat//HorizontalFrame(HREFcolumn)endhigh8-bit(low3bitsareatHREF[2:0])write_SCCB(0x32,0xad);//HREFControl//Bit[7:6]:HREFedgeoffsettodataoutput//Bit[5:3]:HREFend3LSB(high8MSBatregisterHSTOP)//Bit[2:0]:HREFstart3LSB(high8MSBatregisterHSTART)write_SCCB(0x03,0x12);//VerticalFrameControl//Bit[7:6]:AGC[9:8](seeregisterGAINforAGC[7:0])//Bit[5:3]:VREFendlow3bits(high8bitsatVSTOP[7:0]//Bit[2:0]:VREFstartlow3bits(high8bitsatVSTRT[7:0]write_SCCB(0x1a,0x81);//VSTOP;OutputFormat//VerticalFrame(row)endhigh8-bit(low3bitsareatVREF[5:3])write_SCCB(0x19,0x01);//VSATRT;OutputFormat//VerticalFrame(row)starthigh8-bit(low3bitsareatVREF[2:0])write_SCCB(0x14,0x2e);//COM9;AutomaticGainCeiling-maximumAGCvalue:8x//Exposuretimingcanbelessthanlimitofbandingfilterwhenlightistostrong//Dataformat-VSYNCwilldropwhenframedatadrops//EnabledropframewhenAECstepislargerthantheExposureGapwrite_SCCB(0x15,0x00);//COM10;PCLKalwaysoutputwrite_SCCB(0x3f,0xa6);//EdgeEnhancementAdjustment//Bit[7:4]:Edgeenhancementthreshold[3:0]//(seeregisterCOM22[7:6}forEdgethreshold[5:4])//Bit[3:0]:Edgeenhancementfactorwrite_SCCB(0x41,0x02);//COM16;Colormatrixcoefficientdoubleoptionwrite_SCCB(0x42,0x08);//COM17;donothing//write_SCCB(0x1b,0x00);//DataFormat//PixelDelaySelect(delaystimingoftheD[9:0]datarelativetoHREFinpixelunits)//•Range:[00](nodelay)to[FF](256pixeldelaywhichaccountsforwholearray)write_SCCB(0x16,0x06);//Reservedwrite_SCCB(0x33,0xe2);//c0forinternalregulator???//Reservedwrite_SCCB(0x34,0xbf);//Reservedwrite_SCCB(0x96,0x04);//Reservedwrite_SCCB(0x3a,0x00);//LineBufferTestOption//UsenormalUVoutput//OutputsequenceisYUYV//DigitalBLCdisablewrite_SCCB(0x8e,0x00);//Reserved//write_SCCB(0x3c,0x77);//NoHREFwhenVREFislow//EnableUVaveragewrite_SCCB(0x8b,0x06);//Reservedwrite_SCCB(0x94,0x88);//Reservedwrite_SCCB(0x95,0x88);//Reservedwrite_SCCB(0x40,0xc1);//Dataformat-outputfullrangeenable:[00]to[FF]//RGB555/565option(mustsetCOM7[2]high):NormalRGBoutputwrite_SCCB(0x29,0x3f);//fforinternalregulator???//AnalogBLCandRegulatorControl//BypassAnalogBLC//Bypassregulatorwrite_SCCB(0x0f,0x42);//DisableHREFatopticalblack//Use4-channelADBLC//Resetalltimingwhenformatchanges//write_SCCB(0x3d,0x92);//GammausedforRawdatabeforeinterpolation//EnablecolormatrixforRGBorYUV//DelayUVchannel,outputUVdelay[2:0]=0x02write_SCCB(0x69,0x40);//HV,ManualBandingFilterMSB,donothingwrite_SCCB(0x5c,0xb9);//Reservedwrite_SCCB(0x5d,0x96);//Reservedwrite_SCCB(0x5e,0x10);//Reservedwrite_SCCB(0x59,0xc0);//Reservedwrite_SCCB(0x5a,0xaf);//Reservedwrite_SCCB(0x5b,0x55);//Reservedwrite_SCCB(0x43,0xf0);//Reservedwrite_SCCB(0x44,0x10);//Reservedwrite_SCCB(0x45,0x68);//Reservedwrite_SCCB(0x46,0x96);//Reservedwrite_SCCB(0x47,0x60);//Reservedwrite_SCCB(0x48,0x80);//Reservedwrite_SCCB(0x5f,0xe0);//Reservedwrite_SCCB(0x60,0x8c);//0cforadvancedAWB(Relatedtolens)???//Reservedwrite_SCCB(0x61,0x20);//Reservedwrite_SCCB(0xa5,0xd9);//Reservedwrite_SCCB(0xa4,0x74);//Reservedwrite_SCCB(0x8d,0x02);//Colorgainoptin:Digitalwrite_SCCB(0x13,0xe7);//EnablefastAGC/AECalgorithm//AEC-Stepsizelimit:Unlimitedstepsize//BandingfilterON//AGCenable;AWBenable;AECenable//write_SCCB(0x4f,0x3a);//MatrixCoefficient1write_SCCB(0x50,0x3d);//MatrixCoefficient2write_SCCB(0x51,0x03);//MatrixCoefficient3write_SCCB(0x52,0x12);//MatrixCoefficient4write_SCCB(0x53,0x26);//MatrixCoefficient5write_SCCB(0x54,0x38);//MatrixCoefficient6write_SCCB(0x55,0x40);//MatrixCoefficient7write_SCCB(0x56,0x40);//MatrixCoefficient8write_SCCB(0x57,0x40);//MatrixCoefficient9write_SCCB(0x58,0x0d);//MatrixCoefficientSignforcoefficient9to2//write_SCCB(0x8c,0x23);//Edgeenhancementthreshold[5:4]//(seeregisterEDGE[7:4]forEdgethreshold[3:0])//De-noiseenable(去噪)//White-pixeleraseenable//White-pixeleraseoption:bit[0]=1write_SCCB(0x3e,0x02);//EnableedgeenhancementforYUVoutput//(effectiveonlyforYUV/RGB,nouseforRawdata)//Edgeenhancementfactor=EDGE[3:0]write_SCCB(0xa9,0xb8);//Reservedwrite_SCCB(0xaa,0x92);//Reservedwrite_SCCB(0xab,0x0a);//Nothisregister!!!//write_SCCB(0x8f,0xdf);//Bit[3]:DigitalBLCBoffsetsign//Bit[2]:DigitalBLCRoffsetsign//Bit[1]:DigitalBLCGboffsetsign//Bit[0]:DigitalBLCGroffsetsignwrite_SCCB(0x90,0x00);//DigitalBLCBChannelOffsetValue[7:0]=0x00write_SCCB(0x91,0x00);//DigitalBLCRchanneloffsetvalueBit[7:0]=0x00write_SCCB(0x9f,0x00);//DigitalBLCGbchanneloffsetvalueBit[7:0]=0x00write_SCCB(0xa0,0x00);//DigitalBLCGrchanneloffsetvalueBit[7:0]=0x00write_SCCB(0x3a,0x01);//DigitalBLCenable//write_SCCB(0x24,0x70);//AGC/AEC-StableOperatingRegion(UpperLimit)write_SCCB(0x25,0x64);//AGC/AEC-StableOperatingRegion(LowerLimit)write_SCCB(0x26,0xc3);//AGC/AECFastModeOperatingRegion//Bit[7:4]:Highnibbleofupperlimit//Bit[3:0]:Highnibbleoflowerlimit//write_SCCB(0x2a,0x00);//10for50Hz???//DummyPixelInsertMSB//Bit[6:4]:3MSBfordummypixelinsertinhorizontaldirection//Bit[3:2]:HSYNCfallingedgedelay2MSB//Bit[1:0]:HSYNCrisingedgedelay2MSBwrite_SCCB(0x2b,0x00);//34for50Hz???//DummyPixelInsertLSB//8LSBfordummypixelinsertinhorizontaldirection////gammawrite_SCCB(0x6c,0x40);//GSP;6C-7B:Gammacurve(Gamma曲线)write_SCCB(0x6d,0x30);write_SCCB(0x6e,0x4b);write_SCCB(0x6f,0x60);write_SCCB(0x70,0x70);write_SCCB(0x71,0x70);write_SCCB(0x72,0x70);write_SCCB(0x73,0x70);write_SCCB(0x74,0x60);write_SCCB(0x75,0x60);write_SCCB(0x76,0x50);write_SCCB(0x77,0x48);write_SCCB(0x78,0x3a);write_SCCB(0x79,0x2e);write_SCCB(0x7a,0x28);write_SCCB(0x7b,0x22);write_SCCB(0x7c,0x04);//GST;7C-8A:Gammacurvewrite_SCCB(0x7d,0x07);write_SCCB(0x7e,0x10);write_SCCB(0x7f,0x28);write_SCCB(0x80,0x36);write_SCCB(0x81,0x44);write_SCCB(0x82,0x52);write_SCCB(0x83,0x60);write_SCCB(0x84,0x6c);write_SCCB(0x85,0x78);write_SCCB(0x86,0x8c);write_SCCB(0x87,0x9e);write_SCCB(0x88,0xbb);write_SCCB(0x89,0xd2);write_SCCB(0x8a,0xe6);*******************************************************************************VGAchangetoSXGA*******************************************************************************write_SCCB(0x11,0x80);write_SCCB(0x12,0x00);write_SCCB(0x0c,0x00);write_SCCB(0x0d,0x00);write_SCCB(0x18,0xbe);write_SCCB(0x17,0x1e);write_SCCB(0x32,0xbf);write_SCCB(0x03,0x12);write_SCCB(0x1a,0x81);write_SCCB(0x19,0x01);write_SCCB(0x2a,0x10);//24Mclockwrite_SCCB(0x2b,0x34);//24Mclockwrite_SCCB(0x6a,0x41);//24Mclock*******************************************************************************SXGAchangetoVGA*******************************************************************************write_SCCB(0x11,0x81);write_SCCB(0x12,0x40);write_SCCB(0x0c,0x04);write_SCCB(0x0d,0x80);write_SCCB(0x18,0xc7);write_SCCB(0x17,0x27);write_SCCB(0x32,0xad);write_SCCB(0x03,0x00);write_SCCB(0x1a,0x3d);write_SCCB(0x19,0x01);write_SCCB(0x6a,0x3e);write_SCCB(0x11,0x81);//for24Mclockwrite_SCCB(0x2a,0x10);//for24Mclockwrite_SCCB(0x2b,0x40);//for24Mclock
本文档为【OV9650寄存器配置详解】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
个人认证用户
ice
我是一线教师,教学生涯也有数十年 教学经验丰厚,原创文档也有很多 想和大家分享
格式:doc
大小:183KB
软件:Word
页数:0
分类:
上传时间:2021-10-15
浏览量:9