没有合适的资源?快使用搜索试试~ 我知道了~
ov7620的图像采集程序,最基础的摄像头应用,ov7620是飞思卡尔摄像头组专用摄像头,但最基础的还是图像采集。
资源推荐
资源详情
资源评论
#include <hidef.h> /* common defines and macros */
#include "derivative.h" /* derivative-specific definitions */
#include <MC9S12G128.h>
#define ROW 30
#define COLUMN 70
unsigned char Image_Data[ROW][COLUMN];
unsigned char Point_C, VSYN_C=0, Line_Flag, m = 0,n=0;
unsigned int Line_C=0;
unsigned char Interval;
unsigned char THRESHOLD=0x20;
void Delay(int i)
{
int j;
for(j=0;j<i;j++)
{
_asm(nop);
}
}
void SetBusCLK_nM(byte nM)
{
MMCCTL1=0X00; //set MMC control register
PKGCR =0X06;
DIRECT =0x00;//set direct page register
IVBR =0xFF; // set interrupt vector base register
ECLKCTL=0xC0; //set ECLK control register (normal signle-chip)
CPMUPROT =0x26; //停止保护时钟配置寄存器
CPMUCLKS_PSTP=0; //
CPMUCLKS_PLLSEL=1; //应用 PLL
//CPMUSYNR =nM-1; //设置分频因子
CPMUSYNR =0x40|(nM-1); //设置分频因子
CPMUREFDIV =0x80|0x00; //pllclock=2*(1+SYNR)= MHz;
CPMUPOSTDIV=0x00; // Set the post divider register
CPMUPOSTDIV=0x00; // Set the post divider register
CPMUPLL =0x10; // Set the PLL frequency modulation
while(CPMUFLG_LOCK == 0); /* Wait until the PLL is within the desired tolerance of the
target frequency */
CPMUPROT=0x00; /* Enable protection of clock configuration registers */
}
资源评论
tianqingyouyu
- 粉丝: 4
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功