Step 4:  Programming the IO

Clear previous program

Clear previous

To begin a new program, you should CLEAR the previous one.  You can do this with either the button or by typing clear.


A program that uses IO


For the LPC11U37 - ARM Stamp and LPC1114 the LED is connected to P0(1).  

   WHILE X<30
       IO(1) = X and 1    ' IO() sets pin direction and state
       X=X+1
       WAIT(500)
    LOOP

For the SuperPRO and PROplus. Use the following. LED is connected to P2(10).

                                 ' port 2 starts at 64
   WHILE X<30
       IO(64+10) = X and 1
       X=X+1
       WAIT(500)
    LOOP

Now RUN the program

Now RUN the program

The LED on the PCB should pulse 15 times.


And see the results

And see the results


Stop the program


Stop the program

To stop a running program simply press the Stop button.

On to Step 5