完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
`使用OV7670采集图片在2.8存TFT LCD上显示的,运行第一次时出现花屏,运行第二次才会出现图像,图像由暗慢慢变亮,整体稳定后图片基本可以看清,但背景会有红色像素干扰。我是用DSP做的图像采集,以前采集过图像很清晰的,因为引脚分配问题换了引脚后得到的图像就是这样了,我已经做了转接板了,应该不是线干扰的问题,在想是不是寄存器配置问题,但这个配置和以前配置的一样啊,很是脑壳痛! 希望各位大佬帮忙解决一下这个问题,拜托啦!以下两幅图分别是第一次和第二次运行时的图片 以下是我的OV7670初始化配置: void set_Cmos7670reg(void) { WrCmos7670(0x3a, 0x04); WrCmos7670(0x3a, 0x04); WrCmos7670(0x40, 0x10); WrCmos7670(0x12, 0x14); WrCmos7670(0x32, 0x80); WrCmos7670(0x17, 0x17); WrCmos7670(0x18, 0x05); WrCmos7670(0x19, 0x02); WrCmos7670(0x1a, 0x7b);//0x7a, WrCmos7670(0x03, 0x0a);//0x0a, WrCmos7670(0x0c, 0x0c); WrCmos7670(0x3e, 0x00);// WrCmos7670(0x70, 0x00); WrCmos7670(0x71, 0x01); WrCmos7670(0x72, 0x11); WrCmos7670(0x73, 0x09);// WrCmos7670(0xa2, 0x02); WrCmos7670(0x11, 0x00); WrCmos7670(0x7a, 0x20); WrCmos7670(0x7b, 0x1c); WrCmos7670(0x7c, 0x28); WrCmos7670(0x7d, 0x3c); WrCmos7670(0x7e, 0x55); WrCmos7670(0x7f, 0x68); WrCmos7670(0x80, 0x76); WrCmos7670(0x81, 0x80); WrCmos7670(0x82, 0x88); WrCmos7670(0x83, 0x8f); WrCmos7670(0x84, 0x96); WrCmos7670(0x85, 0xa3); WrCmos7670(0x86, 0xaf); WrCmos7670(0x87, 0xc4); WrCmos7670(0x88, 0xd7); WrCmos7670(0x89, 0xe8); WrCmos7670(0x13, 0xe0); WrCmos7670(0x00, 0x00); WrCmos7670(0x10, 0x00); WrCmos7670(0x0d, 0x00); WrCmos7670(0x14, 0x38); WrCmos7670(0xa5, 0x05); WrCmos7670(0xab, 0x07); WrCmos7670(0x24, 0x75); WrCmos7670(0x25, 0x63); WrCmos7670(0x26, 0xA5); WrCmos7670(0x9f, 0x78); WrCmos7670(0xa0, 0x68); WrCmos7670(0xa1, 0x03);//0x0b, WrCmos7670(0xa6, 0xdf);//0xd8, WrCmos7670(0xa7, 0xdf);//0xd8, WrCmos7670(0xa8, 0xf0); WrCmos7670(0xa9, 0x90); WrCmos7670(0xaa, 0x94); WrCmos7670(0x13, 0xe5); WrCmos7670(0x0e, 0x61); WrCmos7670(0x0f, 0x4b); WrCmos7670(0x16, 0x02); WrCmos7670(0x1e, 0x27);//0x07, WrCmos7670(0x21, 0x02); WrCmos7670(0x22, 0x91); WrCmos7670(0x29, 0x07); WrCmos7670(0x33, 0x0b); WrCmos7670(0x35, 0x0b); WrCmos7670(0x37, 0x1d); WrCmos7670(0x38, 0x71); WrCmos7670(0x39, 0x2a); WrCmos7670(0x3c, 0x78); WrCmos7670(0x4d, 0x40); WrCmos7670(0x4e, 0x20); WrCmos7670(0x69, 0x5d); WrCmos7670(0x6b, 0x40);//设置PLL,0x40:4倍 0x80:6倍 0xc0:8倍 WrCmos7670(0x74, 0x19); WrCmos7670(0x8d, 0x4f); WrCmos7670(0x8e, 0x00); WrCmos7670(0x8f, 0x00); WrCmos7670(0x90, 0x00); WrCmos7670(0x91, 0x00); WrCmos7670(0x92, 0x00);//0x19,//0x66 WrCmos7670(0x96, 0x00); WrCmos7670(0x9a, 0x80); WrCmos7670(0xb0, 0x84); WrCmos7670(0xb1, 0x0c); WrCmos7670(0xb2, 0x0e); WrCmos7670(0xb3, 0x82); WrCmos7670(0xb8, 0x0a); WrCmos7670(0x43, 0x14); WrCmos7670(0x44, 0xf0); WrCmos7670(0x45, 0x34); WrCmos7670(0x46, 0x58); WrCmos7670(0x47, 0x28); WrCmos7670(0x48, 0x3a); WrCmos7670(0x59, 0x88); WrCmos7670(0x5a, 0x88); WrCmos7670(0x5b, 0x44); WrCmos7670(0x5c, 0x67); WrCmos7670(0x5d, 0x49); WrCmos7670(0x5e, 0x0e); WrCmos7670(0x64, 0x04); WrCmos7670(0x65, 0x20); WrCmos7670(0x66, 0x05); WrCmos7670(0x94, 0x04); WrCmos7670(0x95, 0x08); WrCmos7670(0x6c, 0x0a); WrCmos7670(0x6d, 0x55); WrCmos7670(0x6e, 0x11); WrCmos7670(0x6f, 0x9f); WrCmos7670(0x6a, 0x40); //(0x01, 0x60), //(0x02, 0x60), WrCmos7670(0x13, 0xe7); WrCmos7670(0x15, 0x00); WrCmos7670(0x4f, 0x80); WrCmos7670(0x50, 0x80); WrCmos7670(0x51, 0x00); WrCmos7670(0x52, 0x22); WrCmos7670(0x53, 0x5e); WrCmos7670(0x54, 0x80); WrCmos7670(0x55, 0x30); //亮度 0x00 WrCmos7670(0x56, 0x60); //对比度 WrCmos7670(0x57, 0x90); WrCmos7670(0x58, 0x9e); WrCmos7670(0x41, 0x08); WrCmos7670(0x3f, 0x05);//边缘增强调整 WrCmos7670(0x75, 0x05); WrCmos7670(0x76, 0xe1); WrCmos7670(0x4c, 0x0F);//噪声抑制强度 WrCmos7670(0x77, 0x0a); WrCmos7670(0x3d, 0xc2); //0xc0, WrCmos7670(0x4b, 0x09); WrCmos7670(0xc9, 0xc8); WrCmos7670(0x41, 0x38); WrCmos7670(0x34, 0x11); WrCmos7670(0x3b, 0x02);//0x00,//0x02, WrCmos7670(0xa4, 0x89);//0x88, WrCmos7670(0x96, 0x00); WrCmos7670(0x97, 0x30); WrCmos7670(0x98, 0x20); WrCmos7670(0x99, 0x30); WrCmos7670(0x9a, 0x84); WrCmos7670(0x9b, 0x29); WrCmos7670(0x9c, 0x03); WrCmos7670(0x9d, 0x4c); WrCmos7670(0x9e, 0x3f); WrCmos7670(0x78, 0x04); WrCmos7670(0x79, 0x01); WrCmos7670(0xc8, 0xf0); WrCmos7670(0x79, 0x0f); WrCmos7670(0xc8, 0x00); WrCmos7670(0x79, 0x10); WrCmos7670(0xc8, 0x7e); WrCmos7670(0x79, 0x0a); WrCmos7670(0xc8, 0x80); WrCmos7670(0x79, 0x0b); WrCmos7670(0xc8, 0x01); WrCmos7670(0x79, 0x0c); WrCmos7670(0xc8, 0x0f); WrCmos7670(0x79, 0x0d); WrCmos7670(0xc8, 0x20); WrCmos7670(0x79, 0x09); WrCmos7670(0xc8, 0x80); WrCmos7670(0x79, 0x02); WrCmos7670(0xc8, 0xc0); WrCmos7670(0x79, 0x03); WrCmos7670(0xc8, 0x40); WrCmos7670(0x79, 0x05); WrCmos7670(0xc8, 0x30); WrCmos7670(0x69, 0xaa);// WrCmos7670(0x09, 0x00); WrCmos7670(0x3b, 0x42); WrCmos7670(0x2d, 0x01); } ` |
|
相关推荐 |
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于 DSP5509 进行数字图像处理中 Sobel 算子边缘检测的硬件连接电路图
2398 浏览 0 评论
689 浏览 0 评论
普中科技F28335开发板中,如何使用aic23播放由代码生成的正弦波
2838 浏览 0 评论
3601 浏览 1 评论
1202 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-24 13:52 , Processed in 0.504394 second(s), Total 77, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号