User Manual for NXP LPC213X Advanced Development Board

User Manual for NXP LPC213X Advanced Development Board

Overall rating

PS-LPC2138 ADK, ARM Development Kit is proposed to smooth the progress of developing and debugging of various designs encompassing of High speed 32-bit MCU from NXP. The board supports NXP’s LPC214x family devices with various memory and peripheral options. It integrates on board two UARTs, LEDs, Relays, Motor Interface, keypads, an ADC input and GLCD/LCD Display to create a stand-alone versatile test platform.

General Block Diagram



  • MCU: LPC2138 16/32 bit ARM7TDMI-s™ with 512k Bytes Program Flash, 32k bytes Ram, RTC, 8x 10 bit ADC 2.44 us, 2x UARTS, I2C, SPI, 2x 32bit Timers, 8x CCR, 6x PWM, WDT, 5V Tolerant I/O, up to 60MHZ operation
  • Standard JTAG connector with arm 2x10 pin layout for programming and debugging with ARM-JTAG.


External Peripheral Modules

  • 128X64 GLCD Interface
  • 2x16 Character LCD with Contrast adjust
  • 10Mbps Ethernet Interface.
  • 4-Nos. of common anode seven segment display.
  • 8-Nos. General purpose Point LEDs.
  • 8-Nos. of Slide switches (Digital Inputs).
  • 4x4 Matrix keypad
  • Stepper Motor Driver Output.
  • Two Nos. of 5V Relay with termination.
  • Two PS/2 keyboard Interface.

Communication Protocols

  • CAN (2.0A and 2.0B) (Bosch)
  • I2C Two Wire Interface (NXP)
  • SPI (Motorola)
  • 1-wire Technology (Maxim-Dallas)
  • Two Full Duplex UART (EIA)
  • RS485 (EIA)

Other Features

  • Digital to Analog Converter.
  • Real Time Clock with Battery Backup.
  • Serial EEPROM memory.
  • Digital Temperature sensor
  • RS485 serial communication through long distance(>200m)
  • On board voltage regulator (3.3V - 800mA, 5V – 1000mA).
  • External USB power supply (5V, 500mA).
  • On-board FLASH ISP Programming.
  • Two pushbuttons for Interrupts study.
  • Power ON status Indication LED.
  • User selectable jumpers.
  • Li-ion 3V Battery Holder
  • 12 MHz crystal on socket, allow easy communication setup (4x PLL = 48 MHz CPU clock)
  • 32.768Khz crystal and RTC backup battery connector
  • Extension headers for MCU ports.

Connectors and Jumper Details

JP7 - 10PIN Box Header (P0.0 - P0.7)


JP11 - 10PIN Box Header (P0.8 - P0.15)


JP13 - 10PIN Box Header (P0.16 - P0.23)


JP14 - 10PIN Box Header (P0.25 - P0.31)


JP8 - 10PIN Box Header (P1.16 – P1.23)


