Computing stuff tied to the physical world

Life after uploads

Ok, the LPC810 is making an LED blink… now what?

Ignoring for a moment how you can modify and compile your own (variations of the) software, this really isn’t about blinking LEDs, of course. That’s just an appetiser.

The real value of the LPC810 is that it’s so small yet easy to use in different projects, and extremely flexible due to its extensive hardware peripherals and total programmability. Or to put it differently: six pins of 32-bit µC goodness in a tiny 8-DIP package, powered from 1.8 .. 3.6V (yet 5V-tolerant), capable enough to run at up to 30 Mhz, yet efficient enough to go to sleep using less than 1 µA of current (i.e. over a decade on a coin cell).

If you use a DIP socket in your project, then programming these chips need not even be done “in-system” (the first two letters of the ISP acronym). In fact, the circuit described so far is a perfect programmer for chips – useful enough to be placed on a dedicated board:

DSC 4756

The socket allows quick programming and removal of an LPC810, so that you can fully use all the 6 I/O pins of the LPC810 for dedicated purposes, including serial, I2C, or SPI communication – or even a combination thereof.

The LED can be omitted when the power source is between 1.8 and 3.6V, such as a coin cell or 2 AA cells, meaning that all you need is the LPC810 and the 0.1 µF decoupling capacitor.

The fader demo on GitHub illustrates a first refinement of the minimal Bare ARM Blinker, and shows how to do a bit more between power down cycles – the result is a periodically fading LED. Not very useful, but the techniques used there can be applied elsewhere.

A more sophisticated example of things an LPC810 can be made to do is the 30-line sine demo, also included in the jcw/embello repository, in the form of a 5-bit comparator, and no digital-to-analog capability at all.

Until we start pulling old tricks out of the new physical computing hat, that is:

Sines SCR92

The sine demo generates a 50 Hz analog sine wave on pin 3 of the LPC810. Or rather: it generates a sequence of PWM pulses, which – after being passed through a 1 kΩ + 10 µF low-pass filter – produces a fairly pure sine wave of approx 1 Volt peak-to-peak amplitude.

How’s that for a tiny digital chip running some bits-and-bytes software, eh?

And that’s just using 1 pin and under 1 KB of flash memory (half of which is for sine wave coefficients). What will – you – do with the remaining 5 pins and 3 KB of flash memory?

All the articles so far have been about how to set things up, and a few more are still needed about how to install and use the ARM cross-compiler toolchain. It’s all a bit tedious, alas.

But this is where the fun starts: with the proper tools in place, we can now begin to explore the essence of physical computing: working on useful and entertaining projects, using µC’s such as the LPC810 to implement all sorts of intelligent behaviour, or perhaps merely creating solutions which used to be much more complicated or expensive before, and tying sensors, displays, actuators, and various forms of communication together.

This is the playground where programming, electronics, perception, and motion meet. Where anyone can participate, learn, combine, and share. And where curiosity is king!

[Back to article index]