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

nid help on LED blinking

i have problem with the led blinking. I using the exmaple program given by keil using uVision3. When i run the program, the LED on the development board didnt blink, it just stay on! wat should i do?

thanks!

Parents
  • so so i slow down the blinking timing? or what can i do to see the led blinking?

    the coding:

    #include <REG8252.H>

    void wait (void)
    { ;
    }

    void main (void) { unsigned int i; unsigned char j;

    while (1) {
    for (j=0x01; j< 0x80; j<<=1) { P0= j;

    for (i = 0; i < 1000; i++) { wait (); } }

    for (j=0x80; j> 0x01; j>>=1) { P0= j;

    for (i = 0; i < 1000; i++) { wait (); } } }
    }

Reply
  • so so i slow down the blinking timing? or what can i do to see the led blinking?

    the coding:

    #include <REG8252.H>

    void wait (void)
    { ;
    }

    void main (void) { unsigned int i; unsigned char j;

    while (1) {
    for (j=0x01; j< 0x80; j<<=1) { P0= j;

    for (i = 0; i < 1000; i++) { wait (); } }

    for (j=0x80; j> 0x01; j>>=1) { P0= j;

    for (i = 0; i < 1000; i++) { wait (); } } }
    }

Children