lpc2148_edu-kit_v1.1

51
User Manual: LPC2148-EDU BOARD_V1.1 USER MANUAL LPC2148-EDU BOARD www.ngxtechnologies.com 1

Upload: jignesh-patel

Post on 16-Sep-2014

322 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

USER MANUALLPC2148-EDU BOARD

www.ngxtechnologies.com1

Page 2: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Section 1............................................................................................................................4Introduction..........................................................................................................................4

LPC2148-EDU Evaluation Kit........................................................................................4 References and Applicable Documents..........................................................................4

Section 2...............................................................................................................................5KIT DELIVERABLES........................................................................................................5

Kit Deliverables...............................................................................................................5 Handling Warning...........................................................................................................5

Section 3...............................................................................................................................6BOARD USE REQUIREMENTS.......................................................................................6

Power up the Board..........................................................................................................6Section 4...............................................................................................................................7LPC2148 EDU KIT HARDWARE.....................................................................................7

Board Overview...............................................................................................................7Features List.....................................................................................................................8 Function Blocks..............................................................................................................8

Processor....................................................................................................................8 Power Supply and Management...............................................................................8 Reset Circuitry..........................................................................................................104X4 Keypad...............................................................................................................10User Buttons...............................................................................................................12User LED’s................................................................................................................12 I2C Interface with EEPROM, 7-segment display and RTC...................................13JTAG port..................................................................................................................1416x2 character LCD and 128x64 graphic LCD.........................................................15 ADC and Temperature Sensor.................................................................................16 Buzzer and Relay Circuitry.......................................................................................17 Stepper Motor..........................................................................................................19 UART.......................................................................................................................19 USB..........................................................................................................................20 I/O Pin Expansion....................................................................................................21

Configuration.................................................................................................................21Jumpers..........................................................................................................................21

Section 5.............................................................................................................................22Programming the Kit..........................................................................................................22Section 6.............................................................................................................................24Creating Project in KEIL and Generating HEX file..........................................................24Section 7.............................................................................................................................31LIST OF EXPERIMENTS................................................................................................31

Write assembly language programs for.........................................................................31 a) Addition b) Subtraction c) Multiplication d) Division...............................31

Write the programs in embedded C for the following experiments...............................328-bit LED and switch interface..................................................................................32

www.ngxtechnologies.com2

Page 3: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Buzzer, relay and stepper motor interface.................................................................33Time delay program using built in timer/counter feature..........................................34External interrupt.......................................................................................................35Displaying a number in seven segment.....................................................................364X4 matrix keyboard.................................................................................................37Multi-digit seven segment display.............................................................................38Displaying a message in a 2 line x 16 characters LCD display.................................39ADC and temperature sensor LM35 interface...........................................................40I2C interface - 7 segment display..............................................................................41I2C interface – serial EEPROM.................................................................................42Transmission from Kit and reception from PC using serial port...............................43Generation of PWM signal........................................................................................44Displaying a message in a 128x64 GLCD display....................................................45

Section 8.............................................................................................................................46SCHEMATICS..................................................................................................................46Information........................................................................................................................51

Revision History.......................................................................................................51 Legal.........................................................................................................................51 Disclaimers ..............................................................................................................51 Trademarks ..............................................................................................................51

www.ngxtechnologies.com3

Page 4: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Section 1

Introduction

LPC2148-EDU Evaluation Kit

The LPC2148-EDU Evaluation Kit allows the evaluation of the LPC214x series devices. It has enough features to demonstrate most of the product’s capabilities to the users. The LPC2148-EDU also features extension connectors to allow the users to add new interfaces in case they are not on-board.

References and Applicable DocumentsTable 1: References and Applicable Documents

Tilte CommentLPC2148

Datasheethttp://www.keil.com/dd/docs/datashts/philips/lpc2141_42_44_46_48.pdf

www.ngxtechnologies.com4

Page 5: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Section 2

KIT DELIVERABLES

Kit DeliverablesThe LPC2148-EDU tool kit contains the following items:

• LPC2148-EDU board• Power Supply• one USB cable• one Serial RS232 cable• Graphic LCD • CD which contains, KEIL evaluation version installer, Flash Magic Installer,

schematics, user manual, hex files for experiments, keil project and workspace for implementing all the experiments

Handling Warning• The board must not be subjected to high electrostatic potentials.• Board must always be handled at properly designated work areas.• When not being worked on, the board must be enclosed in the box and stored

safely.• Avoid touching the circuits or components.• Stacking of circuit boards and assemblies should be avoided to prevent physical

damage

www.ngxtechnologies.com5

Page 6: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Section 3

BOARD USE REQUIREMENTS

Power up the BoardUnpack the board taking care to avoid electrostatic discharge. Unpack the power

supply, the power supply rating is DC 6.5V-9V/1A. Connect the power supply DC connector to the board. The board LCD should light up and display a welcome message “NGX TECHNOLOGIES”.

After boot up, you can run some sample code or your own application on the development kit. The kit is shipped with the firmware loaded which displays a message on the 16X2 line LCD display. The moment you power up the board you should observe the message “NGX TECHNOLOGIES” on the display.

www.ngxtechnologies.com6

Page 7: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Section 4

LPC2148 EDU KIT HARDWARE

Board Overview

This section introduces the LPC2148-EDU kit design and various features on this kit. The LPC2148-EDU is based on ARM7TDMI core processor and a set of popular peripherals. It is designed to provide a high performance processor evaluation solution with high flexibility for various kinds of applications.

www.ngxtechnologies.com7

LPC2148

2X16 CHARACTER LCD DISPLAY

128X64 GRAPHIC LCD

DIP SWITCHES

LEDS

UART0 & UART1

USB Type B Connector

I2C RTC

I2C 7- SEGMENT

RELAY

I2C EEPROM

JTAGSTEPPER MOTOR

TEMPRATURE SENSOR

ADC INTERFACE

4X4 KEYPAD

Page 8: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Features ListHere is the list of the main board components and interfaces:

• 4X4 Keypad• 128X64 graphic LCD with backlight• 16X2 character LCD with backlight• 2 UART ports• Temperature sensor• Buzzer interface• User potentiometer connected to ADC interface• 8 user LED’s and buttons• I2C interface with EEPROM, RTC and seven segment display• USB interface• Relay circuit• Stepper motor• JTAG port

Function Blocks

Processor The LPC2148-EDU is equipped with a LPC2148 microcontroller in LQFP64 package. The LPC2148 embeds:

1. 512kB of on-chip flash memory2. 32KB of on-chip SRAM + 8KB RAM for USB

Power Supply and ManagementThe LPC2148-EDU board is supplied by an external 7.5V/1A through input J9.

The adjustable LDO is employed for 3.3V rail that powers all the 3.3V components on board. By closing the jumper J10 3.3V is supplied to the board. The LPC2148 uses 3.3V as its main supply source. There are some components that require 5V power so a 5V regulator is also included. Jumper J11 must be closed to give 5V supply to board.

www.ngxtechnologies.com8

Page 9: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

www.ngxtechnologies.com9

Page 10: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Reset CircuitryThe on-board switch SW19 provide the LPC2148 with external reset

Control. The RESET pin of LPC2148 is connected to this switch and whenever the switch is pressed the board gets RESET. It makes the chip behave as for a power-on reset.

4X4 KeypadLPC2148-EDU has 4x4 keypad that helps you to make your own menu driven

applications or even a simple calculator.

www.ngxtechnologies.com10

Page 11: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

www.ngxtechnologies.com11

Page 12: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

User ButtonsA set of 8 user buttons SW1 are provided as another interface in this kit.

Closing the jumpers of J7 enables that particular button. These buttons act like switch. Turning ON the buttons will turn on the respective LED’s.

User LED’s8 user LED’s are provided through 8 GPIO’s from the chip. Each LED can be

controlled individually. The LED’s are enabled by closing the jumpers of J9.

www.ngxtechnologies.com12

Page 13: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

I2C Interface with EEPROM, 7-segment display and RTCThe LPC2148-EDU board has three interfaces to demonstrate the I2C feature

of LPC2148.

1. EEPROM: The board has external 256Kbit of flash memory2. 7-segment display: Four seven segments are driven by the I2C

interface. Each display can be controlled individually by SCL and SDA lines.

3. RTC: LPC2148-EDU has on-board RTC that can be controlled by two lines SCL and SDA. Remember to add battery for RTC backup at BT1.

www.ngxtechnologies.com13

Page 14: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

JTAG portThe JTAG port J13 is provided for programming and debugging the

