金牌会员
 
- 积分
- 1646
 
- 威望
- 810
- 贡献
- 544
- 兑换币
- 306
- 注册时间
- 2011-12-25
- 在线时间
- 146 小时
|
自己理解K60很不细致,对速度采集时遇到了好些问题,一开始想用FTm正交解码,发现自己的FTM1和FTM0都用掉了,接着改用DMA测速,又发现与同时使用DMA进行图像采集的摄像头冲突,修改了一下中断后还是效果不好,图像采集受到严重影响,画质还可以,但是采集帧数严重下降,图像特别卡,无奈又换回LPT模式,参考了野火的程序后,写出了一个计数的程序,如下:
pit_init_ms(PIT0,4); //10秒触发一次中断
lptmr_counter_init(LPT0_ALT2, 5, 2, LPT_Rising);
EnableInterrupts;
while(1)
{
disable_irq(PIT0+ 68); //关闭PIT中断,避免影响图像采集
ov7727_get_img(); //采集图像
enable_irq(PIT0+ 68);
enable_irq(101);
}
如果在 enable_irq(101);后加上一些其他内容,每次启动程序,单片机都要延迟一会儿才会启动,哪位遇到过这么水的问题,望指点一二,问题出在哪里了。DMA测速和采集图像会不会产生总线复用的问题呢
|
|