AnsweredAssumed Answered

LPC1778的P0.29和P0.30做普通输出口的问题

Question asked by 泉 杨 on Nov 16, 2018
Latest reply on Nov 21, 2018 by Carlos_Mendoza

嗨,我用的是LPC1778FBD144,想把P0.29和P0.30作为普通IO输出口使用。但是怎么设置口的输出都是低电平。

我也知道,这两个都要设置成同一个方向,我也这么操作了,但是就是不行。请大侠指教!

int main (void)
{
   SystemInit();  
   LPC_GPIO0->SET |= (3ul << 29);
   LPC_GPIO0->DIR |= (3ul << 29);
   LPC_GPIO0->SET |= (3ul << 29);

   while(1);
}

总是第电平!

Outcomes