Monthly Archives: January 2018

AVR basics: control more devices using decoders

One of the issues with the Serial Peripheral Interface (SPI) bus, as many people have noted, is that it requires one Slave Select (SS) line – which means one GPIO pin on your microcontroller – for each device on the bus. That’s in addition to the three main bus lines – MOSI, MISO and SCK. This might be difficult on… Read more »

AVR basics: SPI on the ATMEGA – Part 2

In Part 1 we got the SPI bus set up on an AVR ATMEGA328P microcontroller. Now let’s start using it. Settings pins Before we get going, we need to set up the pins for the SPI bus on the AVR (which we’re using in master mode). I’m using the ATMEGA328P here, so I’m going to define some macros to make… Read more »

AVR basics: SPI on the ATMEGA – Part 1

When it comes to getting devices to talk to each other you’re spoiled for choice. There’s good, old-fashioned serial via UARTs, I2C (which I like a lot) and what is rapidly becoming my new favourite, the Serial Peripheral Interface (SPI). So let’s take a look at that. [Quick side note: please remember I don’t claim to be an expert. I’m… Read more »

Do you know what your code’s doing?

It seems like an obvious point, but it’s sometimes handy to know what your code is up to. If you normally write code for desktop systems – and especially if you’re hacking out something that works on the command line – then it’s easy. Just pepper your program with print statements to show the state of play. (Then try to… Read more »

Review: Exploring Raspberry Pi by Derek Molloy

This book was published in 2016 but I’d always dismissed it because I assumed it would be too basic. After all, I’ve been messing around with the Raspberry Pi for some years now and I really had no use for a book that spends the first couple of chapters saying ‘this is what an LED looks like and here’s how… Read more »

Raspberry Pi: creating a cross-development environment for ARM

So here’s a confession: I hate make files. And I’m really not all that keen on the whole compilation thing, with all those flags and whatnot. Why? Because I’m lazy. But of late I’ve felt myself drawn back to C++. There is something about the language that both appeals to me and repulses me. Mostly those make files. So this… Read more »

Hacking a film scanner

      No Comments on Hacking a film scanner

I’m building a rig to digitise my large selection of 35mm transparencies and negatives and in the process I’ve encountered what could be one of the worst electronic products I’ve ever bought. And in the spirit of the ineffable Big Clive, I thought I’d share my adventures in taking it apart. In some ways this belongs over on my photography… Read more »