OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 4598|回复: 5

STM32F103 采集 OV7670 无 FIFO 彩条测试错误

[复制链接]

5

主题

28

帖子

0

精华

初级会员

Rank: 2

积分
163
金钱
163
注册时间
2014-12-2
在线时间
34 小时
发表于 2015-3-28 15:25:16 | 显示全部楼层 |阅读模式
5金钱
HI ,
        大家好 ,我用 stm32 直接采集 0v7670 的图像 ,发现场中断处不来 ,只有行中断 ,彩条测试的结果是




寄存器配置表如下 :
  wrOV7670Reg(0x3a, 0x04);//
    wrOV7670Reg(0x40, 0x10);
    wrOV7670Reg(0x12, 0x14);
    wrOV7670Reg(0x32, 0x80);
    wrOV7670Reg(0x17, 0x16);
        
    wrOV7670Reg(0x18, 0x04);//5
    wrOV7670Reg(0x19, 0x02);
    wrOV7670Reg(0x1a, 0x7b);//0x7a,
    wrOV7670Reg(0x03, 0x06);//0x0a,
    wrOV7670Reg(0x0c, 0x0c);
  wrOV7670Reg(0x15, 0x02);
    wrOV7670Reg(0x3e, 0x00);//10
    wrOV7670Reg(0x70, 0x00);
    wrOV7670Reg(0x71, 0x01);  //????????????0X01
    wrOV7670Reg(0x72, 0x11);
    wrOV7670Reg(0x73, 0x09);//
        
    wrOV7670Reg(0xa2, 0x02);//15
    wrOV7670Reg(0x11, 0x00);
    wrOV7670Reg(0x7a, 0x20);
    wrOV7670Reg(0x7b, 0x1c);
    wrOV7670Reg(0x7c, 0x28);
        
    wrOV7670Reg(0x7d, 0x3c);//20
    wrOV7670Reg(0x7e, 0x55);
    wrOV7670Reg(0x7f, 0x68);
    wrOV7670Reg(0x80, 0x76);
    wrOV7670Reg(0x81, 0x80);
        
    wrOV7670Reg(0x82, 0x88);
    wrOV7670Reg(0x83, 0x8f);
    wrOV7670Reg(0x84, 0x96);
    wrOV7670Reg(0x85, 0xa3);
    wrOV7670Reg(0x86, 0xaf);
        
    wrOV7670Reg(0x87, 0xc4);//30
    wrOV7670Reg(0x88, 0xd7);
    wrOV7670Reg(0x89, 0xe8);
    wrOV7670Reg(0x13, 0xe0);
    wrOV7670Reg(0x00, 0x00);//AGC
        
    wrOV7670Reg(0x10, 0x00);
    wrOV7670Reg(0x0d, 0x00);
    wrOV7670Reg(0x14, 0x00);//0x38, limit the max gain
    wrOV7670Reg(0xa5, 0x05);
    wrOV7670Reg(0xab, 0x07);
        
    wrOV7670Reg(0x24, 0x75);//40
    wrOV7670Reg(0x25, 0x63);
    wrOV7670Reg(0x26, 0xA5);
    wrOV7670Reg(0x9f, 0x78);
    wrOV7670Reg(0xa0, 0x68);
        
    wrOV7670Reg(0xa1, 0x03);//0x0b,
    wrOV7670Reg(0xa6, 0xdf);//0xd8,
    wrOV7670Reg(0xa7, 0xdf);//0xd8,
    wrOV7670Reg(0xa8, 0xf0);
    wrOV7670Reg(0xa9, 0x90);
        
    wrOV7670Reg(0xaa, 0x94);//50
    wrOV7670Reg(0x13, 0xe5);
    wrOV7670Reg(0x0e, 0x61);
    wrOV7670Reg(0x0f, 0x4b);
    wrOV7670Reg(0x16, 0x02);
        
    wrOV7670Reg(0x1e, 0x37);//0x07,
    wrOV7670Reg(0x21, 0x02);
    wrOV7670Reg(0x22, 0x91);
    wrOV7670Reg(0x29, 0x07);
    wrOV7670Reg(0x33, 0x0b);
        
    wrOV7670Reg(0x35, 0x0b);//60
    wrOV7670Reg(0x37, 0x1d);
    wrOV7670Reg(0x38, 0x71);
    wrOV7670Reg(0x39, 0x2a);
    wrOV7670Reg(0x3c, 0x78);
        
    wrOV7670Reg(0x4d, 0x40);
    wrOV7670Reg(0x4e, 0x20);
    wrOV7670Reg(0x69, 0x5d);
    wrOV7670Reg(0x6b, 0x40);//PLL
    wrOV7670Reg(0x74, 0x19);
    wrOV7670Reg(0x8d, 0x4f);
        
    wrOV7670Reg(0x8e, 0x00);//70
    wrOV7670Reg(0x8f, 0x00);
    wrOV7670Reg(0x90, 0x00);
    wrOV7670Reg(0x91, 0x00);
    wrOV7670Reg(0x92, 0x00);//0x19,//0x66
        
    wrOV7670Reg(0x96, 0x00);
    wrOV7670Reg(0x9a, 0x80);
    wrOV7670Reg(0xb0, 0x84);
    wrOV7670Reg(0xb1, 0x0c);
    wrOV7670Reg(0xb2, 0x0e);
        
    wrOV7670Reg(0xb3, 0x82);//80
    wrOV7670Reg(0xb8, 0x0a);
    wrOV7670Reg(0x43, 0x14);
    wrOV7670Reg(0x44, 0xf0);
    wrOV7670Reg(0x45, 0x34);
        
    wrOV7670Reg(0x46, 0x58);
    wrOV7670Reg(0x47, 0x28);
    wrOV7670Reg(0x48, 0x3a);
    wrOV7670Reg(0x59, 0x88);
    wrOV7670Reg(0x5a, 0x88);
        
    wrOV7670Reg(0x5b, 0x44);//90
    wrOV7670Reg(0x5c, 0x67);
    wrOV7670Reg(0x5d, 0x49);
    wrOV7670Reg(0x5e, 0x0e);
    wrOV7670Reg(0x64, 0x04);  // PLL ±???
    wrOV7670Reg(0x65, 0x20);
        
    wrOV7670Reg(0x66, 0x05);
    wrOV7670Reg(0x94, 0x04);
    wrOV7670Reg(0x95, 0x08);
    wrOV7670Reg(0x6c, 0x0a);
    wrOV7670Reg(0x6d, 0x55);
        
        
    wrOV7670Reg(0x4f, 0x80);
    wrOV7670Reg(0x50, 0x80);
    wrOV7670Reg(0x51, 0x00);
    wrOV7670Reg(0x52, 0x22);
    wrOV7670Reg(0x53, 0x5e);
    wrOV7670Reg(0x54, 0x80);
        
    
        
        
    wrOV7670Reg(0x6e, 0x11);//100
    wrOV7670Reg(0x6f, 0x9f);//0x9e for advance AWB
  wrOV7670Reg(0x55, 0x00);//????
  wrOV7670Reg(0x56, 0x45);//??±???
  wrOV7670Reg(0x57, 0x80);//0x40,  change according to Jim's request    

