This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PROBLE WITH LPC2148

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..

Parents
  • And you did not notice that when you cut/pasted the broken source code from the original post into this new post, the lost line breaks are still lost?

    And the only thing you have now said about your debugging attempts is that the voltages on some pins (which I have to guess is the LED pins) are not changing.

    You didn't tell if they where high or low. You didn't tell if they are in tristate or if they are weakly or strongly held at their current state. You didn't tell if you have tried to single-step the program. You didn't tell if you have tried to read back the program to verify that you really have any program in the chip. You didn't tell if you have tried to download any other example program.

Reply
  • And you did not notice that when you cut/pasted the broken source code from the original post into this new post, the lost line breaks are still lost?

    And the only thing you have now said about your debugging attempts is that the voltages on some pins (which I have to guess is the LED pins) are not changing.

    You didn't tell if they where high or low. You didn't tell if they are in tristate or if they are weakly or strongly held at their current state. You didn't tell if you have tried to single-step the program. You didn't tell if you have tried to read back the program to verify that you really have any program in the chip. You didn't tell if you have tried to download any other example program.

Children