Sie sind auf Seite 1von 4

AIM : Interfacing of LEDs connected to Port0 (P0) of LPC-2148

Development Board & Write a Program to blink the LEDs.

OBJECTIVE : 1. To study the features of LPC-2148 Microcontroller and


Peripherals.
2. To study tool chain used to run the program on target board.

THEORY : The LPC-2148 Development Board is designed to evaluate


LPC2148 processor with following features
• JTAG Connector
• 12 MHz crystal allow easy communication setup
• Total Three 20 pin connector as GPIO
• SPI connector
• One 20 pin ADC connector
• External Interrupts connector
• Two RS232 interface circuit with SUB-D 9 Pin connector
• Capture & Match connectors
• On board 3.6V Battery
• Status LED
• RESET Button
• Run mode & ISP Switch
• Debug Jumper for JTAG Enable/Disable
• Power Plug-in Jack
• On board Voltage Regulator 3.3V
• Power Supply filtering Capacitor
• USB connector
The LPC2148 from Philips Semiconductors is based on a 32-bit ARM7TDMI-S CPU
with real-time Emulation and Embedded Trace Support, together with 521KB of
Embedded High speed Flash Memory. A 128-bit wide internal memory interface and
unique accelerator architecture enable 32-bit code execution at maximum clock rate.
For critical code size application, the alternative 16-bit Thumb Mode reduces code by
more than 30% with minimal performance penalty.
Due to their tiny size and Low power consumption, with a wide range of serial
communication interfaces and on-chip SRAM options of 16/32 KB, various 32 bit
Timers, Single or Dual 10-bit 8 Channel ADC(s), PWM Channels and 47 GPIO lines
with up to 9 edge or level sensitive external interrupt pins, these Microcontrollers are
ideal for applications where miniaturization is a key requirement, such as
• Access control and Point-of-sale.
• Communication gateways and Protocol Converters
• Soft Modems
• Voice Recognition and low end imaging
• Industrial Control and Medical Systems.

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

2) LPC2000 Flash Utility V2.2.3


• Select the device as LPC2148
• Write the XTAL frequency of board i.e. 12000 KHz
• Select the COM port which is being used
• Set the Baud rate as 9600
• Tick on “Execute the Code after Upload”
• Now, RESET the microcontroller
• Click on “Read Device ID”
• Then click on “Erase”
• Now select the .Hex file to be downloaded
• Click on “Upload to Flash” which will download the selected file to the Flash
Memory.
Useful Links
1. Philips web site
LPC2148 Product Datasheets, Application Notes, etc
http://www.semiconductors.philips.com/

2. LPC micro controller’s discussion forum


http://groups.yahoo.com/group/lpc2000/

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]

C. Build the Project:


• Go to: Tools Make Clean
• A new window named “Output” will appear. If no error
occurs, go to: Tools Male All. This will create .hex, .lst, .elf,
.o, .lss, .map, .files.
D. Download the hex file onto the Target Board
• Check that the host machine and LPC-2148 Target board are
connected through RS232.
• Now, download the Hex file using LPC Flash Utility2.2.3
2. Using LPC Flash Utility
• Connect 5V Power Supply to the LPC-2148 Development Board
• Connect the board with the COM port of the PC using Serial Cable.
• Using the RUN/ISP Mode selection switch, set the board in the ISP mode. This
will be indicated by the Red LED.
• Apply Reset condition by pressing RESET switch to ensure proper
communication.
• Use LPC Flash Utility to download the .Hex file using the available tools
• Using the RUN/ISP Mode selection switch, set the board in the RUN mode. This
will be indicated by the Green LED
• Apply reset using RESET button.

Das könnte Ihnen auch gefallen