Hi I programmed my lpc2368 with below code. but led does not blink (led is just on ).
my Code :
#include <lpc23xx.h> #define led1 0x200000 #define set_led1 (FIO0SET = led1) #define clr_led1 (FIO0CLR = led1)
void delay(unsigned long i){ unsigned long j; for(j=0; j<i; j++); } int main(void){ SCS |= 1; FIO0MASK = 0x00000000; FIO0DIR = 0xFFFFFFFF; FIO0CLR = 0x00000000; while(1){ set_led1; delay(2000000); clr_led1; delay(2000000); } }
Could you check the code operation and register interaction with a debugger?
Some standard board or a custom one? What pin is the LED on?