因为程序的需要,要在IIC通信结束后的中断里面。对PTB4做一次高-低-高的电平变化。
但是在调试的过程中,发生了一次IIC通信后用示波器观察PTB4的波形变化。始终没有波形的变化。
在IIC的初始化中已经设置为输出,并且为1。
有高手知道这是什么原因么?谢谢!
interrupt VectorNumber_Viic void IIC_Control_handler(void)
{
static unsigned char Temp;
Temp=IICS;
PTBDD_PTBDD4=1; //Set PTB4 as output again
label01:
PTBD_PTBD4 = 0;
if(PTBD_PTBD4 != 0)
goto label01;
PTBDD_PTBDD4=1; //Set PTB4 as output again
PTBD_PTBD4=1; //Set PTB4 as 1
IICS_IICIF=1; //The handler routine clears
the interrupt flag.