📄 landzo
字号:
/**********************************************************************************
********************* (C) COPYRIGHT 2012 蓝宙电子科技有限公司 *********************
***********************************************************************************
* 描述 :线性CCD测试程序
*
* 实验平台 :蓝宙电子XS128系统板 + TSL1401线性CCD传感器
*
* 作者 :蓝宙电子科技有限公司
* 淘宝店 :http://landzo.taobao.com
* 网站 :http://www.landzo.cn
**********************************************************************************/
/*
*********************************************************************************************************
*
* MCU: MC9S12XS128MAL - 112Pin
* OSC: 16.000MHz
* BUS: 40.0MHz
*
* File : Events.c
* By : Ke Chao
*********************************************************************************************************
*/
#include "includes.h"
/*
*********************************************************************************************************
* Description: Global variable
*********************************************************************************************************
*/
unsigned char TimerFlag20ms = 0;
/*
*********************************************************************************************************
* Description: PITCh0IntISR
* Note: 1ms at 40M
*********************************************************************************************************
*/
#pragma CODE_SEG __NEAR_SEG NON_BANKED
__interrupt void PITCh0IntISR(void) {
static unsigned char TimerCnt20ms = 0;
unsigned char integration_piont;
PITTF_PTF0 = 1;
TimerCnt20ms++;
/* 根据曝光时间计算20ms周期内的曝光点 */
integration_piont = 200 - IntegrationTime;
if(integration_piont >= 2) { /* 曝光点小于2(曝光时间大于18ms)则不进行再曝光 */
if(integration_piont == TimerCnt20ms)
StartIntegration(); /* 曝光开始 */
}
if(TimerCnt20ms >= 200) {
TimerCnt20ms = 0;
TimerFlag20ms = 1;
}
}
#pragma CODE_SEG DEFAULT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -