Tag Archives: serial

DottyMatrix: Printing to an actual printer.

It seems the repairs to my venerable Epson MX-80 F/T III dot matrix printer did actually work because it’s now printing again! What’s more, it’s printing via the prototype of my DottyMatrix serial to Centronics parallel interface. Time for a quick recap. The DottyMatrix is based around an AVR ATMEGA328PB microcontroller. It takes input on a TTL-level serial connection and… Read more »

DottyMatrix: ghost of the typewriter and the curse of the carriage return

In designing my DottyMatrix serial-to-parallel printer interface, I had to decide how it would handle the incoming data stream. The purpose of the DottyMatrix is to connect my venerable Epson MX-80 F/T III dot matrix printer to (probably) a Raspberry Pi so that I can print out text files, such as program listings. Obviously, it would be good if it… 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 »

Dreambox: Raspberry Pi and Teensy, living in perfect harmony

Okay, so I couldn’t get the headline to scan to fit that godawful song, but here’s the thing: I mentioned before that my Dreambox project – a way of playing music to lull me to sleep – would be driven by a Raspberry Pi but would also involve a Teensy. And you probably want to know why. The answer is:… Read more »