欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

调试ov5640的驱动,那个急可为何会出现这样的画面

更新时间: 2014-01-05 03:19:30 责任编辑: Author_N1

 

调试OV5640的驱动,那个急啊,可为什么会出现这样的画面?


[@blueskycoco] [@saqula]  [@zhengmeifu]  [@HuaiShuShuV]

代码如下:

void OV5640_init(void)
{
long delay_time;

//15fps VGA YUV output 
// 24MHz input clock, 24MHz PCLK
//software reset
sensor_write(0x3103, 0x11); // system clock from pad, bit[1]
sensor_write(0x3008, 0x82); // software reset, bit[7]
for(delay_time = 0; delay_time < 0x4FFFD; delay_time++)
asm("nop;");//复位需要延时5ms
sensor_write(0x3008, 0x42); // software power down, bit[6]
sensor_write(0x3103, 0x03); // system clock from PLL, bit[1]
sensor_write(0x3017, 0xff); // FREX, Vsync, HREF, PCLK, D[9:6] output enable
sensor_write(0x3018, 0xff); // D[5:0], GPIO[1:0] output enable
sensor_write(0x3034, 0x1a); // MIPI 10-bit
sensor_write(0x3037, 0x13); // PLL root divider, bit[4], PLL pre-divider, bit[3:0]
sensor_write(0x3108, 0x01); // PCLK root divider, bit[5:4], SCLK2x root divider, bit[3:2]
// SCLK root divider, bit[1:0]
sensor_write(0x3630, 0x36);
sensor_write(0x3631, 0x0e);
sensor_write(0x3632, 0xe2);
sensor_write(0x3633, 0x12);
sensor_write(0x3621, 0xe0);
sensor_write(0x3704, 0xa0);
sensor_write(0x3703, 0x5a);
sensor_write(0x3715, 0x78);
sensor_write(0x3717, 0x01);
sensor_write(0x370b, 0x60);
sensor_write(0x3705, 0x1a);
sensor_write(0x3905, 0x02);
sensor_write(0x3906, 0x10);
sensor_write(0x3901, 0x0a);
sensor_write(0x3731, 0x12);
sensor_write(0x3600, 0x08); // VCM control
sensor_write(0x3601, 0x33); // VCM control
sensor_write(0x302d, 0x60); // system control
sensor_write(0x3620, 0x52);
sensor_write(0x371b, 0x20);
sensor_write(0x471c, 0x50);
sensor_write(0x3a13, 0x43); // pre-gain = 1.047x
sensor_write(0x3a18, 0x00); // gain ceiling
sensor_write(0x3a19, 0xf8); // gain ceiling = 15.5x
sensor_write(0x3635, 0x13);
sensor_write(0x3636, 0x03);
sensor_write(0x3634, 0x40);

sensor_write(0x3622, 0x01);
// 50/60Hz detection     50/60Hz 灯光条纹过滤
上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-01-05 03:19:30
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/20797/
本文WWW.DOC100.NET DOC100.NET版权所有。