Olimex LPC-P1343 user-led handling

Newcomers to Astrobe and Oberon are welcome to ask any beginner-level questions here
Post Reply
kpmy
Posts: 3
Joined: Tue Jul 10, 2012 6:07 pm

Olimex LPC-P1343 user-led handling

Post by kpmy » 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

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);
...
and there is nothing changed, no leds were blinking.
What am i doing wrong?
Amature Oberon, but poor English :(

cfbsoftware
Site Admin
Posts: 493
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Re: Olimex LPC-P1343 user-led handling

Post by cfbsoftware » Wed Jul 11, 2012 3:49 am

Oops, sorry! There is an error in LPC13xx\MCU.mod. GPIODATA should be GPIO0DATA. For your example you should also change all occurrences of GPIODATA to GPIO3DATA.

If you still can't get it to work let us know which development board you are using - I assume the MCU is an LPC1343?

kpmy
Posts: 3
Joined: Tue Jul 10, 2012 6:07 pm

Re: Olimex LPC-P1343 user-led handling

Post by kpmy » Wed Jul 11, 2012 7:22 am

Yepp, with MCU.GPIO3DATA everything works fine.
My board is http://www.olimex.com/dev/pdf/ARM/LPC/LPC-P1343.pdf
Amature Oberon, but poor English :(

Post Reply