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

Toggling LED

Hello all

I am quite new to Keil STR9 Series. I was just learning the whole thing by going through and trying some small examples with it.
I want to know how to control just one LED ( say 7.0) to blink at a time.

   while (1)
         {
            for (n = 0x01; n <= 0xFF; n <<= 1)
            {
               GPIO7->DR[0x3FC] = n;
            }
         }

This piece of code turns on the all 8 LEDS at the same time. How can i blink just one LED (7.0) every 1 second?

Thanks

Parents Reply Children
No data