For the ARMweb type the following program in the console window.
' enable pin P0(7) is connected to the LED
WHILE X<30
IO(7) = X AND 1 ' drive pin 7 high when x is odd, low when x is even
X=X+1
WAIT(500)
LOOP
For the DINkit type the following program in the console window.
' enable pin P0(15) is connected to the LED
WHILE X<30
IO(15) = X AND 1 ' drive pin 15 high when x is odd, low when x is even
X=X+1
WAIT(500)
LOOP
For the ARMweb and DINkit to drive the port 1 pins. On all versions ARMweb and DINkit, you can use the following
#include <LPC21xx.bas>
FIO1DIR = FIO1DIR OR (1<<16) ' enable
the pin as an output
WHILE
X<30
P1(16) = X and
1
X=X+1
WAIT(500)
LOOP
Use the following if you have firmware 7.52 or later (includes floating point support)
' port 1 starts at 32
WHILE
X<30
IO(32+16) = X and
1
X=X+1
WAIT(500)
LOOP
To stop a
running program simply press the Stop button.