board, which can be used to connect any JTAG based programmer/debugger. Jumper J12 must be closed while using this port. A parallel port JTAGis required to program through JTAG port.

www.ngxtechnologies.com14

Page 15: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

16x2 character LCD and 128x64 graphic LCDLPC2148-EDU has 16 characters by 2 lines LCD and a 128x64 graphic LCD.

16x2 LCD is connected to LPC2148 in 4 bit mode. LCD back-light can be controlled by jumper setting of J20. Jumper J18 must be closed to provide power to LCD. The contrast of LCD is controlled by user potentiometer R55.

A default message “NGX Technologies” appears on the LCD when it is turned ON or RESET. The 128x64 graphic LCD is connected with LPC2148 using 8 bit mode. The back-light can be controlled by jumper J21. This LCD uses 3.3V supply and the jumper J20 must be closed for the supply.

NOTE: Remember you cannot use both LCD’s simultaneously

www.ngxtechnologies.com15

Page 16: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

ADC and Temperature SensorThe board has a user interface potentiometer connected to the ADC of

LPC2148. When the POT is rotated the change in value is observed in 16x2 LCD.LPC2148-EDU monitors the room temperature using on-board temperature sensor which is connected to the ADC channel of LPC2148.The sensor is a precision integrated-circuit temperature sensor, whose output voltage is linearly proportional to Celsius temperature.

www.ngxtechnologies.com16

Page 17: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Buzzer and Relay CircuitryA Piezo buzzer is provided that can be used to play sounds. One can

develop various sounds by controlling the GPIO line .The relay provided acts as a switch and can be used for various applications like turning ON a AC bulb by connecting it to J24. The relay is by default in “Normally Open” state. By controlling the GPIO it can be used for controlling the external device connected.

www.ngxtechnologies.com17

Page 18: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

www.ngxtechnologies.com18

Page 19: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Stepper MotorLPC2148-EDU has a stepper motor connector J26. Jumpers J25 must be closed to run the stepper motor. The motor runs on 7.5V supply.

UARTLPC2148-EDU has two UART ports UART0 and UART1. These can be

used for communication with external RS232 based peripherals. UART0 can also be used for In-System Programming (ISP). Jumpers J16 must be closed for this purpose.

www.ngxtechnologies.com19

Page 20: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

USBThe LPC2148-EDU USB port is compliant with USB 2.0 high-speed

device specification. J14 is a B-type receptacle for USB device. The USB can only be used for communication but not to power the board.

www.ngxtechnologies.com20

Page 21: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

I/O Pin ExpansionEach pin of LPC2148 microcontroller is pulled out and given to ports J1, J2, J3

and J4 to provide a way for the customers to define any I/O channels.

Configuration

JumpersTable 2

Jumpers Related Module Usage(Close these jumpers)J10 Power Supply 3.3V power to boardJ11 Power Supply 5V power to boardJ12 JTAG Programming through JTAGJ16 UART Using UART interfaceJ15 ISP Programming through serial port.J23 Buzzer To enable buzzer sound.J5 ADC 3.3V supply to ADC i.e. VREFJ22 ADC Enable ADC using POTJ20 16x2 LCD 1,2-LCD backlight software control.

2,3 – LCD backlight connected to 5V(always ON)J18 16x2 LCD Power supply to 16x2 LCDJ19 Graphic LCD Power supply to graphic LCDJ21 Graphic LCD 2,3– LCD backlight connected to 3.3V(always ON)J25 Stepper Motor Enable stepper motor control.J6 LED’s Enable LED’sJ7 User buttons Enable user buttons

www.ngxtechnologies.com21

Page 22: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Section 5

Programming the Kit

The kit can be programmed through serial port using ‘Flash Magic’. ‘Flash Magic’ is a freeware windows utility used download the hex file format onto the kit. The Flash Magic utility is provided in CD along with the KIT. If your PC does not have a serial port; use a USB to serial converter to download the hex file using the Flash Magic utility.

Here are the simple steps to follow to program the kit using Flash Magic utility

1. Run the FlashMagic.exe under ‘LPC2148_EDU\Tools\Flash Magic’

www.ngxtechnologies.com22

Page 23: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

2. Change the settings as shown below

Note: You will be required to do this setting only once. Thereafter you only need to provide the path for the HEX file on your computer

