AVR basics: using the I2C bus #2 – transmitting

Part 1 – bit rate Part 2 – transmitting Part 3 – sending data Part 4 – receiving data Part 5 – final thoughts So in the first post in this series, we looked at how to configure the bus speed for I2C. Now we’ve got that out of the way, let’s start sending stuff over the bus. The I2C… Read more »

AVR basics: using the I2C bus #1 – bit rate

Part 1 – bit rate Part 2 – transmitting Part 3 – sending data Part 4 – receiving data Part 5 – final thoughts When I first started playing around with Arduinos I quickly grew to like the I2C bus, and for a couple of good reasons. First, it was easy to use. And second, there are lots of fascinating… Read more »

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 »

Ghost in the machine: a BBC Micro on an FPGA

The BBC Micro was the machine that really got me hooked. The Sinclair Spectrum was the gateway micro, but it was the Beeb that got programming into my veins. So much so, indeed, that not long ago I finally gave into temptation and bought a BBC Master Turbo on eBay. It didn’t last long. Although fully refurbished, any machine of that… Read more »

PCB design: connecting with Eagle

[Eagle vs KiCad part 4] In the last post in my Eagle vs KiCad series I’d got as far as using Eagle to place all the components for the HexMonitor project in a schematic. Now it’s time to join them together. Even before I begin, something tells me that perhaps this is too ambitious a project for my very first PCB…. Read more »

The perils of antistatic foam

      No Comments on The perils of antistatic foam

Not all foam is created equal. Let me explain. When you buy integrated circuits (ICs, or chips, if you prefer) they’ll sometimes be delivered with their cute little legs stuffed into black foam. That’s because many chips, and particularly CMOS-based ones, are rather sensitive to static electricity. If a static potential builds up between the legs (and if, like me,… Read more »

Altair-Duino – the low-cost Altair 8800

I’ve wanted an Altair 8800 for a long time now. It’s not that you can do much with it. But it is such an important part of computing history. Famously, the January 1975 edition of Popular Electronics featured the Altair 8800. Or rather, it featured a non-working prototype. The first working machine had gone missing in the post. The magazine… Read more »

Memory update

      No Comments on Memory update

A while back I wrote (here and here) about how I’d bought some old Russian memory. It’s a single memory plane from a Saratov-2 (Саратов-2), a Soviet-era Russian clone of the PDP-8 built in the 1960s. Well, I’ve finally given it the home it deserves. I’ve mounted the memory inside a deep frame and put a ribbon of LEDs around the… Read more »

PCB design: modifying a part with Eagle

[Eagle vs KiCad part 3] In the last post, I’d got as far as putting all the parts for my HexMonitor project into the schematic, albeit without actually connecting them. There was a good reason for that: while I (somewhat surprisingly) found the connector part I needed in Eagle’s default libraries, it wasn’t labelled the way I wanted. This was… Read more »