正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

5

主题

28

帖子

0

精华

初级会员

Rank: 2

积分
163
金钱
163
注册时间
2014-12-2
在线时间
34 小时
 楼主| 发表于 2015-3-28 15:56:42 | 显示全部楼层
是有场中断的 ,弄错了
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165540
金钱
165540
注册时间
2010-12-1
在线时间
2117 小时
发表于 2015-3-28 22:51:49 | 显示全部楼层
帮顶....
回复

使用道具 举报

5

主题

28

帖子

0

精华

初级会员

Rank: 2

积分
163
金钱
163
注册时间
2014-12-2
在线时间
34 小时
 楼主| 发表于 2015-3-29 10:48:22 | 显示全部楼层
回复【3楼】正点原子:
---------------------------------
原子哥 ,我是这样做的 ,在进入场中断之后,将时钟停了 ,然后用 CLK 的 IO 高低变化读取像素点的 ,读完了之后在使能时钟 ,不知道思路对不对 。
回复

使用道具 举报

5

主题

28

帖子

0

精华

初级会员

Rank: 2

积分
163
金钱
163
注册时间
2014-12-2
在线时间
34 小时
 楼主| 发表于 2015-3-29 10:57:47 | 显示全部楼层

现在的情况是这样的 ,彩条测试 ,真心不知道问题在哪里了 。
回复

使用道具 举报

9

主题

36

帖子

0

精华

初级会员

Rank: 2

积分
87
金钱
87
注册时间
2015-3-28
在线时间
13 小时
发表于 2015-4-19 21:05:23 | 显示全部楼层
回复【5楼】wendell.li:
---------------------------------
你的摄像头接杜邦线了吗?如果接了把杜邦线弄短点吧,我之前做彩条测试也是你这个样子,后来换了短一点的杜邦线就好了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-6-23 11:29

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表