3. Now, click on Browse for the HEX file to be downloaded, the sample hex files can be found in the CD at ‘LPC2148_EDU\Hexfiles\Experiments’

4. Now make the Kit enter the ISP programming Mode. To get the kit in programming mode you need to follow the simple steps mentioned below

i) TURN OFF the kit using the Power Switchii) Press the ISP button and hold itiii) Now TURN ON kit

5. Now click on Start to program the board and wait for the programming to be complete. You will see a message saying ‘Finished’ on the FlashMagic Window.

www.ngxtechnologies.com23

Page 24: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Section 6

Creating Project in KEIL and Generating HEX file

The NGX LPC2148-EDU kit is compatible with many commercial and open source tools. The kit comes along with a evaluation version of KEIL IDE with 32K Code limit. This limit is sufficient enough for the experiments to be conducted. The installer for the same is provided in the CD that comes along with the kit. The installer can be located at ‘LPC2148_EDU\Tools\keil_setup’. Follow the simple steps as requested by the installer.

The following section explains how to create a KEIL project for the experiments. We will create a example project which will blink the LEDs on the kit. The section assumes that you already have the necessary ‘.c’ and ‘.h’ files required for the project in a specified folder

1. Run the KEIL IDE and go the

www.ngxtechnologies.com24

Page 25: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

2. Select the CPU target as LPC2148 under the option of NXP in the list

3. Next click YES option in the pop-up window

www.ngxtechnologies.com25

Page 26: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

4. Lets give the project a name and save it as shown below

5. Copy the main.c file under the folder where we have the project file saved

www.ngxtechnologies.com26

Page 27: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

6. Include the main.c file into the project as shown below

www.ngxtechnologies.com27

Page 28: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

7. Perform the following settings: ‘Click on Target1’ in the left pain, and then go to ‘Options for target1’ as shown below and in the next pop-up window select the ‘Output’ tab and check the option ‘Create HEX file’ as shown below. Next go to ‘Linker’ tab and check the ‘Use Memory Layout from Target Diaglog’ and click ‘OK’

www.ngxtechnologies.com28

Page 29: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

www.ngxtechnologies.com29

Page 30: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

8. To compile the project click on the icon on top of the left pane, as highlighted below. If the project is successfully compiled a HEX file would be generated in the same path where we have stored the project file. Flash the HEX file using Flash Magic tool as explained earlier

www.ngxtechnologies.com30

Page 31: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Section 7

LIST OF EXPERIMENTS

Write assembly language programs for

a) Addition b) Subtraction c) Multiplication d) Division

Description:Program to perform Arithmetic operations using assembly Language instructions.

Code Path: LPC2148_EDU\Source Code\Experiments\Exp1 InlineAsm

Open the project and build it as explained in Section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\Exp1 InlineAsm\obj\ Inline.hex Program the board using the hex file through serial port using ‘Flash Magic’ as explained in Section 5. The output can be observed on HyperTerminal through UART0 interface.

Algorithm:

Step1: Initialize the variables.

Step2: init serial port.

Step3: Add 'operand1' and 'operand2' and store the result in 'Add'.

Step4: Subtract 'operand1' and 'operand2' and store the result in 'Sub'.

Step5: Multiply 'operand1' and 'operand2' and store the result in 'Mul'.

Step6: Divide ‘operand1’ by 'operand2' and store the result in 'Div'.

Step7: display the result on the HyperTerminal through serial port.

www.ngxtechnologies.com31

Page 32: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Write the programs in embedded C for the following experiments

8-bit LED and switch interface

Description:Program to read switch status and turn on the corresponding LED.

Code Path: LPC2148_EDU\Source Code\Experiments\Exp2Led_Switch

Open the project and build it as explained in Section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\Exp2Led_Switch\obj\Led_Switch.hex Program the board using the hex file through serial port using ‘Flash Magic’ as explained in Section 5.

Algorithm:

Step1: Initialize the variables.

Step2: configure the GPIO's connected to the LEDs.

Step3: configure the GPIO's connected to the switches.

Step4: Read switches.

Step5: check the status of switches.

Step6: Turn ON the LED of the corresponding switch.

Step7: Turn OFF the LED of the corresponding switch.

Step8: Repeat step4 to step7.

www.ngxtechnologies.com32

