I am interfacing single led with lpc2148.I got simulation result. But i am not getting it on the board.I have written the following program to interface the led.
#include "LPC21xx.h"
void wait(void ) { int j=0;
for(j=0;j<1000000;j++); /*wait for one second*/
}
int main (void) { IODIR0 = 0x10000000; /* P0.28 defined as Output */ PINSEL1= 0x00000000; while (1) { /* Loop forever */
IOSET0 = 0x10000000; /* Turn on LED */
wait(); /* call wait function */
IOCLR0 = 0x10000000; /* Turn off LED */
wait();
................................................... what modifications i have to do to get output..kindly help me..
No, he replaced it with a while loop - but since he forgot the formatting of the post, we can't be bothered to look at the code.
Another error - not searching this forum for busy loop delays.
A third error - not giving any information about what actually happens, and what error checking that has been done (such as single-stepping the code) before the thread was created.
Gee, I really missed that "while"! Hence - always use code formatting!!!!
Yes, I normally chose to ignore code instead of switching to stream mode to try to dechiffer code where it can't even be seen where one-line comments actually ends. Code posted without tags isn't just messy but it is a lossy conversion that can't be undone.