本帖最后由 57tm 于 2012-5-8 16:19 编辑
TIMR8 的中断
也查了一下以前的资料,情况是
1.timr81_int.asm 中添加了 ljmp _Timer8_1_ISR_C
仍然不行
源代码如下
#pragma interrupt_handler Timer8_1_ISR_C
void Timer8_1_ISR_C(void)
{
static BYTE ucCnt = 0;
ucCnt++;
if(ucCnt == 100){
ucCnt = 0;
PRT1DR ^= BIT_MASK6;
}
//return;
}
void main(void)
{
M8C_EnableGInt ; // Uncomment this line to enable Global Interrupts
Timer8_1_WritePeriod(10);//vc3 = vc1/16/5/100 T unit = 1ms
Timer8_WriteCompareValue(0x00);
Timer8_1_EnableInt();
Timer8_1_Start();
// Insert your main routine code here.
while(1){
}
模块配置如下: |