Page 33: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Buzzer, relay and stepper motor interface

Description:Program to turn ON/OFF the buzzer, relay and to rotate the stepper motor for few

rotations. Code Path: LPC2148_EDU\Source Code\Experiments\Exp3 Buzzer_Relay_Steppermotor

Open the project and build it as explained in Section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\Exp3 Buzzer_Relay_Steppermotor\obj\Led_Switch.hex . Program the board using the hex file through serial port using ‘Flash Magic’ as explained in Section 5.

Algorithm:

Step1: Configure the GPIO's related to stepper motor.

Step2: Turn ON/OFF the buzzer for 3 times.

Step3: Turn ON/OFF the relay for 2 times.

Step4: Rotate the stepper motor for few rotations.

Step5: Stay resistant after step4 (in infinite loop).

www.ngxtechnologies.com33

Page 34: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Time delay program using built in timer/counter feature

Description:Program to show the time delay using built in timer/counter feature.

Code Path: LPC2148_EDU\Source Code\Experiments\Exp4 TimeDelay

Open the project and build it as explained in Section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\ Exp4 TimeDelay \obj\ TimeDelay.hex Program the board using the hex file through serial port using ‘Flash Magic’ as explained in Section 5.

Algorithm:

Step1: Initialize the PLL and MEMMAP.

Step2: Configure the timer for particular delay.

Step3: Turn ON/OFF the buzzer with delay as its ON time and OFF time.

Step4: Repeat Step3.

www.ngxtechnologies.com34

Page 35: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

External interrupt

Description:Program to show the external interrupt.

Code Path: LPC2148_EDU\Source Code\Experiments\Exp5 ExtInt

Open the project and build it as explained in Section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\Exp5 ExtInt\obj\ ExtInt.hex Program the board using the hex file through serial port using ‘Flash Magic’ as explained in Section 5. This can be tested by pressing the any key in matrix keypad.

Algorithm:

Step1: Initialize the variables.

Step2: Configure the keypad in interrupt mode.

Step3: Turn on the buzzer for some time (half second) in keypad Interrupt Service Routine (ISR).

www.ngxtechnologies.com35

Page 36: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Displaying a number in seven segment

Description:Program to display the numbers on seven segment display.

Code Path: LPC2148_EDU\SourceCode\Experiments\Exp6_8_11_Multidigit7seg_display

Open the project and build it as explained in Section 6 and find the hex file in the path LPC2148_EDU\SourceCode\Experiments\Exp6_8_11_Multidigit7seg_display\ obj\7seg_display.hex . Program the board using the hex file through serial port using ‘Flash Magic’ as explained in Section 5.

Algorithm:

Step1: Initialize the variables.

Step2: Initialize I2C0 in Interrupt mode.

Step3: Display the 4 digits on four 7-segment display in up counter manner.

Step4: Repeat step3.

www.ngxtechnologies.com36

Page 37: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

4X4 matrix keyboard

Description:Program to display pressed key value on LCD display.

Code Path: LPC2148_EDU\Source Code\Experiments\Exp7 4x4MatrixKeypad

Open the project and build it as explained in section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\Exp7 4x4MatrixKeypad\ obj\ 4x4MatrixKeypad.hex . Program the board using the hex file through serial port using ‘Flash Magic’ as explained in section 5.

Algorithm:

Step1: Initialize LCD display.

Step2: Initialize keypad in poll mode.

Step3: Keep polling for particular key in matrix keypad.

Step5: Display the particular key pressed on LCD display.

Step6: Repeat step3 to step4

Note: Please ensure that all Switches in SW17 are in ON position for the 4x4MatrixKeypad to work reliably.

www.ngxtechnologies.com37

Page 38: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Multi-digit seven segment display

Description:Program to display the numbers on seven segment display.

Code Path: LPC2148_EDU\SourceCode\Experiments\Exp6_8_11_Multidigit7seg_display

Open the project and build it as explained in Section 6 and find the hex file in the path LPC2148_EDU\SourceCode\Experiments\Exp6_8_11_Multidigit7seg_display\ obj\7seg_display.hex . Program the board using the hex file through serial port using ‘Flash Magic’ as explained in Section 5.

Algorithm:

Step1: Initialize the variables.

Step2: Initialize I2C0 in Interrupt mode.

