NXP Cortex-M0 LPC1100L – Design with a Cortex-M0 in a DIP package ASEE Tech Session Sergio Scaglia (NXP Semiconductors) August 2012 Agenda NXP Microcontroller Portfolio Cortex M0 LPC1100L Family Support/Resources Hands-On Lab Questions 2 NXP is a leader in ARM Flash MCUs Clear strategy: 100% focus on ARM Top performance through leading technology & architecture Design flexibility through pin- and software-compatible solutions – Scalable memory sizes – Widest range of peripherals Unlimited choice through complete families for multiple cores 3 3 NXP MCU – the only complete ARM range of Cortex-M0, Cortex-M3 and Cortex-M4 processors cost performance 8-bit 16-bit 32-bit DSP NXP ARM Cortex-M Continuum Entry level Cortex-M0 Fully featured Cortex-M4 Cortex-M0 True 8/16-bit replacement - low power, low cost, more performance Cortex-M3 High performance for communication and control - USB, Ethernet, CAN, and much more Cortex-M4 Advanced Digital Signal control - Floating point unit - Dual-core options Over 250 different ARM based microcontrollers available!! (* Recommended price at 10kpcs) 4 4 Rapidly growing family of ARM Cortex-M MCUs Check pin- and software compatible options: www.nxp.com/microcontrollers Cortex-M4 Up to 204 MHz Cortex-M3 LPC4300 High Performance Dual Core Cortex-M4/M0 LPC4000 FPU and DSP extensions LPC1800 Memory options up to 1MB flash, 200k SRAM LPC1700 High-performance with USB, Ethernet, LCD, and more LPC1300 USB solution, incl. on-chip USB drivers Up to 180MHz 5 5 NXP’s Cortex™-M0 True 8/16-bit replacement Cortex-M0 was designed to replace 8/16-bit architectures ARM’s smallest, lowest-power, and most energy-efficient 32-bit MCU core to date Simplicity! Small instruction set keeps silicon area and gate count similar to traditional 8/16-bit MCUs 6 6 Widest Selection of Cortex-M0 Packages Package CSP16 QFN33 QFN33 BGA48 QFP48 QFP64 QFP100 SO20 Width (mm) 2 5 7 4.5 7 10 14 8 5 5 14 Length (mm) 2 5 7 4.5 7 10 14 13 7 10 35 Height (mm) 0.60 .85 .85 0.7 1.40 1.40 1.40 2.45 0.95 0.95 4.00 TSSOP20 TSSOP28 DIP28 Sample Picture NXP offers the widest selection of packages for Cortex-M0 devices World’s first low-pin-count 32-bit ARM packages World’s smallest 32-bit ARM MCU – 2 x 2 mm2 7 USB Solutions for Cortex-M0 Pin le b i t a mp o nC i P LPC11U3x -to LPC11U2x LPC11U1x LPC134x Up to 64K Flash, up to 10K SRAM, up to 4K EEPROM 40-128K Flash, up to 10K SRAM, up to 4K EEPROM 32K Flash, up to 10K SRAM, up to 4K EEPROM 32K Flash, 6K SRAM LQFP64 package offering Low cost USB Platform for mbed Small sector size (256 bytes) Small sector size (256 bytes) LQFP64 package offering LQFP64 package offering Platform for LPCXpreso 8 8 ARM Cortex-M0 Re-defining 32-bit migration 2-10x higher performance than 8/16-bit MCUs 40-50% smaller code size than 8/16-bit MCUs 2-3x power saving compared to 8/16-bit MCUs Pin compatible options from M0 to M3 “ARM’s smallest, lowestlowest-power, and most energyenergy-efficient 3232bitbit-processor core to date” 9 CoreMark Benchmarks – Performance 1.6 1.4 1.2 8-bit or 16-bit ARM Cortex-M Power 0.6 0.4 ENERGY COST 0.8 Power 1.0 ENERGY EFFICIENT CoreMark Score CoreMark Performance 0.2 LPC1100L 16-bit MSP430 8-bit ATMega Time Time http://www.arm.com/products/processors/cortex-m/index.php 2-10x higher performance than 8/16-bit MCUs 10 10 8- vs. 16-bit vs. Cortex-M0 Current Comparison 11 Cortex-M0 Has Lower Power Consumption Cortex-M0 runs at a much slower clock frequency for the same required performance Cortex-M0 can sleep most of the time, or spare the resource for handling additional tasks 12 Superior Code Density (e.g. 16-bit Multiply) 8-bit (8051) MOV A, XL ; 2 bytes MOV B, YL ; 3 bytes MUL AB; 1 byte MOV R0, A; 1 byte MOV R1, B; 3 bytes MOV A, XL ; 2 bytes MOV B, YH ; 3 bytes MUL AB; 1 byte ADD A, R1; 1 byte MOV R1, A; 1 byte MOV A, B ; 2 bytes ADDC A, #0 ; 2 bytes MOV R2, A; 1 byte MOV A, XH ; 2 bytes MOV B, YL ; 3 bytes ; 1 byte ADD A, R1; 1 byte MOV R1, A; 1 byte MOV A, B ; 2 bytes ADDC A, R2 ; 1 bytes MOV R2, A; 1 byte MOV A, XH ; 2 bytes MOV B, YH ; 3 bytes MUL AB; 1 byte ADD A, R2; 1 byte MOV R2, A; 1 byte MOV A, B ; 2 bytes ADDC A, #0 ; 2 bytes MOV R3, A; 1 byte 1616-bit (MSP430) MOV R4,&0130h MOV R5,&0138h MOV SumLo,R6 MOV SumHi,R7 (Operands are moved to and from a memory mapped hardware multiply unit) 28 Instructions Time: 48 clock cycles Code size: 48 bytes 4 Instructions Time: 8 clock cycles Code size: 8 bytes ARM CortexCortex-M0 MULS r0,r1,r0 1 Instruction Time: 1 clock cycle Code size: 2 bytes 13 CoreMark Benchmarks – Code Size 20000 Code Size Comparison 18000 16000 Bytes 14000 12000 10000 8000 6000 4000 2000 LPC1100L 16-bit MSP430 8-bit ATMega http://www.arm.com/products/processors/cortex-m/index.php http://www.coremark.org 40-50% smaller code size than 8-/16-bit 14 Superior Code Density 64 Instruction Size for Various Processors 48 32 16 8051 Leading to superior code density: PIC18 PIC24 MSP430/ MSP430X Cortex-M0 – In Cortex-M0 all instructions (except BL) are 16-bit wide instructions – Over 64K of address space, 8- and 16- processors have to introduce paging leading to extra overhead in code – Efficiency of the Cortex-M0 instruction set (next slide) 15 LPC1100L in Low-Pin-Count Packages Cortex-M0 Core up to 50 MHz Lowest Active Current 130 uA/MHz – (LPC1100XL – 110 uA/MHz) Memory: – Up to 32 KB on-chip flash – Up to 4 KB SRAM Peripherals – U(S)art (1), SPI/SSP (1), I2C (1) – 4x general purpose Timers with PWM – 10-bit 5-channel ADC – Programmable WDT and WD Oscillator – +/- 1 % accuracy, 12 MHz IRC Oscillator Single power supply (1.8 V to 3.6 V) SO, TSSOP, DIP package options 16 Important Features for 8/16-bit MCU Customers Timers with PWM Generation – For each timer, up to four match registers can be configured as PWM, each timer supports up to three match outputs as single edge controlled PWM outputs; Dynamic System Clock Switching – Change frequency on the fly depending on processing demand. The LPC1100 current consumption at 50 MHz is specified at 7mA. This can be reduced to a little over 130uA when running at 1 MHz on the low-power internal oscillator; Clock Output – Clock output with divider can reflect the system oscillator clock, IRC clock, CPU clock, and the Watchdog clock. Output can source downstream devices such as other microcontrollers, CPLD or FPGA; Interrupt via Any GPIO – Any GPIO pins can be used as Edge and Level Sensitive interrupt sources; Programmable Pull Up/Down/Open Drain – Internal pull-up/pull-down resistor, pseudo open drain or bus keeper function; Enhanced GPIO Pin Manipulation – Capable of simultaneously reading Bit/Byte/Word or toggling up to 22 I/Os per instruction 17 Low-Pin-Count Package Options SO20 TSSOP20 TSSOP28 DIP28 (2 Options) Final Part Number SRAM Flash Package Pin Count I2C SPI UART LPC1110FD20 1 4 SO LPC1111FDH20 /002 2 8 LPC1112FD20 /102 4 LPC1112FDH20 /102 16b Timer 32b Timer ADC GPIO 20 1 1 1 2 2 10b, 5ch 16 TSSOP 20 1 1 1 2 2 10b, 5ch 16 16 SO 20 1 1 1 2 2 10b, 5ch 16 4 16 TSSOP 20 0 1 1 2 2 10b, 5ch 14 LPC1112FDH28 /102 4 16 TSSOP 28 1 1 1 2 2 10b, 6ch 22 LPC1114FDH28 /102 4 32 TSSOP 28 1 1 1 2 2 10b, 6ch 22 LPC1114FN28 /102 4 32 DIP 28 1 1 1 2 2 10b, 6ch 22 18 Why Choose LPC Package Devices from NXP Manufacturing Efficiency and Supply Guarantee – NXP ships over three billion Low-Pin-Count packages per year, no backend capacity constraints – High manufacturing efficiency and cost leverage for these MCU devices Clear Migration Path – Firmware compatible with other NXP Cortex-M0 devices – Firmware re-usable when upgrade to NXP Cortex-M3 devices $0.49 Today – Low-Pin-Count devices starts at $0.49 for 10Kpc via distribution 19 Targeted Applications Consumer Electronics – – – – Human Input Devices (e.g. mouse) Simple motor control (e.g. fan control) Toys Small appliances Industrial Control – Thermostat – Lighting / Home Security Medical – Portable health care products More… 20 Where to get started? www.nxp.com/microcontrollers – MCU homepage www.nxp.com/lpczone – Product updates and training www.nxp.com/lpcxpresso – Low-cost development www.lpcware.com – Engineering community 2 1 21 Objective Using the LPCXpresso Development Platform, and familiarity with the LPC1114 device Integrating the LPC1114 device (DIP package) onto a breadboard Build an application where the LPC1114 drives a 10 LED bar graph controlled by a Potentiometer 22 NXP’s Low Cost Development Tool Platform Eclipse-based IDE Evaluation Development Board Product Development 23 23 LPCXpresso Board LPC-Link Target 24 24 LPC-Link LPC-Link is an integrated JTAG/SWD debug interface based on LPC3154 (ARM9) LPC-Link can be used as a standalone JTAG debugger with other LPC target boards. So, no need for a separate debug probe! LPC-Link makes it possible for users to experience the same user interface all the way to final code development and testing 25 25 Evaluate Explore LPCXpresso Development Stages Develop 26 26 LPCXpresso Web Support www.nxp.com/lpcxpresso – Main page www.nxp.com/lpcxpresso-support – NXP examples page, schematics and FAQ www.nxp.com/lpczone – Live training modules www.nxp.com/lpcxpresso-forum – Support forum for LPCXpresso supported by NXP and Code Red (main support destination) www.code-red-tech.com/lpcxpresso – LPCXpresso IDE downloads and Code Red knowledgebase www.embeddedartists.com/lpcxpresso – Base board schematics and even more example projects 27 Components Software – LPCXpresso Development Tool (http://lpcxpresso.code-redtech.com/LPCXpresso/) – DIP demo-bargraphLED.zip file (software project) Hardware – LPC1114 DIP part (qty 1) – LPC1200 LPCXpresso Board (LPC-LINK debugging module + LPC1227) (qty 1) – USB cable (qty 1) – Breadboard (qty 1) – Potentiometer (10K) (http://www.sparkfun.com/products/9806) (qty 1) – 10 Segment LED Bar Graph (http://www.sparkfun.com/products/9935) (qty 1) – Resistors (qty 3) – Wires 28 LPC1114FN28/102 Pinout 29 Application Block Diagram 30 Application Board 31 31 Schematics Note: Please connect ONLY PIO0_1 (pin 24), PIO0_2 (pin 25), PIO0_3 (pin 26) to the LED bar graph 32 10 Segment LED Bar Graph LPCXpresso Board 10K Potentiometer Note: On the LPCXpresso board, on the J4 connector, remove the headers 33 LPCXpresso IDE Once the hardware is completed, connect the USB from the PC to the LPC-Link. Choose install the software automatically (USB Device with DFU capabilities) Open LPCXpresso now 34 34 LPCXpresso IDE Import Project Select the “Quickstart Pan” tab In the “Start here” tab – Select “Import project(s)” 35 35 LPCXpresso IDE Import Project Browse to the ASEE folder on the desktop and select: “DIP demo-bargraphLED.zip” “Select All” & “Finish” 36 36 LPCXpresso IDE Navigating Your Project Navigate to the “src” folder under “DIP demo” in the “Project Explorer” view Open (double-click) “main.c” 37 37 LPCXpresso IDE LPCXpresso Interface Project Project Explorer Explorer Quick Quick Start Start Editor Editor Console Console 38 38 LPCXpresso IDE Build Project Build the project 39 39 LPCXpresso IDE Debug Start the debugger Choose install the software automatically (LPC-Link Debug Probe v1.1) The debugger will: – Activate the Debug View – Break once inside main() 40 40 Running the Application Resume After hitting resume, the application should be running….rotate the pot Suspend, Terminate 41 41 42
© Copyright 2026 Paperzz