Olimex LPC-P1343 user-led handling
Posted: Tue Jul 10, 2012 6:18 pm
Hi there!
While learning some Astrobe examples, I flashed my lpc-board with Blinker module. First time I didn't see nothing, there was no onboard leds blinking, but then, when i read the board manual, I found up, that onboard leds are connected to PIO2_x, PIO3_x pins. And the PIO0_7 pin is free hole on the back of the board (i connected the LED there and IT WORKED fine), but when I changed the Blinker.mod source code to this
and there is nothing changed, no leds were blinking.
What am i doing wrong?
While learning some Astrobe examples, I flashed my lpc-board with Blinker module. First time I didn't see nothing, there was no onboard leds blinking, but then, when i read the board manual, I found up, that onboard leds are connected to PIO2_x, PIO3_x pins. And the PIO0_7 pin is free hole on the back of the board (i connected the LED there and IT WORKED fine), but when I changed the Blinker.mod source code to this
Code: Select all
CONST
ledBit = {1}; (* PIO3_1, onboard led1 *)
VAR
direction, data: SET;
BEGIN
(* instead of GPIO0 using GPIO3 *)
SYSTEM.GET(MCU.GPIO3DIR, direction);
SYSTEM.PUT(MCU.GPIO3DIR, direction + ledBit);
...
What am i doing wrong?