请教MC9S08AW32的AD转换进不了中断,要怎么设置才行啊?
- UID
- 143639
- 性别
- 男
|
请教MC9S08AW32的AD转换进不了中断,要怎么设置才行啊?
ADC1CFG = 0x79;//用的总线时钟表14M
ADC1SC1 = 0x63;
ADC1SC2 = 0x00;
ADC1R = 0;
ADC1CV = 0;
APCTL1=0x03;//我想用AD0和AD1两个通道
APCTL2=0x00;
APCTL3=0x00;
interrupt 23 void ADC1_COCO (void)
{
Data1 = ADC1R;
} |
|
|
|
|
|
- UID
- 104380
- 性别
- 男
|
你要看一下中断号23生成的中断矢量地址是否为COCO中断的地址。 |
|
|
|
|
|
- UID
- 143639
- 性别
- 男
|
谢谢,是硬件仿真不能进中断,我用串口打印可以看到一直进的 |
|
|
|
|
|
- UID
- 104380
- 性别
- 男
|
|
|
|
|
|
- UID
- 343987
- 性别
- 男
|
|
|
|
|
|
- UID
- 143639
- 性别
- 男
|
|
|
|
|
|
- UID
- 104380
- 性别
- 男
|
你用BDM连接时,是否将最新的程序下载到芯片中了? |
|
|
|
|
|