LPC812 Code help
Posted: Tue Apr 08, 2014 1:26 pm
Why won't this code toggle an output pin?
The text is printed to screen on each loop, but the output never changes.
#include "LPC8xx.bas"
#define LED_PIN IOCON_PIO0_15
DIM X AS INTEGER
X = 0
DIR(LED_PIN) = 1
WHILE X<30
OUT(LED_PIN) = X AND 1 ' IO() sets pin direction and state
X=X+1
WAIT(500)
PRINT "HELLO WORLD"
LOOP
The text is printed to screen on each loop, but the output never changes.
#include "LPC8xx.bas"
#define LED_PIN IOCON_PIO0_15
DIM X AS INTEGER
X = 0
DIR(LED_PIN) = 1
WHILE X<30
OUT(LED_PIN) = X AND 1 ' IO() sets pin direction and state
X=X+1
WAIT(500)
PRINT "HELLO WORLD"
LOOP