Friday, 17 June 2016

ARM LPC2129 Mini Development Board – Overview

ARM LPC2129 Mini Development Board from RhydoLabz can be used to evaluate and demonstrate the capabilities of LPC2129(ARM7TDMI-S) microcontrollers. The board is designed for general  purpose applications and includes a variety of hardwares to exercise microcontroller peripherals.Ideally suitable for training and development purposes.
Key Features :
  • Compact and ready to use design
  • On Board 10 MHz Crystal Oscillator
  • Integrated ARM LPC2129 Microcontroller
  • Professional EMI/RFI Complaint PCB Layout Design for Noise Reduction 
  • High Quality Two layer PTH PCB 
  • Multiple programming options – USB/RS-232 with jumper selection at UART0
  • No separate programmer required (Built in Boot loader)
  • Power indication LED (Red)
  • Multiple Power source (USB, RMC Connector, DC barrel jack) with jumper selection
  • Power Supply with Reverse Polarity Protection
  • Controller Area Network (CAN) transceiver
  • CAN Controller (MCP 2551) interface
  • CAN connection taken from RMC connecter (+5V, CANH, CANL, GND)
  • Jumper selection at CAN RX & CAN TX 
  • Buzzer interface
  • Pot interface to ADC 
  • Temperature Sensor (MCP 9700) interface
  • For Buzzer,Temperature Sensor and Potentiometer jumper selection available, if necessary interface independently
  • Servo motor(SIG,+5V,GND), LCD & ZigBee can be easily interfaced through on-board connectors
  • Potentiometer for contrast control
  • ZigBee can be interfaced from either side of the board at UART0
  • 4 on-board switches including a RESET switch
  • 3 on-board SMD LED s connected to port pins
  • SMD LEDs and Switches , if necessary interface independently
  • Breadboard can be attached to the board
  • 5V and 3.3V regulators available
  • 3.3V/5V output available in berg strips
  • External power supply and adapter having range of 7 – 9V DC
  • In UART0 communication, position of programmer switch should be in manual mode
  • UART0 available at RMC connecter with jumper selection option for power i.e;  3.3V/5V 
  • UART1 available on berg strip (GND,TXD1,RXD1)
  • Two on board programming modes
    • Automatic  -  no reset, no ISP jumper
    • Manual      -  insert ISP jumper & press reset switch
  • ISP jumper should be removed for code execution
  • On Board JTAG Connector for Debugging/Programming
  • All port pins available at Berg Strip
LPC2129 Chip Specification :
  • 16/32-bit ARM7TDMI-S microcontroller in a 64 or 144 pin package
  • 16 kB on-chip Static RAM 
  • 128/256 kB on-chip Flash Program Memory 
  • 128-bit wide  interface/accelerator enables high speed 60 MHz operation
  • External 8, 16 or 32-bit bus (144 pin package only) 
  • In-System Programming (ISP) and In-Application Programming (IAP) via on-chip boot-loader software
  • Flash programming takes 1ms per 512 byte line.Single sector or full chip erase takes 400ms
  • EmbeddedICE-RT interface enables breakpoints and watch points
  • Interrupt service routines can continue to execute whilst the foreground task is debugged with the on-chip Real Monitor  software
  • Embedded Trace Macrocell enables non-intrusive high speed real-time tracing of instruction execution
  • 2/4 interconnected CAN interfaces with advanced acceptance filters
  • 4/8 channel 10-bit A/D converter with conversion time as low as 2.44 ms
  • Two 32-bit timers (with 4 capture and 4 compare channels)
  • PWM unit (6 outputs), Real Time Clock and Watchdog
  • Multiple serial interfaces including two UARTs (16C550), Fast I2C (400 kbits/s) and two SPIs™
  • 60 MHz maximum CPU clock available from programmable on-chip PLL
  • Vectored Interrupt Controller with configurable priorities and vector addresses
  • Up to forty-six (64 pin) and hundred-twelve (144 pin package) 5V tolerant general purpose I/O pins
  • Up to 12 independent external interrupt pins available (EIN and CAP functions)
  • On-chip crystal oscillator with an operating range of 1 MHz to 30 MHz
  • Two low power modes
    • Idle
    • Power-down
  • Processor wake-up from Power-down mode via external interrupt
  • Individual enable/disable of peripheral functions for power optimization
  • Dual power supply
    • CPU operating voltage range of 1.65V to 1.95V (1.8V +/- 8.3%)
    • I/O power supply range of 3.0V to 3.6V (3.3V +/- 10%)
