Sei sulla pagina 1di 51

User Manual: LPC2148-EDU BOARD_V1.

USER MANUAL LPC2148-EDU BOARD

1 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1 Section 1............................................................................................................................4 Introduction..........................................................................................................................4 LPC2148-EDU Evaluation Kit........................................................................................4 References and Applicable Documents..........................................................................4 Section 2...............................................................................................................................5 KIT DELIVERABLES........................................................................................................5 Kit Deliverables...............................................................................................................5 Handling Warning...........................................................................................................5 Section 3...............................................................................................................................6 BOARD USE REQUIREMENTS.......................................................................................6 Power up the Board..........................................................................................................6 Section 4...............................................................................................................................7 LPC2148 EDU KIT HARDWARE.....................................................................................7 Board Overview...............................................................................................................7 Features List.....................................................................................................................8 Function Blocks..............................................................................................................8 Processor....................................................................................................................8 Power Supply and Management...............................................................................8 Reset Circuitry..........................................................................................................10 4X4 Keypad...............................................................................................................10 User Buttons...............................................................................................................12 User LEDs................................................................................................................12 I2C Interface with EEPROM, 7-segment display and RTC...................................13 JTAG port..................................................................................................................14 16x2 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.................................................................................................................21 Jumpers..........................................................................................................................21 Section 5.............................................................................................................................22 Programming the Kit..........................................................................................................22 Section 6.............................................................................................................................24 Creating Project in KEIL and Generating HEX file..........................................................24 Section 7.............................................................................................................................31 LIST 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...............................32 8-bit LED and switch interface..................................................................................32 2 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1 Buzzer, relay and stepper motor interface.................................................................33 Time delay program using built in timer/counter feature..........................................34 External interrupt.......................................................................................................35 Displaying a number in seven segment.....................................................................36 4X4 matrix keyboard.................................................................................................37 Multi-digit seven segment display.............................................................................38 Displaying a message in a 2 line x 16 characters LCD display.................................39 ADC and temperature sensor LM35 interface...........................................................40 I2C interface - 7 segment display..............................................................................41 I2C interface serial EEPROM.................................................................................42 Transmission from Kit and reception from PC using serial port...............................43 Generation of PWM signal........................................................................................44 Displaying a message in a 128x64 GLCD display....................................................45 Section 8.............................................................................................................................46 SCHEMATICS..................................................................................................................46 Information........................................................................................................................51 Revision History.......................................................................................................51 Legal.........................................................................................................................51 Disclaimers ..............................................................................................................51 Trademarks ..............................................................................................................51

3 www.ngxtechnologies.com

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 products 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 Documents


Table 1: References and Applicable Documents Tilte LPC2148 Datasheet Comment http://www.keil.com/dd/docs/datashts/philips/lpc2141_42_44_46_48.pdf

4 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

Section 2 KIT DELIVERABLES


Kit Deliverables
The 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

5 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

Section 3 BOARD USE REQUIREMENTS


Power up the Board
Unpack 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.

6 www.ngxtechnologies.com

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.

2X16 CHARACTER LCD DISPLAY

128X64 GRAPHIC LCD

4X4 KEYPAD RELAY ADC INTERFACE TEMPRATU RE SENSOR I2C 7SEGMENT I2C RTC I2C EEPROM USB Type B Connector DIP SWITCHES

L E D S

LPC2148

UART0 & UART1

STEPPER MOTOR

JTAG

7 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

Features List
Here 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 LEDs 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 memory 2. 32KB of on-chip SRAM + 8KB RAM for USB

Power Supply and Management


The 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.

8 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

9 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

Reset Circuitry
The 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 Keypad
LPC2148-EDU has 4x4 keypad that helps you to make your own menu driven applications or even a simple calculator.

10 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

11 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

User Buttons
A 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 LEDs.

User LEDs
8 user LEDs are provided through 8 GPIOs from the chip. Each LED can be controlled individually. The LEDs are enabled by closing the jumpers of J9.

12 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

I2C Interface with EEPROM, 7-segment display and RTC


The LPC2148-EDU board has three interfaces to demonstrate the I2C feature of LPC2148. 1. 2. 3. EEPROM: The board has external 256Kbit of flash memory 7-segment display: Four seven segments are driven by the I2C interface. Each display can be controlled individually by SCL and SDA lines. 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.

13 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

JTAG port
The 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 JTAG is required to program through JTAG port.

14 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

16x2 character LCD and 128x64 graphic LCD


LPC2148-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 LCDs simultaneously

15 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

ADC and Temperature Sensor


The 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.

16 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

Buzzer and Relay Circuitry


A 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.

17 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

18 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

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

UART
LPC2148-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.

19 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

USB
The 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.

20 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

I/O Pin Expansion


Each 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 Jumpers
Table 2 Jumpers J10 J11 J12 J16 J15 J23 J5 J22 J20 J18 J19 J21 J25 J6 J7 Related Module Power Supply Power Supply JTAG UART ISP Buzzer ADC ADC 16x2 LCD 16x2 LCD Graphic LCD Graphic LCD Stepper Motor LEDs User buttons Usage(Close these jumpers) 3.3V power to board 5V power to board Programming through JTAG Using UART interface Programming through serial port. To enable buzzer sound. 3.3V supply to ADC i.e. VREF Enable ADC using POT 1,2-LCD backlight software control. 2,3 LCD backlight connected to 5V(always ON) Power supply to 16x2 LCD Power supply to graphic LCD 2,3 LCD backlight connected to 3.3V(always ON) Enable stepper motor control. Enable LEDs Enable user buttons

21 www.ngxtechnologies.com

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

22 www.ngxtechnologies.com

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 Switch ii) Press the ISP button and hold it iii) 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. 23 www.ngxtechnologies.com

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

24 www.ngxtechnologies.com

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

25 www.ngxtechnologies.com

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

26 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1 6. Include the main.c file into the project as shown below

27 www.ngxtechnologies.com

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

28 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

29 www.ngxtechnologies.com

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

30 www.ngxtechnologies.com

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.

31 www.ngxtechnologies.com

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.

32 www.ngxtechnologies.com

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).

33 www.ngxtechnologies.com

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.

34 www.ngxtechnologies.com

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).

35 www.ngxtechnologies.com

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.

36 www.ngxtechnologies.com

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.

37 www.ngxtechnologies.com

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.

38 www.ngxtechnologies.com

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).

39 www.ngxtechnologies.com

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.

40 www.ngxtechnologies.com

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.

41 www.ngxtechnologies.com

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.

42 www.ngxtechnologies.com

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.

43 www.ngxtechnologies.com

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.

44 www.ngxtechnologies.com

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).

45 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

Section 8 SCHEMATICS
Below is the schematic of the LPC2148-EDU board:

46 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

47 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

48 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

49 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1

50 www.ngxtechnologies.com

User Manual: LPC2148-EDU BOARD_V1.1


Information Revision History version: v1.0 author:Deepak S Patil

Legal NGX 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 users 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 Users Guide and, specifically, the Warnings and Restrictions notice in the Users 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.

51 www.ngxtechnologies.com

Potrebbero piacerti anche