Aim: Interfacing of Leds Connected To Port0 (P0) of Lpc-2148
Aim: Interfacing of Leds Connected To Port0 (P0) of Lpc-2148
Peripherals:
Unit Reference Description
COM Port1 J15 RS232 DB9 Male Connector for LPC2148 UART0
COM Port2 J16 RS232 DB9 Male Connector for LPC2148 UART1
JTAG J19 2x10 0, 1” Step connector for programming with
ARM-JTAG
I2C J10 4 Pins connector for devices which use I2C protocol
Battery B1 External battery connector
LED LED1/2/3/4 Run Mode/Program Mode/USB connection
indicator/Power Indicator
GPIO J1/2/3 Three 20 pin connector
ADC J4 20 pin connector
SPI J7 6 pin connector
External J9 12 pin connector
Interrupt
USB Connector J17 4 pin connector
Power jack J18 Power Jack connector
connector
Capture 0 J11 10 pin connector
Capture1 J12 10 pin connector
Match 0 J13 8 pin connector
Match 1 J14 8 pin connector
PWM J6 7 pin connector
Analogue O/P J5 2 pin connector
Software
The software section includes two Development Tools viz. WinARM- an integrated
development environment required to develop the program.
Flash Utility to down load the .Hex files on to the Target Board.
1) WinARM IDE Tool
WinARM is a collection of tools to develop applications for ARM-controllers in C
and C++ on MS-Windows platforms. The tool chain includes
• GNU-C/C++ Compiler (Cross Compiler/Linker/Assembler arm-elf)
Version 4.0.2 incl. stdlib3. the configuration supports ARM-Mode, Thumb-
Mode and Mixed (ARM/Thumb)-Mode, Little/Big- Endian and Floating
point-emulation
• GNU-BinUtils Version 2.16
• GNU-Utils do support the Compiler/Linker
• ARM header files
• Programmer Notepad Editor version 2.0.6.1
• The lpc21isp in-system-programming-software for Philips LPC2xxx
PROCEDURE :
1. Using the Tool chain
A. Open the Editor:
• Open c:\WinARM\pn\pn.exe
B. Create a New Project:
• Go to File New Project
• In the “New Project Window” give the Project name along with
the path
• A “Projects” window appears, then copy the following files into
the folder of project:
i. crt0.s
ii. Makefile
iii. LPC2148-ROM.ld
• Open a new file from File New C. write down the program
and save it with “.c” extension
• In the “Projects” window, add the above files listed along the .c
file.
• Open the Makefile from the “Projects” window and make changes
in it.
i. TARGET = write the name of the “.c” file in which main ()
function is built without “.c” extension.
ii. SRCARM = write names of all supported files other than in
TARGET. [ For Example SRCARM = edutech.c, lcd1.c]
iii. LPC21ISP_PORT = serial com port that will be used for
communication. [ For Example LPC21ISP_PORT = com1]