|
|||||||||||
Technical Support On-Line Manuals µVision3 User's Guide ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Create New Source Files
#include <LPC210x.H> /* LPC210x definitions */ void wait (void) { /* wait function */ ; /* only to delay for LED flashes */ } int main (void) { unsigned int i; /* Delay var */ unsigned int j; /* LED var */ IODIR = 0xFF; /* P0.0..7 defined as Outputs */ while (1) { /* Loop forever */ for (j = 0x01; j < 0x80; j <<= 1) { /* Blink LED 0, 1, 2, 3, 4, 5, 6 */ IOSET = j; /* Turn on LED */ for (i = 0; i < 10000; i++) { /* Delay for 10000 Counts */ wait (); /* call wait function */ } IOCLR = j; /* Turn off LED */ } for (j = 0x80; j > 0x01; j >>=1) { /* Blink LED 7, 6, 5, 4, 3, 2, 1 */ IOSET = j; /* Turn on LED */ for (i = 0; i < 10000; i++) { /* Delay for 10000 Counts */ wait (); /* call wait function */ } IOCLR = j; /* Turn off LED */ } } } | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.