Content originally posted in LPCWare by wuchienhung2002 on Sun Dec 07 08:22:37 MST 2014
Hi,
I have a problem,please help,thanks
problem description:
1.lpc1114/302
2.GPIO control:
#include "config.h"
int main(void)
{
uint8 i=0;
/*SystemInit();*/
LPC_GPIO2->DIR= 0xFF;
while(1)
{
if((LPC_GPIO0->DATA & 1<1)==0) LPC_GPIO2->DATA= ~(i++);
if((LPC_GPIO0->DATA & 1<2)==0) LPC_GPIO2->DATA= ~(i--);
/*Delay_ms(100);*/
}
}
This LPC_GPIO2->DATA value is 111111011111,but in target board PIO2_5 is output high always,can you Teach me to solve this problem