本文主要是介绍ov2640 svga 配置,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
//MCLK 24Mhz, SVGA RGB565 output 25fps
SCCB_slave_address = 0x60;
write_SCCB(0xff, 0x01);
write_SCCB(0x12, 0x80);//com7 0x80 SRET init all reg
delay(5ms);
write_SCCB(0xff, 0x00);//------------------------------------00-----------------
write_SCCB(0x2c, 0xff);
write_SCCB(0x2e, 0xdf);
write_SCCB(0xff, 0x01);//------------------------------------01-----------------
write_SCCB(0x3c, 0x32);
//
write_SCCB(0x11, 0x00);//clkrc
write_SCCB(0x09, 0x02);//com2
write_SCCB(0x04, 0x28);//reg04
write_SCCB(0x13, 0xe5);//com8
write_SCCB(0x14, 0x48);//com9 agc gain ceiling
write_SCCB(0x2c, 0x0c);
write_SCCB(0x33, 0x78);
write_SCCB(0x3a, 0x33);
write_SCCB(0x3b, 0xfB);
//
write_SCCB(0x3e, 0x00);
write_SCCB(0x43, 0x11);
write_SCCB(0x16, 0x10);
//
write_SCCB(0x39, 0x92);
//
write_SCCB(0x35, 0xda);
write_SCCB(0x22, 0x1a);
write_SCCB(0x37, 0xc3);
write_SCCB(0x23, 0x00);
write_SCCB(0x34, 0xc0);//arcom2
write_SCCB(0x36, 0x1a);
write_SCCB(0x06, 0x88);
write_SCCB(0x07, 0xc0);
write_SCCB(0x0d, 0x87);
write_SCCB(0x0e, 0x41);
write_SCCB(0x4c, 0x00);
write_SCCB(0x48, 0x00);//com19
write_SCCB(0x5B, 0x00);//
write_SCCB(0x42, 0x03);
//
write_SCCB(0x4a, 0x81);
write_SCCB(0x21, 0x99);
//
write_SCCB(0x24, 0x40);//aew
write_SCCB(0x25, 0x38);//aeb
write_SCCB(0x26, 0x82);//vv
write_SCCB(0x5c, 0x00);//
write_SCCB(0x63, 0x00);
write_SCCB(0x46, 0x22);//FL_L
write_SCCB(0x0c, 0x3c);//com3
//
write_SCCB(0x61, 0x70);//histo
write_SCCB(0x62, 0x80);//histo
write_SCCB(0x7c, 0x05);
//
write_SCCB(0x20, 0x80);
write_SCCB(0x28, 0x30);
write_SCCB(0x6c, 0x00);
write_SCCB(0x6d, 0x80);
write_SCCB(0x6e, 0x00);
write_SCCB(0x70, 0x02);
write_SCCB(0x71, 0x94);
write_SCCB(0x73, 0xc1);
//
write_SCCB(0x12, 0x40);//com7 svga
write_SCCB(0x17, 0x11);//href_st
write_SCCB(0x18, 0x43);//href_end
write_SCCB(0x19, 0x00);//vstrt
write_SCCB(0x1a, 0x4b);//vend
write_SCCB(0x32, 0x09);//reg32
write_SCCB(0x37, 0xc0);
write_SCCB(0x4f, 0xca);//bd50
write_SCCB(0x50, 0xa8);//bd60
write_SCCB(0x5a, 0x23);
write_SCCB(0x6d, 0x00);
write_SCCB(0x3d, 0x38);
//
write_SCCB(0xff, 0x00);//---------------------------------------------00----------------
write_SCCB(0xe5, 0x7f);
write_SCCB(0xf9, 0xc0);//mc_bist
write_SCCB(0x41, 0x24);
write_SCCB(0xe0, 0x14);//reset jpeg dvp
write_SCCB(0x76, 0xff);
write_SCCB(0x33, 0xa0);
write_SCCB(0x42, 0x20);
write_SCCB(0x43, 0x18);
write_SCCB(0x4c, 0x00);
write_SCCB(0x87, 0xd5);//ctrl3
write_SCCB(0x88, 0x3f);
write_SCCB(0xd7, 0x03);
write_SCCB(0xd9, 0x10);
write_SCCB(0xd3, 0x82);//r_dvp_sp
//
write_SCCB(0xc8, 0x08);//
write_SCCB(0xc9, 0x80);
//
write_SCCB(0x7c, 0x00);//bpaddr
write_SCCB(0x7d, 0x00);
write_SCCB(0x7c, 0x03);
write_SCCB(0x7d, 0x48);
write_SCCB(0x7d, 0x48);
write_SCCB(0x7c, 0x08);
write_SCCB(0x7d, 0x20);
write_SCCB(0x7d, 0x10);
write_SCCB(0x7d, 0x0e);
//
write_SCCB(0x90, 0x00);
write_SCCB(0x91, 0x0e);
write_SCCB(0x91, 0x1a);
write_SCCB(0x91, 0x31);
write_SCCB(0x91, 0x5a);
write_SCCB(0x91, 0x69);
write_SCCB(0x91, 0x75);
write_SCCB(0x91, 0x7e);
write_SCCB(0x91, 0x88);
write_SCCB(0x91, 0x8f);
write_SCCB(0x91, 0x96);
write_SCCB(0x91, 0xa3);
write_SCCB(0x91, 0xaf);
write_SCCB(0x91, 0xc4);
write_SCCB(0x91, 0xd7);
write_SCCB(0x91, 0xe8);
write_SCCB(0x91, 0x20);
//
write_SCCB(0x92, 0x00);
write_SCCB(0x93, 0x06);
write_SCCB(0x93, 0xe3);
write_SCCB(0x93, 0x05);
write_SCCB(0x93, 0x05);
write_SCCB(0x93, 0x00);
write_SCCB(0x93, 0x04);
write_SCCB(0x93, 0x00);
write_SCCB(0x93, 0x00);
write_SCCB(0x93, 0x00);
write_SCCB(0x93, 0x00);
write_SCCB(0x93, 0x00);
write_SCCB(0x93, 0x00);
write_SCCB(0x93, 0x00);
//
write_SCCB(0x96, 0x00);
write_SCCB(0x97, 0x08);
write_SCCB(0x97, 0x19);
write_SCCB(0x97, 0x02);
write_SCCB(0x97, 0x0c);
write_SCCB(0x97, 0x24);
write_SCCB(0x97, 0x30);
write_SCCB(0x97, 0x28);
write_SCCB(0x97, 0x26);
write_SCCB(0x97, 0x02);
write_SCCB(0x97, 0x98);
write_SCCB(0x97, 0x80);
write_SCCB(0x97, 0x00);
write_SCCB(0x97, 0x00);
//
write_SCCB(0xc3, 0xed);//ctrl1
write_SCCB(0xa4, 0x00);
write_SCCB(0xa8, 0x00);
write_SCCB(0xc5, 0x11);
write_SCCB(0xc6, 0x51);
write_SCCB(0xbf, 0x80);
write_SCCB(0xc7, 0x10);
write_SCCB(0xb6, 0x66);
write_SCCB(0xb8, 0xA5);
write_SCCB(0xb7, 0x64);
write_SCCB(0xb9, 0x7C);
write_SCCB(0xb3, 0xaf);
write_SCCB(0xb4, 0x97);
write_SCCB(0xb5, 0xFF);
write_SCCB(0xb0, 0xC5);
write_SCCB(0xb1, 0x94);
write_SCCB(0xb2, 0x0f);
write_SCCB(0xc4, 0x5c);
//
write_SCCB(0xc0, 0x64);//hszie / 8
write_SCCB(0xc1, 0x4B);//vsize / 8
write_SCCB(0x8c, 0x00);
write_SCCB(0x86, 0x3D);//ctrl2
write_SCCB(0x50, 0x00);//ctrli
write_SCCB(0x51, 0xC8);//real H/4
write_SCCB(0x52, 0x96);//real v/4
write_SCCB(0x53, 0x00);//offx
write_SCCB(0x54, 0x00);//offy
write_SCCB(0x55, 0x00);
write_SCCB(0x5a, 0xC8);//outw /4
write_SCCB(0x5b, 0x96);//outh /4
write_SCCB(0x5c, 0x00);
write_SCCB(0xd3, 0x82);//r_dvp_sp
//
write_SCCB(0xc3, 0xed);//ctrl1
write_SCCB(0x7f, 0x00);//
//
write_SCCB(0xda, 0x08);//imag mode rgb565
//
write_SCCB(0xe5, 0x1f);//
write_SCCB(0xe1, 0x67);//
write_SCCB(0xe0, 0x00);//reset
write_SCCB(0xdd, 0x7f);//
write_SCCB(0x05, 0x00);//by_pass
这篇关于ov2640 svga 配置的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!