Skip navigation
1 2 3 Previous Next

LPC Microcontrollers

41 posts

We've been working on making the flagship member of the LPC800 series more accessible to more users than ever before, and are delighted to announce the LPC845 Breakout Board is now available from our distribution partners and also direct from nxp.com! Setting a new price point for a fully featured, debug enabled platform, this board includes CMSIS-DAP compatible debug and a VCOM port in a very compact yet flexible form factor. Of course it can be used with MCUXpresso IDE, Keil, IAR and other popular tools.

 

MCUXpresso SDK based examples are available now, and you will have seen some examples of interfacing to MEMS sensors, LDRs, SPI displays and a UART GPS module already on this site, all using commonly available from Adafruit and distributors.

 

Keen LPC user Kevin Townsend has been working on some other, more complex projects that he's posted on his github and on hackster.io ... an I2C co-processor for Raspberry Pi and today a fun smart Jenga block. He tells me he has another project one the way next week, so keep a look out for that!

 

We hope you enjoy this new board and, as always, we love to hear what you think and what you create!

The new LPC845 breakout board has 3 onboard LEDs- Red, Green, and Blue. The brightness of these LEDs can be controlled using a PWM signal by changing the duty cycle values for each of them. As this board has an SDK support, I have used the SDK drivers to implement this application. 

The SCTimer0 generates the PWM pulse at pins which are assigned as the SCT output pins. I have assigned the PWM output to the Green LED (PIO1_0) in my source code. You can assign the PWM output to be on any other LED by using the inbuilt configuration tool which is explained later. 

 

The source code below shows how to set the duty cycle percentage to increase or decrease the brightness of the assigned LED (here I have set it to 60%) 

 

pwmParam.level = kSCTIMER_HighTrue;
pwmParam.dutyCyclePercent = 60;

Writing the source code for this application was easy as the LPC845 Breakout board has an SDK package support. I used the SCT (Sctimer) SDK driver API in the software. The MCUXpresso SDK Builder has open source drivers, middleware, and reference example applications for software development. Customize and download the SDK specific to the processor and then import the zip file to the project in MCUXpresso IDE.
                                                                                                                                                                                               
The LPC845 Breakout board also features function-configurable I/O ports through a switch matrix (SWM). This makes it easier to configure pin routing and other pin electrical features. The configuration tool which is integrated into the IDE is useful for making changes in the switch matrix. The source code is auto-generated when the pin configuration or peripherals are changed.
/* SCT_OUT2 connect to P1_0 */
SWM_SetMovablePinSelect(SWM0, kSWM_SCT_OUT2, kSWM_PortPin_P1_0);
 
The source code for this application and board info for the LPC845 Breakout board can be found here.
I have built an application to interface an accelerometer with the new LPC845 Breakout board using the I2C SDK driver.
The accelerometer acts as an I2C slave device to the LPC845 master device. Colors on the on-board RGB LED change according to the accelerometer position.
 
The accelerometer is a slave device in this application with slave address: 0x1D. The position of the board is determined by the x,y,z-axis values obtained from this slave device. The change in these x,y,z values detects the movement of the LPC845 Breakout board. I have assigned various patterns to the RGB LEDs for each movement along the y-axis. 

 

Refer to the table for the hardware Connections for this application:
The NXP MMA8652 3-axis accelerometer on the breakout board can be connected using I2C protocol. SCL, SDA lines and can be powered via VDD, VDDIO and GND pins.

Connect pins of I2C master and slave as below:
MasterSlave
Pin NameBoard LocationPin NameBoard Location
SCL CN1-23SCL J2-3
SDACN1-22SDAJ2-4
VCCCN1-40VDD/VDDIOJ1-3/4
GND CN1-20GND J1-5

The LPC845 Breakout board has an SDK package support. I used the I2C SDK driver API in the software for interfacing the hardware components. The MCUXpresso SDK Builder has open source drivers, middleware, and reference example applications for software development. Customize and download the SDK specific to the processor and then import the zip file to the project in MCUXpresso IDE.
                                                                                                                                                                                               
The LPC845 Breakout board also features function-configurable I/O ports through a switch matrix (SWM). This makes it easier to configure pin routing and other pin electrical features. The configuration tool which is integrated into the IDE is useful for making changes in the switch matrix. The source code is auto-generated when the pin configuration or peripherals are changed.
/* I2C0_SDA connect to P0_11 */
SWM_SetFixedPinSelect(SWM0, kSWM_I2C0_SDA, true);

 

/* I2C0_SCL connect to P0_10 */
SWM_SetFixedPinSelect(SWM0, kSWM_I2C0_SCL, true);
 
