After I got my Arduino I felt the urge to brush up on my general electronics knowledge. The last time I’d really played with any circuits was back in about 1994 when I was studying my Technology GCSE – which now is quite a long time ago.
So I picked up a copy of Make: Electronics and started reading through it. Sadly I was a bit lazy and just read through the book, rather than actually building many of the circuits suggested. It did come in handy for tips on soldering and I do intend to go back and make some of the circuits – I just got a bit distracted by a new arrival. However the last chapter covered microcontrollers and in particular the Picaxe 08m chip. This really piqued my interest!
The Picaxe 08m is a PIC chip with a pre-installed boot-loader that allows programming the chip via a serial port. This is similar to the way that the Arduino has an AVR chip with a pre-installed boot-loader. There’s also some software for the Picaxe for handling the programming, a bit like the Arduino IDE.
The 08m is massively less powerful than an Arduino. It has 512 *bytes* of program storage and only 14 *bytes* of variable RAM. However it has 5 outputs/4 inputs and can run a single servo. In fact I could have used it for the logic part of my Arduino doorbell. It’s not quite as friendly to get started with as an Arduino though. You need to wire up a simple circuit before you can get going. In fact I actually had to solder together a prototyping board, as I didn’t have much luck trying to used a breadboard. The circuit needed isn’t that complex (assuming you use 3AA batteries for power). The cost of the 08m chip is less that £2. The proto-board is £2, so altogether you can have a simple usable microprocessor for less than £4. It’s also small and doesn’t use much power. So for projects where an Arduino is overkill it’s perfect.
To make testing out circuits easier I also added a female header to the board, so I could plug in breadboard jumper cables (in the same way as one does with an Arduino Duemilanove):
To verify everything worked I wrote the “hello world” program of microcontroller world, a program that simply blinks an LED (by turning pin 1 on and off):
main: high 1 pause 1000 low 1 pause 1000 goto main
That’s Picaxe BASIC by the way. Maybe not as pretty as C, but for a processor with only 14 byte sized variables it’s more than enough.
Then I wired up an LED into the prototype board, along with a small current limiting resistor:
For more detail: Programming a Picaxe 08m chip