JP12 - 10PIN Box Header (P1.24 – P1.31


JP5 – 3pin Header (Power select connectors)


Jumper for Enable Power to MCU

The pins to be closed for the corresponding power selection is highlighted in the below description.

  • Short Pin 1&2 of JP5(+3.3V, to All Port I/O connector)


  • Short Pin 2&3 of JP5(+5V, to All Port I/O connector)


Power Supply

The external power can be AC or DC, with a voltage between (9V/12V,1A output) at 230V AC input. The ARM board produces +5V using an LM7805 voltage regulator, which provides supply to the peripherals. +LM1117 Fixed 3.3V positive regulator used for processor & processor related peripherals. USB socket meant for power supply only, user can select either USB or Ext power supply through JP1. Separate On/Off Switch (SW1) for controlling power to the board.


MCU Sockets

The ARM Mother board is delivered with NXP’s LPC2138 64-pin PQFP package, its on-board JTAG connector is provided to debug & download code to the processor. 5. Flash Programming Utility.

FLASH Programming

NXP (Philips)

NXP Semiconductors produce a range of Microcontrollers that feature both on-chip Flash memory and the ability to be reprogrammed using In-System Programming technology. We have provided the Programming Utility with the package with which you can install the software and explore our ARM LPC2138/48 Boards.

Program / Execution Mode


Note : Make switch SW2 (pin-1) to the ‘ON’ position while programming the

  • Ensure while SW3 (Rxd and Txd) pins must be ‘on’ position.

Step 1: Select Device LPC2138


Step 2: Read Device Signature


Step 3: Locate Hex File and Start Programming


On-board Peripherals

The Development board comes with many interfacing options

  • 8-Nos. of Point LED’s (Digital Outputs).
  • 8-Nos. of Toggle switches (Digital Inputs).
  • 2 Lines X 16 Character LCD Display.
  • 128X64 GLCD Interface
  • On-chip Real Time Clock with battery backup.
  • 4 Nos. of Seven-segment display.
  • Digital Temperature Sensor
  • 4 X 4 Matrix keypad.
  • Relay / Stepper Motor driver circuit.
       - SPI - Digital to Analog Converter.
       - Serial EEPROM memory.
       - RS485 serial communication through long distance(>200m)
       - Two UART for serial port communication through PC.
       - Two Nos. of PS/2 Interface.
       - 10Mbps Ethernet Interface.

Light Emitting Diodes

  • Light Emitting Diodes (LEDs) are the most commonly used components, usually for displaying pin’s digital states.
  • The ARM AD Board have 8 nos., of Point LED, user can interface the point LEDs with any port.
  • Connector CN4 for LED connector, when High Level goes to the pin LED glows.


Digital Inputs Toggle Switch

  • This is another simple interface, 8-Nos. of toggle switch, mainly used to give an input to the port lines, and for some control applications also.
  • User can change the level of digital inputs whatever they want, either high or low by simply selecting the jumper J3. The switches are connected to +5V, in order to detect a switch state, pull-up or pull-down resistors should be used.



  • When using a LCD, the connector CN6 connects the LCD to Microcontroller port lines. User can use the LCD Data lines to Port P0[0-7], P0[16-24], P0[25-32] and P1[16-31], it is mandatory not to use P0[8-15], since P0 lines P0.12(RS), P0.13(R/W) and P0.14 (Enable) connected by default. The LCD’s contrast can be adjusted by varying the trimpot (R18).
  • Before using LCD insert the shunt or shorting link of jumper J5 mentioned to CHAR legend mark.
  • Place 2x16 Character LCD to proper place, mentioned legend in PCB.


Note: The RED Highlighted buttons indicate the position of SW31 it should be for the above described operation. We follow the same schematic representation for all switches in the following chapters of the manual.

128X64 Graphic LCD

  • When using a Graphic LCD, the connector CN6 connects the LCD to Microcontroller port lines. User can use GLCD Data lines to Port P0[0-7], P0[16-24], P0[25-32] AND P1[16-31], not P0[8-15], because P0 lines P0.10(CS1), P0.11(CS2), P0.12(RS), P0.13(R/W) and P0.14 (Enable) connected by default. The LCD’s contrast can be adjusted by varying the trimpot (R18).
  • Before using LCD insert the shunt or shorting link of jumper J5 mentioned to GLCD legend mark. Adjust(R18) for GLCD Negative Voltage
  • Place GLCD to proper place, mentioned in PCB.


Note:    SW31 make switch positions above for GLCD. Also please note the switch positions highlighted for the ARM ADB to switch over the desired operation.

RS-232 Communication

  • RS-232 communication enables point-to-point data transfer. It is commonly used in data acquisition applications, for the transfer of data between the microcontroller and a PC.
  • The voltage levels of a microcontroller and PC are not directly compatible with those of RS-232, a level transition buffer such as MAX3232 be used.


Note : Make switch positions like above, UART0(P1) & UART1(P2)


The RS232 is a promising way to communicate with the Evaluation Board. It is for that we have included the example codes, with which one can study the RS232 communication. The example code can be determined from the CD, “\ARM EVB_LPC2138\Example Codes\Example\UART0&1\”.

To test the RS232 dynamically with the Evaluation Board…

After programming the LPC2138, the user can connect the RS232 cable from the PC with the COM0/COM1 of the ARM EVB. The output from the EVB can be displayed in the PC’s HyperTerminal window as follows:

Start-> All Programs -> Accessories -> Communication -> HyperTerminal

Choose a name for the window, the COM port number and select the desired baud rateŦ.

The code can be used to check both UART0 and UART1 of the ARM LPC2138, by connecting the serial cable with COM0 or COM1 of the EVB.

Ŧ - The default baud rate in our example program is 9600 bits/s.

Screen Shot of the HyperTerminal:


The output of the example code for UART0 of ARM LPC 2138 …


Real Time Clock

  • The Real Time Clock (RTC) is a set of counters for measuring time when system power is on, and optionally when it is off. It uses little power in Power-down mode. On the LPC2131/2/4/6/8, the RTC can be clocked by a separate 32.768 KHz oscillator, or by a programmable prescale divider based on the VPB clock. Also, the RTC is powered by its own power supply pin, VBAT, which can be connected to a battery or to the same 3.3 V supply used by the rest of the device.


  • Measures the passage of time to maintain a calendar and clock.
  • Ultra Low Power design to support battery powered systems.
  • Provides Seconds, Minutes, Hours, Day of Month, Month, Year, Day of Week, and Day of Year.
  • Dedicated 32 kHz oscillator or programmable prescaler from VPB clock.
  • Dedicated power supply pin can be connected to a battery or to the main 3.3 V.


The AT24C01A/02/04/08/16 provides 1024/2048/4096/8192/16384 bits of serial electrically erasable and programmable read-only memory (EEPROM) organized as 128/256/512/1024/2048 words of 8 bits each. The device is optimized for use in many industrial and commercial applications where low-power and low-voltage operation are essential.

Features of AT24Cxx:

  • Internally Organized 128 x 8 (1K), 256 x 8 (2K), 512 x 8 (4K)
  • 2-wire Serial Interface
  • Schmitt Trigger, Filtered Inputs for Noise Suppression
  • Bi-directional Data Transfer Protocol
  • 100 kHz (1.8V, 2.5V, 2.7V) and 400 kHz (5V) Compatibility
  • Write Protect Pin for Hardware Data Protection
  • 8-byte Page (1K, 2K), 16-byte Page (4K, 8K, 16K) Write Modes
  • Partial Page Writes are Allowed
  • Self-timed Write Cycle (10 ms max)


Seven Segment Display

In Embedded module 4 nos. of common anode seven segment displays are used. The segment lines of seven segments LED is being terminated at connector CN5. The digit select lines are connected to the port pins of LPC2138 by using BC547. All the common anode displays consume very small amount of current. User can use segment lines at any port P0, in all, not (P0.8-P0.15), P1, by default digit select lines connected to Port P0 of PinP0.10 to P0.13.


Note: SW31, Make switch settings like above.


Microcontroller’s two external interrupts lines are terminated at switches SW5 (EXINT1) and SW6 (EXINT2).


Note: While using interrupt short pin 1&2 at JP9(EXINT1) and 1&2 for JP10(EXINt2)

The interrupts can be studied with the help of our example coding enclosed in the package. The code could be found from the CD,

“\ARM EVB_LPC2138\Example Codes\Example\Two_Interrupts\...”

The output of the interrupts can be visualized using UART…

The program responds to both the interrupts. Int1 increments a variable and displays in the hyperterminal and Int2 decrements the same variable and displays. The UART1 of LPC 2138 is used for the interrupt study.

The screen shots of the Interrupt program execution is as follows…

  • Interrupt 1


  • Interrupt 2


DS1820 Digital Thermometer

  • The DS1820 digital thermometer is well suited to environmental temperature measurement, having a temperature range of –55C to 125C and an accuracy of +/-0.5C.
  • DS1820 connected to Port P0.26 or P0.29, user can use any of these.


  • Unique 1-Wire interface requires only one port pin for communication
  • Multi-drop capability simplifies distributed temperature sensing applications
  • Can be powered from data line. Power supply range is 3.0V to 5.5V
  • Measures temperatures from -55°C to +125°C (-67°F to +257°F)
  • ±0.5°C accuracy from -10°C to +85°C
  • 9-bit thermometer resolution, Converts temperature in 750ms (max.)


4x4 Matrix keypad

Keypads arranged by matrix format, each row and column section pulled by high or low by selection J2, all row and column lines terminated at CN3.


Motor / Driver Section

The ULN2803A is a high-voltage, high-current Darlington transistor array. The device consists of eight npn Darlington pairs that feature high-voltage outputs with common-cathode clamp diodes for switching inductive loads. The collector-current rating of each Darlington pair is 500 mA. The Darlington pairs may be connected in parallel for higher current capability.

ULN2803 is used as a driver for port I/O lines, drivers output connected to relay and stepper motor, user can give external supply J7 PTB connector. Stepper Motor can connect JP17 or J6 connector.


Note: Select VCC, Internal or External through JP20 header.

Relay & Buzzer Section

In ADB Board two no. Of SPDT relays and one continuous buzzer are used. Both the relays operate on 5V DC. The outputs of both the terminals of the relay are taken out on the connecter to connect the external circuitry. The relay can be connected to the Microcontroller through any of the selected port. But one has to make sure that the Relay and Buzzer interfaces to GPIO Ports(D7 – D0) is done through the Upper Nibble (D6, D5, D4) of the FRC connectors JP7, JP8, JP11, JP12, JP13, JP14.


The Relay and Buzzer are connections in the connector CN7 are highlighted as above.


The Microchip Technology Inc. MCP492X are 2.7 – 5.5V, low-power, low DNL, 12-Bit Digital-to-Analog Converters (DACs) with optional 2x buffered output and SPI interface.

The MCP492X are DACs that provide high accuracy and low noise performance for industrial applications where calibration or compensation of signals (such as temperature, pressure and humidity) is required.


  • 12-Bit Resolution
  • ±0.2 LSB DNL (typ), ±2 LSB INL (typ)
  • Single or Dual Channel
  • SPI™ Interface with 20 MHz Clock Support
  • Simultaneous Latching of the Dual DACs w/LDAC
  • Fast Settling Time of 4.5 μs
  • Selectable Unity or 2x Gain Output
  • 450 kHz Multiplier Mode
  • External VREF Input


Note : Make switch settings SW33 & SW34 like below


The Max485 is a differential line transceiver suitable for high speed bidirectional data communication on multipoint bus transmission lines. It is designed for balanced data transmission and complies with EIA Standards RS-485 and RS-422. The part contains a differential line driver and a differential line receiver. Both the driver and the receiver may be enabled independently.


  • Meets EIA RS-485 Standard
  • 5 Mbps Data Rate
  • Single 5 V Supply
  • –7 V to +12 V Bus Common-Mode Range
  • High Speed, Low Power BiCMOS
  • Thermal Shutdown Protection
  • Short-Circuit Protection
  • Driver Propagation Delay: 10 ns
  • Receiver Propagation Delay: 15 ns
  • High Z Outputs with Power Off


Exemple Code

\Examples Code\RS485\send\out\send.hex

PS/2 Interface

\Examples Code\RS485\receive\out\receive.hexUser can connect PS/2 Devices like keyboard, mouse to the ARM ADB board. The ARM ADB is comprised of two PS/2 Interface circuits namely PS/2(1) and PS/2(2). PS/2’s DATA and CLK lines are connected to MCU’s Port Lines by default to

  • P1.16 DATA [PS/2(1)]
  • P1.17 CLK [PS/2(1)]
  • P1.18 DATA [PS/2(2)]
  • P1.19 CLK [PS/2(2)]



For an example, the keyboard connected to the ADB board it act as a pc keyboard, pressed key code displayed in LCD or PC’s Hyper terminal window.



The ENC28J60 is a stand-alone Ethernet controller with an industry standard Serial Peripheral Interface (SPI™). It is designed to serve as an Ethernet network interface for any controller equipped with SPI.

The ENC28J60 meets all of the IEEE 802.3 specifications. It incorporates a number of packet filtering schemes to limit incoming packets. It also provides an internal DMA module for fast data throughput and hardware assisted IP checksum calculations. Communication with the host controller is implemented via two interrupt pins and the SPI, with data rates of up to 10 Mb/s. Two dedicated pins are used for LED link and network activity indication.

Ethernet Controller Features

IEEE 802.3 compatible Ethernet controller

  • Integrated MAC and 10BASE-T PHY
  • Receiver and collision squelch circuit
  • Supports one 10BASE-T port with automatic polarity detection and correction
  • Supports Full and Half-Duplex modes
  • Programmable automatic retransmit on collision
  • Programmable padding and CRC generation
  • Programmable automatic rejection of erroneous packets
  • SPI™ Interface with speeds up to 10 Mb/s


  • Place all jumpers of header J10 for E

RJ-45 In-built Transformer


Driver Section


ENC28J60 Section


CAN (Controller Area Network)

Controller–area network (CAN or CAN-bus) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other within a vehicle without a host computer. CAN is a message based protocol, designed specifically for automotive applications but now also used in other areas such as industrial automation and medical equipment.

  • • PS-PERIPHERAL board has one CAN communication device, MCU is connected to device through SPI bus. To enable CAN interface, user can select switch settings SW33 and SW34.

CAN Interface Switch Settings


Note : For CAN Interface User Needs Two ARM7 Slicker Boards (One for Node1 and another for Node2)

  • Remove all jumpers of header J10

CAN output terminations

ARM7 Board 1 (Node1) (CON J9) CAN - L  ←→  ARM7 Board 2 (Node2) (CON J9) CAN – L

ARM7 Board 1 (Node1) (CON J9) CAN - H  ←→   ARM7 Board 2 (Node2) (CON J9) CAN - H

Join the World's Largest Technical Community

we respect your privacy.