The source code for this application and board info for the LPC845 Breakout board can be found here.
Using SDK drivers for LPC845 Breakout Board, this project measures the ambient light intensity by using LDR (Light Dependent Resistor). The voltage values from LDR are read through an ADC. The new LPC845 Breakout board has an SDK support which makes it a lot easier to interface an LDR for measuring light intensity compared to the conventional coding style. I have used the MCUXpresso IDE for modifying the pins and clock configuration settings.
The project requires a resistor and LDR (Light Dependent Resistor)/Photoresistor in a resistor divider circuit as shown below:
ldr-circuit.jpg

The value of R1 here is 4.4Kohm. 

The output of this resistor divider circuit is connected to the assigned ADC channel. In this application, I have assigned it to the ADC0_8 channel which is the PIO0_18 (pin 3) and configured it accordingly in the software.
Components used: LPC845 Breakout Board, Light Dependent Resistor(LDR)/Photoresistor, 2.2Kohm resistor (Quantity:2)
LPC845 Breakout Board connections to the LDR are as shown:
LPC845LDR
Pin NameBoard LocationPin Name
ADC_8PIO0_18 (CN1-3)resistor divider o/p
VCCCN1-40LDR
GNDCN1-204.4k resistor
image.png
For this application, I have used ADC0_8 as the ADC channel which converts the LDR output analog voltage values to digital values. The values printed on the console window reflect the change in the light intensity.
(For testing purposes, the light intensity can be changed by covering the LDR or using a cellphone flash)
The LPC845 Breakout board has an SDK package support. I used the ADC SDK driver API in the software for interfacing the hardware components. The MCUXpresso SDK Builder has open source drivers, middleware, and reference example applications for software development. Customize and download the SDK specific to the processor and then import the zip file to the project in MCUXpresso IDE.
                                                                                                                                                                            
The LPC845 Breakout board also features function-configurable I/O ports through a switch matrix (SWM). This makes it easier to configure pin routing and other pin electrical features. The configuration tool which is integrated into the IDE is useful for making changes in the switch matrix. The source code is auto-generated when the pin configuration or peripherals are changed.
 
/* ADC_CHN8 connect to P0_18 */
SWM_SetFixedPinSelect(SWM0, kSWM_ADC_CHN8, true);
The source code for this application and board info for the LPC845 Breakout board can be found here.
int main(void)
{
/* Initialize board hardware. */
BOARD_InitPins();
BOARD_BootClockRUN();
BOARD_InitDebugConsole();
/* Configure the converter and work mode. */
ADC_Configuration();
while(1)
{
/* Trigger the sequence's conversion by software */
ADC_DoSoftwareTriggerConvSeqA(DEMO_ADC_BASE);
/* Wait for the converter to be done. */
while (!ADC_GetChannelConversionResult(DEMO_ADC_BASE, DEMO_ADC_SAMPLE_CHANNEL_NUMBER, &adcResultInfoStruct))
{
}
/* Display the conversion result */
PRINTF("adcResult = %d\r\n", adcResultInfoStruct.result);
}
}

The LPC546xx IAP EEPROM Write page API  does not enable the EEPROM clock for the write operation. This causes  EEPROM write operation to fail when using the IAP API.  This problem does not occur for IAP Read EEPROM page command.

 

The workaround is to enable the EEPROM clock  ( set bit 9) in AHBCLKCTRL0 register of SYSCON before calling the IAP EEPROM write function.

 

SYSCON->AHBCLKCTRL[0] |= 0x200;


Hi folks,


Attached is a sample source code for OTP programming in NXP LPC54018 MCU.


Brief about the example:

The example programs 4 words of data each into OTP bank 1 and OTP bank 2. The example uses LPC54018 SDK drivers. The complete SDK for LPC54018 can be downloaded from Welcome | MCUXpresso SDK Builder .


Hope this is helpful !


Best Regards,

 

NXP lpc54018

If you are searching for a high-performance, power efficient, yet cost sensitive MCU for your designs, then here is the exciting news: NXP recently introduced the LPC51U68 MCU.

 

Power efficient solution for future IoT designs

Based on the Arm® Cortex®-M0+ core, the LPC51U68 MCU pushes the performance of the core to 100MHz, which is more than two times faster than current Cortex-M0+-based products. The LPC51U68 MCU also provides expanded memory resources of up to 96KB on-chip SRAM and 256 KB on-chip flash programming memory with flash accelerator. It also features unparalleled design flexibility and integration including a USB 2.0 full-speed device controller supporting crystal-less operations, eight flexible serial communication peripherals, each of which can be enabled as UART, SPIs or I2C and up to two I2S interfaces. The LPC51U68 MCU integrates a variety of timers including three general purpose timers, one versatile timer with PWM (SCTimer/PWM), one RTC/alarm timer, a multi-rate timer and watchdog timers. On the analog side, an on-chip 12-channel ADC with a 12-bit resolution and conversion rates at up to 5Msps and temperature sensors are provided. With all the features integrated, the LPC51U68 MCU brings unparalleled design flexibility, computing performance and integration into today’s demanding IoT and industrial applications.

 

