Step 4:  Programming the IO

Clear previous ARMmite/ARMexpress  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


Type the following program in the console window. (below)

DIR(15)= 1                      ' enable pin 15 as an output
WHILE X<30
  OUT(15) = X AND 1       ' drive pin 15 high when x is odd, low when x is even
  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