Simple LED blinking code
Hello Friends,
I did an LED blinking code for the LPC2468 Development Board(OLIMEX), built it in CrossStudio for ARM IDE downloaded it to the board and blinked the LED.
But when I do it on an LPC2478-based custom-designed board it didnt blink LED.
The only difference between LPC2468 and LPC2478 mcu is the display functionality.
C code-
#include <targets/LPC2000.h>
#define LED (1 << 20)
static void delay(volatile int n) {
while (n--);
}
int main(void) {
SCS |= SCS_GPIOM;
FIO1DIR |= LED;
while (1) {
FIO1PIN ^= LED;
delay(1000000);
}
}Please sign in to leave a comment.
Comments
0 comments