PA4,PB4配置为输出口
R16_PA_INT_EN=0X00; //INT DISABLE
R16_PB_INT_EN=0X00;
R16_PA_INT_MODE=0X00; //中断触发模式
R16_PB_INT_MODE=0X00;
R16_PA_INT_IF=0X00;//端口中断标志寄存器 写1清零
R16_PB_INT_IF=0X00;
R32_PA_DIR |=1<<4; //PA4 OUTPUT
R32_PB_DIR |=1<<4; //PB4 OUTPUT
R32_PA_PU |=1<<4; //上拉电阻
R32_PB_PU |=1<<4;
R32_PA_PD_DRV |=1<<4; //20MA
R32_PB_PD_DRV |=1<<4;
把PA4接到LED0,PB4接到LED1,循环执行下段程序,LED灯常亮,不是闪,改了延时也不行
Delay_xms(100);
R32_PA_OUT |=1<<4;
R32_PB_OUT=0X0000;
Delay_xms(100);
R32_PA_OUT &=~(1<<4);
R32_PB_OUT=0XFFFF;
不知道是哪里操作不对了,望指教。谢谢。