Programming A Through-hole ARM Microcontroller

NXP

The age of ARM microcontrollers for the electronics hobbyist is upon us, and luckily there are a few breadboard-friendly microcontrollers available in a DIP package. One of these chips is NXP’s LPC810M021FN8 – a tiny little 8-pin DIP with 4 kB of Flash, 1 kB of SRAM, and has a clock fast enough for some really cool stuff. [Joao] needed a way to program one of these microcontrollers and came up with an easy method using only a USB/UART adapter.

The key to this build is the fact the LPC810 doesn’t need any additional components to operate; the internal oscillator means the chip will run at 30 MHz with only a power and ground attached. To program the chip, [Joao] attached the Tx and Rx lines of the chip to a USB/UART adapter (at 3.3 V, of course), and uploaded some code with Flashmagic.

We’ve seen these DIP-sized ARM chips before, but [Joao]’s method of using off-the-shelf tools to write a blinking LED program means it’s a piece of cake to start working with these very cool and very powerful microcontrollers.

32 thoughts on “Programming A Through-hole ARM Microcontroller

      1. MSP430 has a horrendous toolchain. The bootloaders require patches to be streamed in, there’s pretty much one debugging tool, and it only works with pro-level IDE’s (IAR, CCS).

        PIC has a great, free, unrestricted IDE that “just works”. They are also stymied by their development tools, which are mostly first-party only, and are not cheap. And their chip hardware is all over the maps, lots of legacy stuff. But plenty of good app notes and code examples.

        ATTiny is great. Highly featured, tons of debuggers. Atmel has a “just works” IDE, although nowadays it’s a gigantic download.

        1. Sir, I humbly submit that your smoking materials are of a highly inferior quality.

          The MSP430 has at least *four* distinct toolchains. Which one are you referring to?

          – CCS
          – IAR
          – Crossworks
          – mspgcc

          Personally, because I am fan of the GNU toolchain, I prefer mspgcc. However, CCS, IAR, and Crossworks are all reasonable alternatives. Each has their warts, but I wouldn’t call any of them horrendous.

          Every MSP430 has a BSL in ROM and thus can be bootstrapped without any additional hardware. The functionality is limited, but it is more than sufficient to allow for the loading of a more advanced loader if you actually need that functionality.

          In practice, nobody uses the BSL on the MSP430 because TI provides a very affordable development tool with the MSP430 LaunchPad. For a long time this was available for only $4.30 and TI only recently bumped the price to $10. Free shipping to most locations worldwide. Unlike many development boards (and the Arduino) the LaunchPad provides for full hardware in-circuit debugging.

          The LaunchPad is fully-supported by the open-source mspdebug which runs on WIndows, Linux, and OS/X.

          The LaunchPad is not without it’s warts, but even at $10 it is an unprecedented value as a MCU development tool.

    1. Yes, all of NXP’s ARM Cortex-M0/3/4 microcontrollers are programmed via the UART0 using the built-in bootloader in ROM. You can certainly use it for that, and the functionality you are talking about is in fact one of our default test-programs for the little cheap boards that we make which contain an NXP ARM chip and a low-cost GPS module.

        1. We no longer make that board, we make something that also has an XBee stuck on the back, and use it for the telemetry/positioning/autopilot module on our quadrotors. Unfortunately it’s not sold separately at the moment, you’d have to purchase a whole quadrotor kit to get it.

    1. Check farnell/newark for these (the links are too long to post here) with 16 or 20 pins:

      TSSOP: LPC811M001FDH16FP, LPC812M101FDH16FP, LPC812M101FDH20FP

      SOIC: LPC812M101FD20FP

  1. Nice chip, even though it has no interface or DSP qualities, but there are non-BGA ARM chips up in the hundreds of megahertz with hardware acceleration for that.

  2. Should mention that Flash Magic has a cool option called “Use DTR and RTS to control RST and ISP pin”, which in short means that you can connect two wires between the DTR and RTS signals of your serial port to the reset and program inputs, allowing Flash Magic to automagically reset the microcontroller and put the micro into programming mode, so you don’t have to mess around with grounding pins and/or installing buttons if you’re going to be reprogramming it a lot.

    1. True, but some of us (like me) come across these devices while hunting to complete a B.O.M. and forget about it 5 seconds later because “it’ll probably need some specialty programmer”. Updates like this got me started with STM32 a while back.

  3. This is old news. The serial bootloader for NXP parts has been around for years now.

    What *is* news is the fact that the Black Magic Probe software has been ported to the STM F4 Discovery board. What this means is that the low-end NXP parts now have a first-class programming and hardware debugging tool available for under $15 which is only a fraction more than the $10 you’ll need to pay for a decent FTDI serial dongle.

    Unfortunately, there is practically *zero* community support for any of NXPs low-end chips. The LPC1114 made a huge splash last fall when it became available in DIP-28 packaging last fall, but I have yet to find *any* community documentation in this part beyond how to flash an LED with it.

    NXP’s low-end ARMs in DIP do represent a huge potential boon to hackers, but unfortunately at this point it is only potential.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.