Step3: Display the 4 digits on four 7-segment display in up counter manner.

Step4: Repeat the step3.

www.ngxtechnologies.com38

Page 39: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Displaying a message in a 2 line x 16 characters LCD display

Description:Program to display a message in a 2 line X 16 characters LCD.

Code Path: LPC2148_EDU\Source Code\Experiments\Exp9 Lcd

Open the project and build it as explained in Section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\Exp9 Lcd\obj\ Lcd.hex. Program the board using the hex file through serial port using ‘Flash Magic’ as explained in Section 5.

Algorithm:

Step1: Initialize LCD display with 4-bit interface, two line and 5X7 dots.

Step2: Clear the LCD display.

Step3: Display the text ‘NGX’ in first line.

Step4: Display the text ‘TECHNOLOGIES’ in second line.

Step5: Stay resistant after step4 (in infinite loop).

www.ngxtechnologies.com39

Page 40: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

ADC and temperature sensor LM35 interface

Description:Program to read on-chip ADC value and Temperature sensor value and displaying

in a 2 line X 16 characters LCD display. Code Path: LPC2148_EDU\Source Code\Experiments\Exp10 Adc_Temp_Lcd

Open the project and build it as explained in Section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\Exp10 Adc_Temp_Lcd\obj\ Adc_Temp_Lcd.hex. Program the board using the hex file through serial port using ‘Flash Magic’ as explained in Section 5. ADC can be tested by tuning the pot R57 for different values of ADC and LM 35 can be tested by exposing the U9 IC to different temperature externally.

Algorithm:

Step1: Initialize ADC.

Step2: Initialize LCD.

Step3: Clear display.

Step4: Read ADC value and display it on first line of LCD.

Step5: Read Temperature value and display it on second line of LCD.

Step6: Repeat step4 to step5.

www.ngxtechnologies.com40

Page 41: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

I2C interface - 7 segment display

Description:Program to display the numbers on seven segment display.

Code Path: LPC2148_EDU\SourceCode\Experiments\Exp6_8_11_Multidigit7seg_display

Open the project and build it as explained in Section 6 and find the hex file in the path LPC2148_EDU\SourceCode\Experiments\Exp6_8_11_Multidigit7seg_display\ obj\7seg_display.hex. Program the board using the hex file through serial port using ‘Flash Magic’ as explained in Section 5.

Algorithm:

Step1: initialize the variables.

Step2: Initialize I2C0 in Interrupt mode.

Step3: display the 4 digits on four 7-segment display in up counter manner.

Step4: Repeat the step3.

www.ngxtechnologies.com41

Page 42: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

I2C interface – serial EEPROM

Description:Program to write data and read the same from a serial EEPROM through I2C

interface.

Code Path: LPC2148_EDU\Source Code\Experiments\Exp12 I2C_Serial_EEPROM

Open the project and build it as explained in section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\Exp12 I2C_Serial_EEPROM\ obj\ I2C_Serial_EEPROM.hex. Program the board using the hex file through serial port using ‘Flash Magic’ as explained in section 5.

Algorithm:

Step1: Initialize LCD.

Step2: Initialize I2C in poll mode.

Step3: test the connection status with slave address of EEPROM.

Step4: write some bytes of data to the EEPROM.

Step5: Read the written data.

Step6: Compare the read and write bytes and if both are same ‘I2C FLASH PASS’ is displayed or else ‘I2C FLASH FAIL’ is displayed on LCD display.

www.ngxtechnologies.com42

Page 43: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Transmission from Kit and reception from PC using serial port

Description:Program to transmit some data to PC through serial port.

Code Path: LPC2148_EDU\Source Code\Experiments\Exp13 Serial

Open the project and build it as explained in section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\Exp13 Serial\ obj\ Serial.hex. Program the board using the hex file through serial port using ‘Flash Magic’ as explained in section 5.

Algorithm:

Step1: Initialize UART0.

Step2: Transfer data “UART0 OK” to PC through Serial port.

Step3: Repeat the step2.

www.ngxtechnologies.com43

Page 44: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Generation of PWM signal

Description:Program to generate PWM signal and the same output is given to drive the LED

D5. Code Path: LPC2148_EDU\Source Code\Experiments\Exp14 PWM

Open the project and build it as explained in section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\Exp14 PWM\obj\ PWM.hex. Program the board using the hex file through serial port using ‘Flash Magic’ as explained in section 5.