The following figures illustrate the peripheral features of the board:
  • J7,J9 - To select programming source as serial port/USB port
  • SW5(Programmer switch) – To select auto/manual mode of programming
  • J15(ISP jumper) - To be shorted in manual mode of programming & should be removed for code execution
  • Power LED - Glows when the board is powered
  • K2(Power jumper) - To select power source as USB/DC source
  • J8(JTAG jumper) - Toenable 20 pin JTAG connector for debugging
  • LED - 3 x On-board SMD LED s
  • SWITCH - 3 x On-board switches
  • SW (RESET) - Reset switch
  • J1,J2,J3 – Jumpers connects LEDs to port pins P0.17, P0.18 & P0.19
  • J4,J5,J6 – Jumpers connects Switches to port pins P0.14, P0.15 & P0.16
  • J10 – Jumper connect Buzzer to P0.21
  • J11 – Connects Temperature Sensor to P0.28(AD0.1)
  • J12 – Connects Potentiometer to P0.29(AD0.2)
  • J13,J14 – Connects CAN TX , CAN RX to CAN Controller (MCP 2551)
  • J16 – Jumper for selecting 3.3/5 V level when using UART0 through K14
  • K12 – Connector for accessing UART1
  • K13 – Connector for interfacing Servo Motor at P1.24
  • K14 – Connector for accessing UART0
  • K15 – Connector for accessing CAN
  • LCD – 16 pin Berg strip connector for LCD
Layout
Powering     The board could be powered using 3 different ways
  • USB connector
  • DC Barrel Jack Connector
  • RMC Connector
The supply source can be selected as DC/USB using the jumper(K2). If DC source is selected, then either DC Barrel Jack or RMC connector can be used and the supply voltage should be in the range of 7-12 V.Once the board is powered, the power LED(red LED on the board) glows.
How to test ?Mini USB and Serial Cable can be used for programming ARM LPC2129 Mini Development Board. When USB cable is connected to the ARM LPC2129  board, Power LED(Red) on the top of mini development board glows, which shows the power indication.
Coding is done in Keil uVision4 IDE(Download). Basic steps after installation are mentioned below.
  • Step 1: Launch Keil uvision4
  • Step 2: The Keil uvision window opens as shown below
  • Step 3: To create a new project, select Project > New uVision Project from menu bar
  • Step 4: Save the project in a suitable location with appropriate name
  • Step 5: The following window opens. Select LPC 2129 (listed under NXP) from the drop-down list
  • Step 6: Click ‘Yes’ for the following question to copy and add the Startup code to Project
  • Step 7: This creates a target to the project
  • Step 8: Create a new file either by clicking the New File icon, or by selecting  File > New or using keyboard shortcutCTRL + N
  • Step 9: Save the file in any name, but with .c extension in the project folder
  • Step 10: Double click on “Startup.s” to open the configuration window and configure as below
  • Step 11: Set the options as shown below and save
    The PLL setup is done for 10MHz crystal. The divider and multiplier must be selected such that the PLL output is 30MHz((10/2)*6). If crystal frequency is changed, then these values must be changed accordingly
  • Step 12: Right click on Target1 to set target file options. You can also do this by using the icon on ‘Build toolbar’ or Project > Options for Target ‘Target 1′
  • Step 13: Configure TargetOutput and Linker options as shown below
    TargetOutputLinker
  • Step 14: Right click Source Group 1 to add C file to source
  • Step 15: Select the C file created and cilck Add
  • Step 16: Now the c file gets added to the Source
  • Step 17: Type the code
  • Step 18: Click the build icon (encircled in figure) to build the project. Errors (if any) get listed in the Build output window. Correct them and build again. On successful building, the hex file will be generated in the project folder
  • Step 19: Now the code can be flashed to the controller in the board,Note the following jumper connections
  1. Select the power source as USB cable or DC source
  2. Select USB or serial port using jumpers J7 & J9 for flashing the code
    Both jumpers on bottom side means USB programming
    Both jumpers on top side means RS232 serial programming
  3. Select mode using programmer switch
    In manual mode, insert ISP jumper and press reset button before programming
    In auto mode, leave it open and proceed to programming
Now power up the board. The power LED(red LED on the board) glows. Open Flash Utility. Select the correct COM port recognized by PC and if its more than COM5 change it to any any lower COM port in Device Manager and select any suitable baud rate. Also select XTAL Frequency as 10000kHz
  • Step 20: Open the desired hex file to be programmed
  • Step 21: Read device ID
    If auto mode is selected, simply clicking the ‘Read device ID’ button  will read the ID. But in manual mode, press reset switch and click
  • Step 22: Click ‘Upload to Flash’
After successfully flashing the code into the controller, remove ISP jumper if programmed using manual mode and reset the board. Also ensure that all the necessary jumpers to get the desired output are shorted.