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
  • "The STR9 chip is unique, i.e. there is a mask register for the port."

    That isn't unique. A number of NXP chips has it too, and not unlikely other manufacturers too. You may take a look at the GPIO registers for the NXP LPC23xx chips, but several NXP product lines has mask registers.

Reply
  • "The STR9 chip is unique, i.e. there is a mask register for the port."

    That isn't unique. A number of NXP chips has it too, and not unlikely other manufacturers too. You may take a look at the GPIO registers for the NXP LPC23xx chips, but several NXP product lines has mask registers.

Children