Home

User Manual

image

Contents

1. 2 2 SWPB Sect P016 S13 S14 S15 S16 8 e e e SWPB SW PB SW PB PB R22 P017 INTERNATIONAL CERTIFICATIOI FICATION ISO 9001 2000 We bring the world to you rhydolabz com www rhydolabz com 222 71 TEMPERATURE SENSORINTERFACING LM35 temperature sensor be used to measure environment temperature in the range of 55 Deg to 150 Deg C It s connected to Port 0 P0 27 ADO 0 analog channel Note For the temperature sensor to work the TEMP jumper J6 must be in position EXTERNAL INTERRUPT This development board uses External Interrupt 1 EINTI Button S17 It is connected to PO 14 Note Place jumper on EXT INT J16 pin for the proper functioning of external interrupt V3 3 014 RAO R4 10K 2K J16 117 oH 9 9 EXT INT IP MOODY INTERNATIONAL CERTIFICATIOI FICATION ISO 9001 2000 Q3 20 R45 RTS C30 T ANNE y 33K e D12 4148 We bring the world to you 7 rhydolabz com www rhydolabz com The eCee LPC 2138 development board has 4K SERIAL EEPROM interfacing Internally organized with 256 pages of 2 byte each the 4K requires an 9 bit data word address for random word addressing with data transfer rate 100 kbits s Also it is to be noted that an external EEPROM 24 04 is the slave device to be communicated with the microcontroller via IC protocol EEPROM V3 3 P0 0 2
2. M O O D Y We bring the world to you INTERNATIONAL TIFICATION ISO 9001 2000 rhydolabz com www rhydolabz com 2222 SE POW ER SUPPLY eCee NXP LPC 2138 Board has two power supplies you can choose one of the following ways to supply power 1 Through an Adaptor any standard 9 12V power supply 2 Through the motherboard USB port The external Power Supply circuit is given below EXTERNAL POWER SUPPLY PWR DC V3 3 U5 U6 D9 LM7805 V5 0 1201117933 J12 J10 EE 1 Vin Vout 3 Vin _ Vout 2 1 AM S a 2 14007 5 6 PHONEJACK D10 CON2 b N J11 CI2 2 4Tut 16v 4 C16 17 1 47 Ov 10uf 1 0v 0 1uF 10uf 1 Ov CON2 R30 470R eCee NXP LPC 2138 evaluation board has two clock sources gt 32 768 KHz Crystal as the RTC clock source gt 10 Crystal as the MCU clock source MOODY INTERNATIONAL CERTIFICATIOI FICATION ISO 9001 2000 We bring the world to you rhydolabz com www rhydolabz com 2 SOS LED INTERFACING LED s are the simplest devices to test port functioning The board contains 8 LED s connected to PORTI pins 16 to 23 P1 16 to P1 23 Note For the LEDs to work the LED jumper JS must be in position R14 7 C LED 15 4 D LEJA A P116 RI6 5 117 470R P118 LEJA P119 R23 P120 470R P121 LED A P122 RA
3. P0 25 P0 2 i P0 26 P0 3 E 0 27 P0 28 5 z E P0 29 P0 6 z E P0 30 P0 7 31 a E 1 16 PO 8 3 E 1 17 P0 9 A E 1 18 10 5 E P1 19 E P1 20 PO 12 s 1 21 13 5 s 1 22 14 P123 P0 15 1 24 E E P125 P0 16 P1 26 P0 17 E x P127 P0 18 5 P128 P0 19 E P1 29 P0 20 1 30 P0 21 z E 1 31 0 22 V5 0 P0 23 2 Cl 3 4 VBAT ojrora oiu P0 25 HEADER 25 P0 26 10K DI V3 3 P0 27 P0 28 0 29 RIS 184148 P0 30 P0 31 BT 18 Y EN 61 10MHZ LPC2138 C31 32 wel We bring the world to you ISO 9001 2000 rhydolabz com www rhydolabz com 2 SO pt m r pa pe ILIA V m m m 2 N J B E U B5 E R The eCee LPC 2138 development board has a potentiometer connected to its ADC pin P0 28 Note Place jumper on A2DIN J9 ADC PORT V5 0 SPEAKER INTERNATIONAL CERTIFICATIO FICATION ISO 9001 2000 We bring the world to you rhydolabz com www rhydolabz com CHAPTER 3 SOFIWARE DEVELOPMENT We bring the world to you rhydolabz com www rhydolabz com 22 SE FAMILIARIZATION OF KEIL PROFESSIONAL DEVELOPMENT SUITE CREATING PROJECT Keil uVision3 software is a standard Windows application for project development and be installed like any standard application u Vision3 includes a projec
4. 123 LED R25 poe DO 470R LED R26 7 D LED R27 7 D LED We bring the world to you FICATION ISO 9001 2000 7 rhydolabz com www rhydolabz com The board has all port pins available at Berge strip and at round machine cut female connector The connection is as given below 13 CON25 CON25 CON25 Buzzer 15 connected to PO 7 Note For the Buzzer to work the jumper J5 BUZ must be in position V5 0 LED PWM IK LED PWM wel Id We bring the world to you ISO 9001 2000 rhydolabz com www rhydolabz com LCD LIQUID CRYSTAL DISPLAY The display is a standard 2x16 LCD which displays 2 lines of 16 characters Each character is 40 pixels making it 1280 pixels overall The display receives ASCII codes for each character at the data inputs 00 07 Connection Diagram The LCD module can be used in 4 bit or 8 bit mode The module uses HD44780U from Hitachi as the controller IC The eCee LPC 2138 development board uses 4 bit interface PORTI pins P1 17 P1 23 are used for data command control pins An On Board potentiometer enables to adjust the LCD contrast to a better view in every angle Note For the LCD module to work the LCD jumper J13 must be in position LCD INTERFACING V5 0 C8 10u 10v LCDI LEDS LCD2X16 1 LED 9 RS 4 ED PWM RW 5 E P021 _ 2
5. 1Y1 18 LEDP E R W 7 4 16 RS E 1lA2 1Y2 8 6 14 gt 1A3 7 9 8 12 E DO 2 2 1844 1 4 8 20 1 9 DM D1 2Yl 9 PDI 13 7 D D2 242 2Y2 io P122 I5 5 D6 D3 Po n gt 2 4 HS D 12 ii D 1 GND D 14 7ALV244 We bring the world to you FICATION ISO 9001 2000 rhydolabz com www rhydolabz com 222 SE Lcd module hasl6 pins for interfacing of which 8 are data pins DBO DB7 and 3 RS RW EN are control pins 2402221 VEE _____ N DBS ND 5V C C C C 5V ND MOODY We bring the world to you INTERNATIONAL TIFICATION ISO 9001 2000 rhydolabz com www rhydolabz com 2 SOS UNIVERSAL ASYNCHRONOUS RECEIVER TRANSMITTER UART The LPC 2138 microcontrollers come with two UART modules UARTO and UARTI It has only asynchronous no clock connection mode of operation The UARTO operates through P0 0 TXD and P0 1 RXD pins while the UARTI uses P0 8 TXD P0 9 pins The LPC 2138 UART output itself operates at CMOS voltages and needs an external serial line driver to convert its output into a higher symmetrical line voltage The MAX3232 serial driver serves this purpose Note For the UART module to work the ISP J17 and RST J21 Jumpers
6. P1 Led5 LCD bedS LCD D We bring the world to you rhydolabz com VDD www rhydolabz com We bring the world to you rhydolabz com www rhydolabz com 2 SO TECHNICAL SUPPORT If you are experiencing a problem that 15 not described 1n this manual please contact us Our phone lines are open from 9 00 AM 5 00 PM Indian Standard Time Monday through Saturday excluding holidays Email can be sent to support rhydolabz com LIMITATIONS AND WARRANTEES This product is intended for personal or lab experimental purpose and in no case should be used where it harmfully effect human and nature No liability will be accepted by the publisher for any consequence of its use Use of the product software and or hardware is with the understanding that any outcome whatsoever is at the users own risk products are tested for their best performance before shipping still rhydoLABZ is offering One year Free service warranty Components cost Shipping cost will be charged from Customer DISCLAIMER Copyright Rhydo Technologies P Ltd rights are reserved Reproduction in whole or in part 1s prohibited without the prior written consent of the copyright owner The information presented in this document does not form part of any quotation or contract 15 believed to be accurate and reliable and may be changed without notice Rhydo Technologies P Ltd An ISO 9001 2008 Certified R amp D Company Go
7. Connect HyperTeminal lt Connected 0 00 12 Auto detect Auto detect SCROLL CAPS Print echo f 9 000 Hyper terminal og hyp9600 Properties eg Mame a ASCII Setup ASCII Sending Send line ends with line feeds File Dar Funchon arce and ctl keys act as Tart System Encoding Method Teminalkeys Windows keys k e keyg 5 Select Host System Encoding Method Peu 5 ih v Echo typed characters locally 4 i H pace n CO shitJls Line delay a miliseconds Standard JIS Emulsion Character delay O milliseconds gt Setup ASCII Recenang Telnet terminal ID 0 F C Append line feeds to incoming line ends Backscroll buffer lines 0 Force incoming data to 7 bit ASCII Play sound when connecting disconnecting v Wrap lines that exceed teminal width Ga mmm Disconnected Auto detect Auto detect SCROLL AFS NUM Capture Print echo wel We bring the world you ISO 9001 2000 rhydolabz com www rhydolabz com Select File gt Save A s gt D esktop hyp9500 HyperTerminal m File Ect Transfer Lar oes De OE Savein Desktop Q Em Documents H My Computer Network Places AE Canon LASER SHOT LEP 1210 LjMMAT7520 New Fol
8. M O O D Y We bring the world to you INTERNATIONAL TIFICATION ISO 9001 2000 7 rhydolabz com www rhydolabz com JUMPER LIST J umper Description Set option Set description 1 Microcontroller Pin outs for Already Already Set in Package External Access Package 2 Header Board Connector P ins Already Set Already Setin Package 3 Header Board Connector Pins Already Set Already Set in Package J4 Microcontroller Pin outs for Already Set Already Set in Package External Access Shortto access Buzzer function activate L 5 o Short to access LM35 Access via 00 0 UZ LED PWM 1 2 LCD Brightness vary on PWM 2 3 LCD works normally ED CD P ep LED enable P 1 16 P 1 23 Potentiometer as ADO 1 input Choose DC Power Plug In Provide a 3 3V to an External Module LCD Module Functions External Interrupt Input Access On Program Download 2 Board is RESET Externally 2 Short while Program Downloading 22 USB Device Access M O O D Y INTERNATIONAL CER TIFICATION ISO 9001 2000 1 99 11 2 15 16 9 0 l 1 We bring the world to you 2 rhydolabz com www rhydolabz com USBD Shortto access USB Device Access CANRXD Shortto access CAN Data Reception LPC2129 Only CAN TXD Shortto access CAN Transmission LPC 2129 Only 27 Supply Select 1 2 DC Power is selected short 11
9. Browse the Browse for RDI Driver DLL option and select the H JTAG dll file from the installed HFlasher location Usually found in C Program Files H JTAG H JTAG dll Click Options for Target Target 1 x Device Target Output Listing User Asm Linker Debug Utilities Use Simulator Settings Use RDI Interface Driver Settings RDI Interface Driver Setup Browse for RDI Driver DLL CNProgramFilesHJTAGNHJTAG dl us Browse for ToolConf File 7 Debug Cache Options Cache Code 5 Configure RDI Driver Cancel Help aecz DK Cancel Defaults Help PM o We bring the world to you ISO 9001 2000 f rhydolabz com www rhydolabz com Click Utilities enable Use External Tool for Flash Programming Click Browse in the Command Option and select the file H Flasher exe Usually found in C Program Files H JTAG H Flasher exe Enable Run Independent option Click OK This will exit you from the Configuration Menu Options for Target Target 1 Device Target Output Listing User Asm Linker Debug Configure Flash Menu Command Use Target Driver for Flash Programming Init File E sPragram Use External Tool for Flash Programming Comma
10. LED pVision3 E MARM JTAGW ed Blink c ARM JTAG Led Blink c Description 1 This a sample program of ES EK EE SED zd includezlpczi3x h Project Workspace EE Target 1 A Sy Source Group 1 PU Startup s H Led Blink c Configure Flash Tools define LED 1 lt lt 16 Hdefine LED IO1SET IO1SET LED define LED OFF IO1CLR IO1CLE LED We bring the world to you ISO 9001 2000 1 rhydolabz com www rhydolabz com 22 SE Select Flash Selection under Program Wizard to select the microcontroller in the evaluation board Here we use NXP s LPC2138 controller H Flasher Mew Load Save SaveAas ptions Exit About Flash Selection Vendor AMD Configuration LPC2102 LPC2103 Init Scripts EET Eee Pam Options 0 LPC2104 LPC2105 LPC2106 Size H Flasher Help LPC2109 0 LPC2114 Sector Programming ID LPC2113 2124 LPE2128 21 31 i PC2132 LPE2134 LPC2136 Now select Configuration and set external crystal frequency in the XTAL MHz text box Enter the frequency of the crystal used in th
11. Port pin with jumper select option On Board Pot interface to ADC On Board Buzzer Interface On Board 4x4 16 Keys Matrix Keyboard On Board EEPROM On Board External Interrupt Button On Board Connector for PWM Output PWM controlled LCD backlight On Board Connector for Analog Output On Board Speaker Output LF Amplifier LM 386 On Board Power LED Indicator On Board Reset button Port Pins available at Berge Strip www rhydolabz com Lo Board contains all hardware We bring the world to you rhydolabz com www rhydolabz com 1 On Board JTAG Connector for Debugging Programming Three On Board DB9 Connectors Two for UART and One for CAN On Board USB Connector On Board 1 Amp Voltage Regulator On Board Connector for regulated 3V3 output V WV On Board Connector for regulated 5 output M O O D Y INTERNATIONAL We bring the world to you TIFICATION ISO 9001 2000 rhydolabz com www rhydolabz com CHAPTER 2 HARDWARE INTRODUCTION We bring the world to you 7 rhydolabz com www rhydolabz com FUNCTION MODULE EDS10 000 iaa Regulator ETC i LPC 2138 IC 3 3v Crystal i IL AG Connector LED LCD Interfacing Board BASE BOARD DC Power Ex female MAX 3232 RESET Connector EXT INT DE male Connector DAC MOODY We bring the world to you INTERNATIONAL TIFICATION ISO 900
12. Reset ard and wait till the programming is over m pon Boot Loaderib P Selection 6 Remove jumper on ISP and RST 7 Now Reset the development board a E fT Progress Sending Data to II MANUAL MODE 1 Configure LPC Flash Utility software at the PC side a Browse your hex file here b Select your COM port and Set baud rate 9600 here C Disable DTR RTS for Reset and boot loader selection 2 Connect system serial port to COM port of eCee LPC 2136 Feng UE 3 Put jumper on ISP J17 ISP J20 a a 4 Click Read Device ID ee 5 The software prompts you to reset the development board TUER ES mum use Time Out sec 2 6 Press Reset button 518 and press OK eves 7 Wait till Device Id is shown 5 Click Upload to Flash button in the flash utility software and wait till the programming is over Remove jumper on ISP J17 ISP J20 7 Now Reset the development board Flash Programming Blank Please reset your LPC2000 board now and then press OK Use DTR RTS 1 19695 for Reset and Boot Loader C Boot Loader ID Selection Device TAL Freq kHz 12000 We bring the world to you RTIFICATION ISO 9001 2000 rhydolabz com www rhydolabz com __ JTAG INTERFACE FOR PROGRAMMING DEBUGGING J TAG explained in
13. the file name is Startup S may be open from the Project Workspace Files Tab Most startup files have embedded comments for the uVision3 Configuration Wizard which provides menu driven selections M O O D Y We bring the world to you INTERNATIONAL TIFICATION ISO 9001 2000 rhydolabz com www rhydolabz com Expand All Collapse All Help Stack Configuration Stack Sizes in Bytes Heap Configuration 1 VPBDIV Setup v VPBDIV VPB Clock VPB Clock CPU Clock 2 L XCLKDIV XCLK Pin XCLK Pin CPU Clock 4 Setup MSEL PLL Multiplier Selection 5 i PSEL PLL Divider Selection 2 H Setup v H External Memory Controller Configuration Wizard The default settings of the Startup Code give a good starting point on most single chip applications However you need to adapt the configuration for your target hardware CPU PLL clock and BUS system are target specific and cannot be automatically configured You need to ensure that the settings in the startup file match the other settings in your project The button Edit as Text opens the Startup Code in a standard editor window and allows you to review the source code of this file Create HEX File Once you have successfully generated your application you can start debugging After you have tested your application it 1s required to create an Intel HEX file to download the software into an EPROM programmer o
14. this section is the ARM J TAG Debugger Programmer from 1 Note Connect the J TAG debugger to the development board and make sure that the J TAG J umper in the development board Marked J TAG J 15 is inserted JTAG V3 3 cib C19 10 100 1 Ov E TRST ii TDI TMS TCK RICK TD J RST 15 A 4 R37 R39 R39 4 10K This section explains how to interface ARM JTAG a wiggler compatible module with ARM evaluation board This is a stable and easy to use device which provides a low cost alternative for programming debugging a target board It supports Remote Debug Interfacing RDI This ARM JTAG module is compatible with H JTAG software which is free software available for H JT AG debugging process Install the H JTAG software in your PC The example screens showed here uses uvision 3V3 50 from Keil Software Before you start downloading and debugging process certain settings have to be configured in Kiel uV Project First create a new Kiel uV project or open an already existing one add the needed program in source group and build it Make sure that the hex file 1s created Now select Flash menu and click Configure Flash Tools in it M O O D Y We bring the world to you INTERNATIONAL TIFICATION ISO 9001 2000 7 rhydolabz com www rhydolabz com Xj LED_
15. 00010 25 IO1DIR IO1DIR LED To set LED pin as Output User Syst 26 LED_OFF To OFF LED Fast Interrupt 2 while 1 Interrupt 28 Supervisor 29 LED ON Abort 8230 Delay 1200000 A Software Delay Of 100ms Undefined 31 LED OFF Internal B Delay 1200000 PC 0 00000214 33 Mode User 34 EL 35 B 8 amp Q e 9 36 Symbols Led Blink We bring the world to you CERTIFICATION ISO 9001 2000 rhydolabz com www rhydolabz com CHAPTER 4 1 0 DISTRIBUTION We bring the world to you rhydolabz com www rhydolabz com The Pin Distribution of LPC2138 Development Board 2138 Pin No Type The 1 0 assign of LPC 2138 Board a LM p m cem V55 GND Se ae 9 We bring the world to you 7 rhydolabz com www rhydolabz com 52 o6 et Ce ow f mum Lom 79 1 Lom 79 ew Lm em ST 3 1 3 nm 3 mw ELEM mum DE m a 3 34 Ww ELEM 4 m L3 34 P1 14 1 21 Led6 LCD deWicba PONG 15 Matrix 00 o 0 6 OO 16 Matrix 00 Matike o 3V3 P0 17 Matrix Key
16. 1 2000 7 rhydolabz com www rhydolabz com INTERFACE OVERVIEW LCD CONTRAST SERIAL PORT INTERFACE COMO SERIAL PORT INTERFACE COMI MAX3232 V 1 LCD DISPLAY LED ARRAY USB POWER INTERFACE DC ADAPTER PLUG IN E Lk HEADER BOARD WITH NAE s gt LPC 2138 amp CIRCUITRY 5 E oy ee Mi ee 4x4 MATRIX gt ME n KEYBOARD EXTERNAL EEPROM TEMPERATURE _ SENSOR LMBS EXTERNAL INTERRUPT We bring the world to you ISO 9001 2000 rhydolabz com www rhydolabz com PERIPHERALS DESCRIPTION CONI USB J ack CON2 Power ack JTAG J P1 TAG Connector COMO UARTO Interface via Female DB9 Connector COMI UARTI Interface via Female DB9 Connector LCD CONT LCD Contrast Adjust through Pot CAN PORT CAN Interfacing through Male DB9 LCD1 LCD Display Module HD44780U 1 D8 Light Emitting Diodes 51 516 Matrix Keypad Switches EXT INT S17 External Interrupt Key RESET S18 Reset Key A2DIN R18 Potentiometer as ADC input HDP1206 X Buzzer LM35 Temperature Sensor 74LV244 LED Driver IC External EEPROM 24C04 LM7805 Regulator IC 5V 01117533 Regulator IC 3 3V 74LV244 LCD Driver IC MAX3232 Level Converter LM386 Audio Amplifier U10 1040 CAN interfacing IC c c WW N Cc A CI C c CoO N C Cc
17. 7 rhydolabz com www rhydolabz com 2138 ARM Development Board User Manual Rhydo Technologies P Ltd An ISO 9001 2008 Certified R amp D Company Golden Plaza Chitoor Road Cochin 682018 Kerala State India Phone 0091 484 2370444 2371666 Cell 0091 99466 70444 0091 484 2370579 E mail info Grhydolabz com sales rhydolabz com WebSite http www rhydolabz com rhydo We bring the world you ISO 9001 2000 rhydolabz com www rhydolabz com CONTENTS CHAPTER 1 OVERVI EW CHAPTER 2 HARDWARE INTRODUCTION 4 eCee NXP LPC 2138 Function Module 4 Interface Overview 4 Jumper List Power s Clock source Reset Led interfacing 4 PortPins Berge Strip and Round Machine Cut Female Connector Buzzer Interface and LED PWM Liquid crystal display se Universal Asynchronous Receiver Transmitter UART v Creating HyperTerminal in PC Matrix Keyboard 4 Temperature Sensor Interfacing External Interrupt 4 External EEPROM Interfacing 4 ADC Potentiometer e Audio Amplifier CHAPTER 3 SOFTWARE DEVELOPMENT Familiarization Of Keil Professional Development Suite v Creating a Project v Creating Project File v Select Microcontroller from Device Database We bring the world to you 2 rhydolabz com www rhydolabz com 2 SOS CHAPTER 4 Copy an
18. BLINK pVision3 E ARM JTAG Led_Blink c Loa U EA Download GE g uk M uec 79 lt 2 px gs AN Project Workspace x Target 1 Ti Source Group 1 Startup s Led Blink c Hes Ten ARM JTAGiLed Blink c Description This is sample program of cL o3 Gto 3E 3 EE e includeczlpczi3x h Select RDI Interface Driver and click on Settings in the Debug option Check whether Load Application at Startup and Run to main are enabled Options for Target Target 1 Debug Dutilties Use RDI Interface Driver Settings Device Target Output Listing User Linke C Use Simulator Settings Limit Speed to Real Time Load Application at Startup Run to Load Application at Startup Run to main Initialization File Initialization File m Restore Debug Session Settings Restore Debug Session Settings Breakpoints Toolbox Breakpoints Toolbox Watchpoints amp Watchpoints Memory Display Memory Display CPU DLL Parameter Driver DLL Parameter SARM DLL oLPC21 00 SARM DLL Dialog DLL Parameter Dialog DLL Parameter D amp RMP DLL pLPC21 38 TARMP DLL pLPC21 38 Cancel Defaults Help Click
19. Internet Explorer Program Compatibility Wizard 63 Synchronize MSN Tour Windows XP Outlook Express Windows Explorer Remote Assistance WordPad e Windows Media Player EN Communications 5 Windows Messenger d Windows Movie Maker Foxit Reader Fe Topview Device Programmer B HHD Free Serial Port Monitor ir ucFlash 1 2 ir Microchip Canon LASER SHOTLBP 1210 gt PL 2303 USB Serial Driver k Network Associates 9 K Lite Codec Pack TextAloud Atmel AVR Tools la WINAVR 4 dd OF Wireless Network Setup Wizard 1 HyperTerminal HyperTerminal Met connects to other computers Internet telnet sites bulletin board systems online services and host computers using i modem null madem cable New Connection Wizar Remote Desktop Connection INTERNATIONAL CERTIFICATION ISO 9001 2000 We bring the world to you thydolabz com www rhydolabz com a New Connection Hyper Terminal m E File Call Transfer Helo Connection Description Disconnected Suto detect Auto detect SCR OLE SARS NLIM Capture Print echa m a Enter deads for the phone number that you want bo dit Lountry region 11 We bring the world to you FICAT ISO 9001 2000 rhydolabz com www rhydolabz com File Edit View Call Transfer Help Disconnect
20. con or via the Project Options for Target menu item In the Target tab you specify all relevant parameters of your target hardware and the on chip components of the device you have selected The following dialog shows the settings for our example INTERNATIONAL CERTIFICATIOI FICATION ISO 9001 2000 We bring the world to you rhydolabz com www rhydolabz com Options for Target Target m Device Target output Listing user Linker Debug utilities founded by Philips LPC2132 Code Generation Xtal MHz ae mx Mode Operating system None Use Cross Module Optimization Read Only Memory Areas Read Write Memory Areas off chip on chip IROM The following table describes the options of the Target dialog Dialog Item Description Xtal 5 pecifies the external clock frequency of your device Several microcontrollers use an on chip PLL to generate the CPU clock In this case the value is not identical with the XTAL frequency Check your hardware design carefully to determine the correct value Operating Allows you to select a Real Time Operating System for your project System Use On chip Defines the address spaces for the on chip memory components for the linker locater ROM RAM Note that on some devices you need to reflect this configuration in the Startup Code Configure Startup Code The CPU Startup Code on most ARM targets
21. d Add the CPU Startup Code Create New Source Files Add Source Files to Project SetTool Options for Target Configure Startup Code Creating HEX File Build Project N Connecting the eCee NXP LPC 2138 Development Board Programming Steps v Automatic mode v Manual mode J TAG Programming Debugging DISTRIBUTION The Pin Distribution Of LPC 2138 Evaluation Board We bring the world to you rhydolabz com www rhydolabz com 22 SOS CHAPTER 1 OVERVIEW We bring the world to you 7 rhydolabz com output The eCee LPC2138 Development and Evaluation Board from RhydoLabz can be used to evaluate and demonstrate the capabilities of NXP LPC2138 microcontrollers The board with a base board and header board is designed for general purpose applications and includes a variety of hardware to exercise microcontroller peripherals The LPC2138 components that are required in a single chip LPC2138 system plus 2 COM ports for serial RS232 and interfaces like Lcd Buzzer Keyboard Temperature Sensor Potentiometer Led s EEPROM etc M O O D Y CERTIFICATION ISO 9001 2000 FEATURES Includes LPC2138 Header Board No Separate power adapter required USB power source Two RS 232 Interfaces For direct connection to PC s Serial port On Board Two Line LCD Display 2x16 with jumper select option On Board 8 LED Interface to test
22. der 2 san teach urseF etd ian Bryp2400 ua 3600 9200 4 52 15200 Shortcut bo go Ehrut t Campuler File Netwok Save as lype Disconnected Auto detect Auto detect SCROLL CAPS Capture Print echa wel We bring the world to you ISO 9001 2000 rhydolabz com www rhydolabz com 1 MATRIX KEYBOARD A keypad is simply an array of push buttons connected in rows and columns so that each can be tested for closure with the minimum number of connections There are 16 keys on a phone type pad arranged in a 4X4 matrix Assume the columns are labeled 1 2 3 4 and the rows A B C D If we assume that all the rows and columns are initially high a keystroke can be detected by setting each row low in turn and checking each column for a zero In the KEYPAD circuit the 8 keypad pins are connected to PortO While coding Pins P0 14 P0 17 should be initialized as outputs and pins P0 10 P0 13 as inputs These input pins are pulled high to logic 1 The output rows are also initially set to 1 If a 0 is now output on row A there is no effect on the inputs unless a button in row A is pressed If these are checked in turn for a a button in this row which is pressed can be identified as a specific combination of output and input bits V3 3 R9 10K 010 POI I P012 P013 2 SWPB 014 55 33 o o SW PB EU P015 59 33
23. e evaluation board I H Flasher Mew Load Save Saveds Options Ext About 1 Flash Selection Configuration Flash width x Chip 3 Init Scripts Flash Start Address Porm Options js S Programming Start Address H Flasher Help ATAL MHz we We bring the world you ISO 9001 2000 rhydolabz com www rhydolabz com 222 SE Now Select the Programming option and set as Intel hex Format and select the Source File from your program folder We can also check the Flash and Target unit by clicking Check Now click Program button to program the Target board Mew Load Save Save s lptions Exit About 1 Flash Selection Flash Unchecked g Configuration Target Unchecked 3 Init Scripts 5 Options Es Intel Hex Format Verty 3 H Flasher Help r Sre File BLINK hex x L1 Pragramming Dst Addr Address Size H Flasher Mew Load Save Saveds Options Est About gt gt gt gt 55 gt 5555 5 5 5 gt 5 1 Flash Selection Flash LPC2138 Os0002FF25 Check 2 Configuratiopss 29 Little E ndi 3 Init Scripts Program a OM PEO Programmed and Verified 1 successtully 5 1 V erifu gt 00 00 20 100 7 KB s Size 1 2 KB Erase To 0005 0500005000 Blank Address Size Fead a We b
24. hat asks you for the new project file name You should use a separate folder for each project You can simply use the icon Create New Folder in this dialog to get an empty new folder Select this folder and enter the file name for the new project eg Project uVision3 creates a new project file with the name PROJECTI UV2 which contains a default target and file group name You can see these names in the Project Workspace Files Select Microcontroller from Device Database When you create a new project uVision3 asks you to select a CPU for your project The Select Device dialog box shows the u Vision3 device database Just select the microcontroller you use For We bring the world to you RTIFICATION ISO 9001 2000 1 rhydolabz com www rhydolabz com 1 the example in this chapter we are using the Philips LPC 2138 controller This selection sets necessary tool options for the LPC2132 device and simplifies in this way the tool configuration Select Device for Target Target 1 CPU Vendor founded by Philips Device 2138 Toolset ARM Data base Description Nordic Semiconductor ARM TDMI S based high performance 32 bit RISC Microcontroller with Tr founded by Philips 212KB on chip Hash ROM with In System Programming ISP and In Applic LPC2119 32KB RAM Vectored Intemupt Controller Two UARTs with full modem interface LPC2124 2C ser
25. her a serial connection for In system programming or the JTAG connector Use LPC2000 Flash Utility Software at the side for programming through Serial port Connect eCee LPC 2138 Development board to your PC using USB cable for powering it and serial cable for In serial programming as shown in the figure Note Serial cable should be connected to COMO Port of the development board for downloading Corresponding Jumpers has to be inserted see circuit diagram for the functioning of each peripheral USB POWER JTAG ISO 9001 2000 We bring the world to you rhydolabz com www rhydolabz com 22 SOS PROGRAMMING STEPS eCee LPC 2138 development board supports two modes of programming I AUTOMATIC MODE 1 Configure LPC Flash Utility software at the PC side a Browse your hex file here E eee LPC2000 Flash Utility V2 2 3 e Enable DTR RTS for Reset and boot loader selection Erase Blank Communication d Select your COM port and Set baud rate 9600 here SUE Ene Device 3 elected Sectors 2 Connect system serial port to COM port of eCee LPC 2136 p fecuri after Uploa d ar sector 3 Put jumper on RST J21 ISP J17 and Reset the board ay Er Erase mj 9 4 Click Read Device ID and wait till Device Id is shown 5 Click Upload to Flash button in the flash utility software 2 br
26. ial interfaces Two SPI senal interfaces Three 32 hit timers Watchdog Timer Real Time Clock with optional battery backup Brown out detect circuit General purpose 0 pins clock up to 60 MHz On chip crystal oscillator and On chip PLL EA LPC2141 3 LPC2142 2 LPC2144 eT 0024 _ E x Copy and Add the CPU Startup Code An embedded program requires CPU initialization code that needs to match the configuration of your hardware design This Startup Code depends also on the tool chain that you are using Since you might need to modify that file to match your target hardware the file should be copied to your project folder We bring the world to you ISO 9001 2000 rhydolabz com www rhydolabz com For most devices uVision3 asks you to copy the CPU specific Startup Code to your project This is required on almost all projects exceptions are library projects and add on projects The Startup Code performs configuration of the microcontroller device and initialization of the compiler run time system Answer with Y ES to this question Note The CPU Startup Code typically requires some configuration however the default configuration gives you a good starting point for single chip applications Create New Source Files You may create a new source file with the menu option File New This opens an empty editor window where you can enter your source code nu V
27. ision3 enables the C color syntax highlighting when you save your file with the dialog File Save As under a filename with the extension C Here we save our example file under the name led C include LPC21xx h LPC 2138 definitions ui void delay void Delay function i int i for i 0 i lt 1000 i Delay for LED blink int main void IO 1DIR 0 00 0000 P1 16 23 defined as Outputs while 1 infinite Loop 1015 0XOOFF0000 P1 16 23 pins high 2 delay IO1CLR 0 00 0000 P1 16 23 pins low delay M O O D Y We bring the world to you CERTIFICATION ISO 9001 2000 7 rhydolabz com www rhydolabz com Do O Add Source Files to Project Once you have created your source file you can add this file to your project uVision3 offers several ways to add source files to a project For example you can select the file group in the Project Workspace Files page and click with the right mouse key to open a local menu The option Add Files opens the standard files dialog Select the file led c you have just created Right Click Source Group Click On Add Files to Group Source Group 1 Stop b d Mew Group di Manage Components Remove Group Source Group 1 and its Files Include Dependencies Set Tool Options for Target uVision3 lets you set options for your target hardware The dialog Options for Target opens via the toolbar i
28. lden Plaza Chitoor Road Cochin 682018 Kerala State India Phone 0091 484 2370444 2371666 24 Cell 0091 99466 70444 Fax 0091 484 2370579 E mail info Grhydolabz com sales rhydolabz com h d WebSite http www rhydolabz com r y O M O O D Y We bring the world to you INTERNATIONAL TIFICATION ISO 9001 2000
29. must be removed TTL lt gt RS232 1 6 2 7 8 0 1 uF 3 6 4 4 B3 9 C W C25 5 s T Loe 1 TIOUT 12 e E EE POI 9 n al 8 R2 OUT R2 N RTS EXT INT MAX3232 V3 3 E 2 517 D11 R42 4148 10K RST E R43 I1 33K JRST B18 Q4 BC850 s CD 0 1 uF D13 4148 RESET M O O D Y INTERNATIONAL CERTIFICATIOI FICATION ISO 9001 2000 We bring the world to you rhydolabz com www rhydolabz com CREATING HYPERTERMINAL IN PC The serial data transmitted through UART can be viewed on a PC using a Windows tool for Serial Port Communication called HyperTerminal Internet Mozilla Firefox E mail Qutlook Express Foxit Reader Notepad AVR Studio 4 PonyProg2000 MPLAB IDE Microsoft Office Wor Steps T o Create H yper T erminal Set Program Access and Defaults 7 Mozilla FireFox Windows Catalog Bi Lingual Dictionary Windows Update PonyPrag K TexkAlaud MPS CaodeVision VR amp Accessibility ki lag Accessories ir Games Entertainment System Tools k Microsoft Office kr Address Book j Calculator l an RealTerm B Command Prompt rm Startup k B Notepad 99 Total Uninstall 3 KI Paint
30. nd Program Files H J TA GSH Flasher exe Arguments Aun Independent Cancel Defaults Debugging Programming Connect your evaluation board to the JTAG debugger Make sure that the JTAG is connected to the parallel port of your PC using the cable provided Launch H JTAG software from Start menu 53 windows Media Player E IDE v7 60 4 gt Windows Messenger T p Windows Movie Maker Y Keil uVision3 99 winPicBDD Micrasaft Office War Network Enabler Administrator Alka McAfee H JTAG Ff Atmel AVR Tools d Microchip 4 All Programs b Keil uvision3 Ed H converter HI TECH Software i f HFlasher Micrasaft Office T HaTaG Location C Program Files H JTAG Uninstall fag H JTAG wel PM We bring the world to you ISO 9001 2000 1 rhydolabz com www rhydolabz com It detects device 1d of the controller connected to the evaluation board If the device 1s not detected RESET the evaluation board and Click Detect Target In Operations Menu again In the example we use LPC 2138 microcontroller from NXP with ARM7TDMI S processor H JTAG Server File Operations Flasher Script Settings Options Help Ax F 5 8 x4F 1FOFOF Minimize the H JT AG screen and pop up the Keil window Click Download in the Flash Menu for downloading the program using JT AG The H JTAG automatically pop up
31. r simulator uVision3 creates HEX files with each build process when Create HEX file under Options for Target Output is enabled We bring the world to you RTIFICATION ISO 9001 2000 i rhydolabz com www rhydolabz com Options for Target Target 1 Device Target Output Listing User cc Asm Linker Debug Utilities select Folder for Objects of Executable 785 Create Executable Debug Information Create Batch File Big Endian Create Library Xtest LIB Build Project Typical the tool settings under Options Target are all you need to start a new application You may translate all source files and link the application with a click on the Build Target toolbar icon When you build an application with syntax errors u Vision3 will display errors and warning messages in the Output Window Build page A double click on a message line opens the source file on the correct location in a u Vision3 editor window 1 114 target Target 1 ElFromELF creating hex file l led axf 0 Error s 0 Warning s 3 E We bring the world to you FICATION ISO 9001 2000 2 rhydolabz com DCO CONNECTIONS a AT www rhydolabz com CONNECTING THE DEVELOPMENT BOARD 9191912 RHYDO ocv een oot uo 7 The LPC 2138 requires 9 12V DC adapter or USB connection for power and eit
32. ring the world to you ISO 9001 2000 rhydolabz com www rhydolabz com 2222 71 Yi LED BLIMK pVision3 E ARM JTAG Led_Blink c Edt view Project Now select Start Stop Debug Session from 3 gug Debug menu in the Keil Software GB Wc Project Workspace EN Target 1 H E Source Group 1 Startup s H Led Blink c LED BLIMK pVision3 E ARM JTAG Led_Blink c E File Edit View Project Debug Flash Peripherals Tools SVCS Window Help 8c SS 7S WI SQ RE es s o PPO a ao E o File Name ARM JTAG Led_Blink c Register 06 Description This is a sample program of LED blink in which LED is connecte Current 07 x xk xxx xxx RO 0 0001 0000 08 R1 0028000 09 include lt lpce213x h gt R2 0540000060 10 0 000004 5 define LED 1 lt lt 16 LED is connected to PORT1 16 R4 0 40000010 12 define LED ON IO1SET IO1SET LED R5 0540000000 13 define LED OFF IOICLR IO1CLR LED Ub 000000000 14 R 0 00000000 15 void Delay unsigned long Count R8 000000000 156 t Rg 0 3 93 11 17 while Count gt 0 R10 00000051 18 R11 0 00000000 13 Count R12 0 000001 44 20 R13 SP 0x4000045c 211 R14 LR 0 00000248 22 R15 PC 0 00000214 23 int main CPSA 0540000010 241 SPSR 0 000
33. t manager which makes it easy to design applications for an ARM based microcontroller You need to perform the following steps to create a new project Open Kiel uVision3 Software from start menu or Desktop shortcut Select the Toolset only required for ARM Projects Create Project File and Select CPU Create New Source Files Add Source Files to the Project Set Tool Options for Target Hardware Configure the CPU Startup Code Create a HEX File Build Project and Generate Application Program Code MOODY We bring the world to you INTERNATIONAL TIFICATION ISO 9001 2000 7 rhydolabz com www rhydolabz com The section provides a step by step tutorial that shows you how to create a simple u Vision3 project cs Protel 99 SE Set Program Access and Defaults Windows Catalog Windows Update Programs A Documents 59 IBM Lotus Symphon settings T 8 Internet Explorer J Search b Keil uVision3 MSN Keil uVision3 EA Outlook Express Remote Assistance Help and Support Run Topview Device Programmer B FE e Windows Media Player wr nnn i gt Windows Messenger Start 5 g Windows Movie Maker 2 Windows XP Professional Creating Project File To create new project file select from the u Vision3 menu File New uVision Project This opens a standard Windows dialog t

Download Pdf Manuals

image

Related Search

Related Contents

SRK-4060S  7. Instalación  Membrana en Pasta  Fujitsu HALCYON ASU18CL User's Manual  Ergotron StyleView Laptop Cart, SLA  AHS 40 - 24 AHS 48 - 24 AHS 55 - 24S AHS 60  Fast Track Troubleshooting  取扱説明書  暖房機 総合 カタログ  Extron electronic MPS 409 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file