LPC51U68 Block Diagram

 

Extraordinary compatibility

While considering the LPC51U68 MCU as an upgrade of the LPC11U68 MCU family, it provides pin-function compatibility with Arm® Cortex®-M4 based LPC5410x and LPC5411x MCU families in the same packages and pinout versions enabling a smooth transition to the power-efficient MCUs based on Arm® Cortex®-M4 core.

 

Low power design for energy efficiency

While providing excellent computing power with the Arm Cortex-M0+ core, the LPC51U68 MCU displays ultra-low-power consumption and a unique low-power design. The microcontroller supports four low-power modes and API-driven power profiles, providing developers with easy-to-use dynamic current management at runtime and fast wake-up times from the microcontroller’s reduced power modes.

 

LPC51U68 Run Currents and Extended Power Modes

 

Make your design easier with tools supported

LPC51U68 MCUs are fully supported by NXP’s MCUXpresso software and tools which brings together the best of NXP’s software enablement into one enablement platform for a shared software experience across a broader set of Arm® Cortex®-M MCUs. In addition, this new MCU is supported by the LPCXpresso51U68 development board, designed to enable evaluation and prototyping with the LPC51U68 MCU. The board features an on-board, CMSIS-DAP / SEGGER J-Link compatible debug probe, expansion options based on Arduino UNO and PMod, plus additional expansion port pins and more

 

LPCXpresso51U68 Development Board

 OM40005: LPC51U68 Development Board

To learn more about LPC51U68 MCU, visit http://www.nxp.com/LPC51U68http://www.nxp.com/LPC51U68

 

Live at Computex 2018 this week is: The High Performance Gaming Mouse Controlling Hundreds of Full Color LEDs Powered by LPC51U68

  • A 100MHz Arm® Cortex®-M0+ delivering real-time response for game player
  • 96K SRAM for LED pattern allows for a smooth transition 
  • Built-in USB drivers in ROM and supports 1K report rate
  • 8 Flexcomm serial channels to drive up to 800 LEDs with full color control at the same time

 

 

@jennymplunkett from the Arm mbed team just posted a great tutorial using the LPCXpresso54608 touch screen on her blog... check it out at https://os.mbed.com/blog/entry/How-to-LPCXpresso54608-touch-panel/

Same code shown will also run on LPCXpresso54628.

 

Thanks Jenny!

The LPC800-DIP board is now being sold by Coridium for just $10:

http://www.coridium.us/coridium/shop/boards/bd07-special

 snipcart-thumb-image

They have their own version of gcc and BASIC running on it too, available for just a few $$

http://www.coridium.us/coridium/shop/software/s07-basic-lpc824

 

Enjoy! 

I have the OM13086 Cloud Connectivity Kit
I have been following the ZentriOS "Quickstart Guide".
As part of the Zentri OS Quickstart procedures, I chose "Custom Install", so instead of using the "Zentri IDE", I'm uisng LPCXpresso 8.2.2, with the Zentri SDK plugin

I've left the LPCXpresso43S67 board jumpers in the default configuration, please see attached photos.
I connected the LPCXpresso43S67 + LPC General Purpose Shield boards to my laptop with 2 USB cables.
When I follow the Quickstart instruction "Running the ZentriOS Setup Device Wizard", it fails, with these messages:

 

Setting up the device for SDK development ...
03:27:16.165 [INFO] Verifying DMS credentials ...
03:27:17.904 [INFO] DMS credentials valid
03:27:17.946 [INFO] Retrieving available platforms from DMS ...
03:27:18.515 [INFO] 4 platforms available
03:27:18.517 [INFO] Probing for connected device ...
03:27:18.517 [INFO] Discovering device connected to local computer ...
03:27:19.36 [INFO] Starting OpenOCD server for AMW106 ...
03:27:23.365 [INFO] Starting OpenOCD server for AMW004 ...
03:27:27.786 [INFO] Starting OpenOCD server for AVN4343 ...
03:27:31.823 [ERROR] Is the device connected and correctly enumerated?
03:27:31.823 [ERROR] Exception: No devices found
03:27:33.391 [INFO] Ensure the device is connected via USB to the computer and that the USB is correctly enumerated.

<img src="https://docs.zentri.com/resources/wifi/sdk/setup-device/sdk-connecting-an-nxp-device1.png" width="539" height="192" />

More information here: <a target="_blank" href="https://docs.zentri.com/wifi/sdk/latest/user-guide/getting-started#setting-up-the-zentrios-device" >Connecting NXP Hardware</a>
03:27:35.292 [INFO] Is the device connected and correctly enumerated?
03:27:35.293 [INFO] Checking for solution ...
03:27:35.295 [INFO] Retrieving driver nodes ...
03:27:35.638 [INFO] NXP driver repair available
03:27:36.805 [INFO] Attempting to repair NXP driver issue
tools/makefiles/standard_platform_targets.mk:38: recipe for target 'setup' failed

