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.

Comments

  1. kay says:

    This fits the Picaxe’s niche perfectly.

    • top lel says:

      Or an MSP430, Or a PIC, or an ATTiny

      • 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.

        • r4k says:

          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.

  2. gogo says:

    thank you mr obvious

  3. Cliff Miller says:

    Anybody have a source for these? Mouser / Newark showing 0 stock…

  4. hodginsa says:

    Can you use the rx/tx in the code you upload to it? Like reading GPS data to turn a light on when you get to a certain point, or trigger something.

    • UAirLtd says:

      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.

      • hodginsa says:

        Interesting… have a link?

        • UAirLtd says:

          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.

  5. fartface says:

    Anyone find a source for the flat little surface mount versions? These things are perfect for little one off tiny projects that run off of CR2032 coin cells.

    • Justin says:

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

      TSSOP: LPC811M001FDH16FP, LPC812M101FDH16FP, LPC812M101FDH20FP

      SOIC: LPC812M101FD20FP

  6. xorpunk says:

    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.

  7. UAirLtd says:

    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.

  8. Arlet says:

    This isn’t really a hack, but a standard way to program many LPC devices.

    • Justin says:

      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.

  9. Tron9000 says:

    right stop panic buying these chips! FFS! Findchips says there are now NONE left!

  10. chuckz says:

    Adafruit has 33 in stock.
    http://www.adafruit.com/products/1336

    ARM is natural successor to the 6502 chip line.

  11. zygomatic says:

    Place your bets on how long it takes someone to run Linux on it?

  12. Ren says:

    Pardon my ignorance, but does NXP make a dev board along the lines of LaunchPad or Stellaris? (i.e. cheap, with IDE, code forums)

    • Pat says:

      Yup. Look up ‘LPC Expresso’ for their LPC1XXX series of chips. We use the LPC11C14 extensively where I work (the ‘C’ indicates CANbus connectivity).

  13. r4k says:

    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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 92,137 other followers