Algorithm:

Step1: initialize the GPIO's connected to LEDs.

Step2: Turnoff all LEDs.

Step3: Initialize Vectored interrupts.

Step4: set the PWM cycle.

Step5: start the PWM timer.

Step6: Keep repeating the step4 and step5 if the value of match_counter is not equal to zero.

NOTE: You can change the PWM signal duty cycle by changing the values of ‘#define PWM_CYCLE’ and ‘PWM_OFFSET’ in pwm.h file.

www.ngxtechnologies.com44

Page 45: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Displaying a message in a 128x64 GLCD display.

Description:Program to test on board Graphics LCD displaying a message.

Code Path: LPC2148_EDU\Source Code\Experiments\Exp17 GLCD

Open the project and build it as explained in section 6 and find the hex file in the path LPC2148_EDU\Source Code\Experiments\Exp17 GLCD\obj\ Glcd.hex. Program the board using the hex file through serial port using ‘Flash Magic’ as explained in section 5.

Algorithm:

Step1: Set port0 & port1 pins as High Speed GPIO's

Step2: Initialize the GPIO's connected to GLCD .

Step3: Initialize the GLCD.

Step4: Clear the GLCD.

Step5: Set Page and Column of GLCD to display String.

Step6: Stay resistant after step5 (in infinite loop).

www.ngxtechnologies.com45

Page 46: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Section 8

SCHEMATICS

Below is the schematic of the LPC2148-EDU board:

www.ngxtechnologies.com46

Page 47: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

www.ngxtechnologies.com47

Page 48: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

www.ngxtechnologies.com48

Page 49: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

www.ngxtechnologies.com49

Page 50: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

www.ngxtechnologies.com50

Page 51: LPC2148_EDU-KIT_V1.1

User Manual: LPC2148-EDU BOARD_V1.1

Information

Revision History

version: v1.0 author:Deepak S Patil

LegalNGX Technologies Pvt. Ltd. provides the enclosed product(s) under the following conditions:

This evaluation board/kit is intended for use for ENGINEERING DEVELOPMENT, DEMONSTRATION, EDUCATION OR EVALUATION PURPOSES ONLY and is not considered by NGX Technologies Pvt. Ltd to be a finished end-product fit for general consumer use. Persons handling the product(s) must have electronics training and observe good engineering practice standards. As such, the goods being provided are not intended to be complete in terms of required design-, marketing-, and/or manufacturing-related protective considerations, including product safety and environmental measures typically found in end products that incorporate such semiconductor components or circuit boards. This evaluation board/kit does not fall within the scope of the European Union directives regarding electromagnetic compatibility, restricted substances (RoHS), recycling (WEEE), FCC, CE or UL and therefore may not meet the technical requirements of these directives or other related directives.

The user assumes all responsibility and liability for proper and safe handling of the goods. Further, the user indemnifies NGX Technologies from all claims arising from the handling or use of the goods. Due to the open construction of the product, it is the user’s responsibility to take any and all appropriate precautions with regard to electrostatic discharge.

EXCEPT TO THE EXTENT OF THE INDEMNITY SET FORTH ABOVE, NEITHER PARTY SHALL BE LIABLE TO THE OTHER FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES.

NGX Technologies currently deals with a variety of customers for products, and therefore our arrangement with the user is not exclusive. NGX Technologies assumes no liability for applications assistance, customer product design, software performance, or infringement of patents or services described herein.

Please read the User’s Guide and, specifically, the Warnings and Restrictions notice in the User’s Guide prior to handling the product. This notice contains important safety information about temperatures and voltages.

No license is granted under any patent right or other intellectual property right of NGX Technologies covering or relating to any machine, process, or combination in which such NGX Technologies products or services might be or are used.

Disclaimers

Information in this document is believed to be reliable and accurate. However, NGX Technologies does not give any representations or warranties, expressed or implied, as to the completeness or accuracy of such information and shall have no liability for the consequences of use of such information.

NGX Technologies reserves the right to make changes to information published in this document, at any time and without notice, including without limitation specifications and product descriptions. This document replaces and supercedes all information supplied prior to the publication hereof.

Trademarks

All referenced trademarks, product names, brands and service names are the property of their respective owners.

www.ngxtechnologies.com51