Single channel PWM using the LPC1114
This example demonstrates single channel PWM on the LPC1114. It outputs a 30kHz, varying duty PWM signal on pin 10 of the LPC1114. Connect an
LED with a 470 ohm resistor to ground and you will see its brigtness rise and fall.
Source files are available here.
The toolchain (compiler etc) can be obtained from https://launchpad.net/gcc-arm-embedded. This works
for many operating systems.
The software tool that downloads code to your device is called lpc21isp and can be found here http://sourceforge.net/projects/lpc21isp/
If you can't compile this tool (e.g. if you are on a Windows machine) then you might try Flashmagic
Progamming
The makefile provided with this example creats a file called main.hex (Intel Hex format) which must be downloaded to the microcontroller. To do this you
must press the reset and mode buttons together. You then release the reset button first followed by the mode button. The chip
should now be in ISP mode allowing FlashMagic or lpc21isp to download the code to it. When download is complete press reset once more and the
program should run.
A batch file called build.bat is available that might help you build this on a Windows machine.
Back to LPC1114 home