Bare metal programming of the LPC824 from NXP
The LPC824 is a surface mount microcontroller. It comes in several packages one of which is a TSSOP-20 package.
This can be mounted on an an adapter quite easily allowing it to be used in a breadboard. A friend of mine
did this work for me (thanks Joe!)and here it is mounted on a breadboard:
The LPC824 contains an In-System-Programming (ISP) bootloader which can be used to load firmware on to
the device using the LPC21ISP program http://lpc21isp.sourceforge.net/. One small modification is needed
first however as the LPC824 is such a recent chip. For details of this modification see here :
Patching LPC21ISP for the LPC824
The figure below shows a simple ISP programming setup for the LPC824. To put the device into ISP mode press
RESET and ISP simultaneously then release RESET followed by ISP. Firmware can be downloaded using a USB/Serial adapter
which can also be used to power the chip. These adapters are very cheap (less 4 Euro) and can be obtained from a
number of sources. One example is here.
The ISP is wired as shown below.
The examples listed below can be built and downloaded as follows:
1) Extract archive
2) Edit the Makefile from archive so that the variable LIBSPEC points to the arm-gcc libraries (e.g. libgcc.a) on your system.
This will most likely be different in your system so check! If you have spaces in your directory names enclose
the path in quotes. The default one looks like this.
# Tell the linker where to find the libraries -> important: use thumb versions
3) run make. This should build your program and will print instructions for downloading it to the chip
4) Put the device in ISP mode
5) Run lpc21isp as detailed in point 3 above.
Blinky. This program simply flashes the attached LED using a software delay
Timer. This program uses the LPC824 State configurable timer (SCT) to drive the LED
Serial. This program shows how to use the USART to communicate with the host PC.
SerialADC. This program shows repeatedly reads an ADC channel and sends results up the PC.
More examples will follow.
Back to my ARM project page