Getting started with mbed LPC1114
If you are good at Japanese than English, here is the Japanese documentation.
When you develop LPC1114FN28 with mbed, please refer this pin-out.
In the near future, we will provide mbed interface for LPC1114, SWD pins were reserved.
So, let's get started from Blinky. I recommend LED2(dp28).
dp5 and dp27 are "open-drain". It's not same as other GPIO pins!!
Where can we get it?
Switch Science (my sponsor!!)
Seeed Studio (my friends!!)
How to flash
There are two ways to flash binaries to LPC1114. One is UART ISP(In-System Programming). And we also have SWD(Serial Wire Debug) option.
To flash with ISP, you will need a 3.3V UART interface such as Sparkfun's FTDI Basic Breakout.
- Sparkfun FTDI Basic Breakout - 3.3V
- Switch Science Serial USB Converter (5V/3.3V selectable)
You need to check output voltage of your FTDI breakouts/cables before plug-in!!
Some FTDI breakouts/cables output 5V for VCC/VDD even if it outputs 3.3V level UART signal.
Before the flash, you need to connect TX,RX of UART interface to RX(dp15), TX(dp16) of LPC1114FN28.
And, you can put LPC1114FN28 to ISP mode by keeping PIO0_1 (dp24) as low when the MCU reset.
On the picture above, I put a 330ohm resistor between pin24 and GND to make it LOW. Before roasting, put a resistor. And when you see LPC1114 is entered to ISP mode, you need to remove resistor.
Here is the ways to flash with ISP.
ika_shouyu_poppoyaki turns your mbed to ISP programmer.
If you already have blue mbed LPC1768, this is the easiest way to flash LPC1114 with ISP.
Flash Magic have GUI and works on both Windows and Mac OS X.
A problem of Flash Magic is, it couldn't load binary!! If you want to flash a binary from online compiler, you need to convert downloaded binary to HEX.
You can convert binary to hex, by using bin2hex on Windows.
On Mac OS X, you can use bin2hex. You need to build runnable binary to use this. (Thanks for this info, Tedd!!)
I used lpc21isp. lpc21isp could load both binary and HEX.
The lpc21isp binary I'm using on my OS X is here (NO WARRANTY): /media/uploads/ytsuboi/lpc21isp. Please "chmod +x".
I'm using lpc21isp as,
$ lpc21isp -bin LEDBlink_LPC1114.bin /dev/cu.usbserial-AD020SZ2 115200 48000
If you are SWD user, you will not need my advise.
MDK(uVision 4) is a super AWESOME compiler!! You can get FREE 32kB limited MDK-Lite and enjoy cool debug-enabled developing environment. Since LPC1114FN28 only have 32kB flash, you can enjoy full LPC1114FN28.
We developed this LPC1114 port with this compiler. Armcc in MDK output really small and faster binary.
Now, online compiler could export your project on online to MDK-ARM project.
Here is MDK project archive I distributed when it was not available.
We also support LPCXpresso LPC1114. If you want to play with that, please refer this pin-out map. :-)
The mbed porting for LPC1114 was being done by following member,
And, here is supporters.
- mbed team!! Thanks guys!!
- Yuuki Uno
- Tedd Okano
If you find any problem on this porting, please let me know by dropping a comment on this page. Or, you can contact me by Twitter ( @ytsuboi ) or Facebook.
36 comments on Getting started with mbed LPC1114:
Please log in to post comments.
Dear Yoshihiro, I found PwmOut is not working properly, I tried dp10,dp11,dp17,dp18 pins to output PWM, but all failed, I can't measure the PWM waveform on these pins, besides if I used dp17, the CPU will hang. Below is my testing code: (Note: the serial output is working properly)
Please give me some advice, thank you very much. Best regards, Stanly
PwmOut testing code of LPC1114FN28