The Blinker.mod example included with Astrobe does not work on the LPC1768 mbed board. I tried both example at ..\LPC1769\Coridium and at ..\LPC1769\LPCXpresso, but it did not work.
Are they suppose to work out of the box on the LPC1768 mbed?
Blinker example for mbed board
-
- Site Admin
- Posts: 517
- Joined: Fri Dec 31, 2010 12:30 pm
- Contact:
Re: Blinker example for mbed board
All the generic examples for the LPC17x boards (e.g. the mbed) are located in the LPC1769\General folder. The examples in the other folders are specific to those boards. However, they can be used as a starting point if the peripherals are very similar (i.e. I2C-based, SPI-based etc.)
Refer to:
Astrobe > Help > Contents and Index > Getting Started > Quick Start Guide > LPC1769 Microcontrollers
For a step-by-step example of how to modify the Blinker examples to work on different boards.
The mbed has 4 LEDs that you can use. They are connected to pins P1.18, P1.20, P1.21, P1.23. So, if you started with the LPCXpresso example and wanted to flash the LED connected to pin P1.18, you should
a) Change the declaration:
to
b) change all occurrences of FIO0xxx to FIO1xxx as the pins are on port 1 not port 0. e.g.
Refer to:
Astrobe > Help > Contents and Index > Getting Started > Quick Start Guide > LPC1769 Microcontrollers
For a step-by-step example of how to modify the Blinker examples to work on different boards.
The mbed has 4 LEDs that you can use. They are connected to pins P1.18, P1.20, P1.21, P1.23. So, if you started with the LPCXpresso example and wanted to flash the LED connected to pin P1.18, you should
a) Change the declaration:
Code: Select all
CONST
(* led connected to pin P0.22 *)
ledBit = {22};
Code: Select all
CONST
(* led connected to pin P1.18 *)
ledBit = {18};
Code: Select all
SYSTEM.PUT(MCU.FIO1CLR, ledBit);