#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
unsigned long adv;
void main(void) {
PTBDD_PTBDD0 = 1 ;
PTBD_PTBD0 = 1 ;
PTBDD_PTBDD1 = 1 ;
PTBD_PTBD1 = 1 ;
RTCSC=0X1F ;
SOPT1 = 3;
ADCCFG =0x18; //配置为高速、1分频、长采样、10位、总线时钟
//ADCSC2 =0x40; //RTI 硬件触发,禁止比较;
//ADCSC1 =0x40; //允许中断,单次转换,通道0
APCTL1 =0x04; //管脚ADP2作为模拟输入
EnableInterrupts; /* enable interrupts */
/* include your code here */
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载