Today we announced the new LPC8N04, NFC-enabled MCU. We will be demonstrating the board at ARM Techcon in San Jose, and the lucky first 100 visitors to the NXP booth can exchange their business card for a free board!

 

The Board will come pre-loaded with a demo, that can be used with Android phones (iPhone version to follow), and when the product is fully released in January, the full set of source code will be available at NXP's site. Boards will also be available for sale at that time. Until then, if you are lucky enough to get a board from the show, please see the attached Getting Started Guide.

 

Enjoy!

You may be interested to know that we recently released a new set of debug firmware and Windows 7 drivers for our boards that feature the LPC11U3x MCU as a debug probe (so all the "MAX" boards). The new firmware can be found under the Software & Tools tab of the board page you are using  http://www.nxp.com/demoboard/omxxxxx (where xxxxx is the board part number, such as om13071, om13097, etc.

 

The intention is for this firmware to be used instead of the Mbed-based firmware and driver that has been used up until now, if you are not going to use Mbed (you can continue to use the Mbed version if you so wish however). Some reasons to consider the new firmware & driver:

  • The CMSIS-DAP implementation is newer, so a little more robust and faster
  • The VCOM / serial port driver supports autobaud, with speeds up to 115200
  • The VCOM driver has a cleaner installation (mbed serial port driver needs board to be plugged in to install, which is a little unusual)
  • The firmware auto-detects if a target serial port connection is present and enumerates a driver if they are.
  • The new firmware gives a unique ID per board, allowing multiple board connections at once.

 

Downloading the package will give you a driver for Windows 7 & 8 (not needed for Windows 10, MacOS or Linux), plus the debug probe firmware image. Follow the firmware update instructions for your board to update - its a simple delete then drag and drop operation.

 

Enjoy!

For the low pin count and small memory footprint LPC800 family, NXP offers free LPCOpen Driver Code and Example Code Bundles. 

 

The LPCOpen Driver Code for LPC81x/82x/83x series, is an Application Programming Interface (API) base. For users who are not too concerned with overall code size, LPCOpen provides the ease of use without diving into details of each peripheral registers, and it is easy to migrate from LPC8xx to LPC11xx family. 

 

Link to LPC8xx LPCOpen: 

http://www.nxp.com/products/software-and-tools/software-development-tools/software-tools/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc8xx:LPCOPEN-SOFTWARE-FOR-LPC8XX

 

However given LPCOpen is no longer the supported platform, and future LPC8xx devices will not have LPCOpen Driver code.

 

For the LPC800 family, NXP also offers a basic, complete working Example Code for each peripheral, giving 8/16 bit microcontroller users fast transition to the 32bit LPC800.

 

Example code is the fastest, simplest way for user to learn how to program each peripheral before progressing to more advance features of the peripheral. New users of LPC800 can step through the Example Code like a tutorial. Concise and accurate explanations in Readme files and comments in source files help the user to start/debug quickly.

 

The Example Code Bundles work right out of the box for the LPC800 LPCXpresso-MAX boards. It’s easy to read how the peripherals registers are setup /access without going through many levels of APIs. They have register level peripheral access, and direct correspondence between software and memory maps in the chip User Manuals. The Example Code Project and source code directory structures are kept simple, flat, and consistent (as much as possible) between LPCXpresso/MCUXpresso IDE, Keil, and IAR tools. 

 

The system base on Example Code is smaller in code size,  with much simpler code vs LPCOpen for a similar task (For example, >25% code size reduction for a simple Blinky). This can be crucial in applications where the code size is close to the device flash limit. 

 

All new LPC800 devices will have a supporting Code Bundle.

 

To try the Example Code,  please go to the related LPC800 product pages and Select the Software download tab.

Direct Links :-

Example Code Bundle for LPCXpresso

LPC812 Example Code Bundle LPCXpresso

LPC812 Example Code Bundle Keil and IAR

 

LPC824 Example Code Bundle LPCXpresso

LPC824 Example Code Bundle Keil

LPC824 Example Code Bundle IAR

 

LPC834 Example Code Bundle LPCXpresso

LPC834 Example Code Bundle IAR

LPC834 Example Code Bundle Keil

 

 

Nice project from Kevin Townsend showing off capabilities of LPC824 with it's state configurable timer to drive Neopixel and IR distance application.

 

LPC824 NeoPixel IR Distance Sensor

I love seeing how our LPC community uses our microcontrollers ... keep sharing what you create and let's continue to support and invest in each other.  

 

Pokitto LPC11U68 Game Gadget on Kickstarter - EB sold out soon!