Making a computer

So, the idea with the Monotron was to ask a simple question - how much can we do with a small, cheap, random microcontroller and the Rust Programming Language. The answer, after some significant development effort, was quite a lot:
800x600 SVGA video signal, with 8 colours48 x 36 text mode, rendered in real time, with multiple fonts (Code Page 850 and Teletext)FAT32 formatted SD Card supportPS/2 keyboard over UART (because the synchronous PS/2 signals themselves were impossible to process whilst also doing the video) An application API, allowing applications to be loaded into the 24 KiB of spare RAM (out of the total of 32 KiB) which can then draw on the screen, read the keyboard, etc3-channel tone generator, with Square Wave, Sawtooth, Sine Wave and White NoiseReal Time Clock support That's quite a lot for an £11 dev board, with an 80 MHz microcontroller and 32 KiB of RAM. But ultimately, whilst it's impressive, it's not actually any use as a computer...

So, OK, that was o…


Oh, I totally forgot. I made Hackaday! And the comments didn't explode either...

Oh so busy!

Well it's been a busy year. I was made Deputy Mayor of St Ives back in May 2019 and that has rather filled up the calendar. I also present Monotron at ACCU 2019 in Bristol, and again at RustFest 2019 in Portland, Oregon. You can checkout the videos below:I've also spent a lot of time thinking about interfaces on old computers systems - floppy drives, IDE, SCSI, Parallel Ports and more. This then lead to an idea for a more expandable Monotron which, with some help from SEGFAULT (Lauren), turned into a thing called the Neotron. More on that next time...

Plans for the railway

Yeah I know I talk about a lot of embedded stuff on here, but I do still think about my Model Railway. I was at the Model Railway show in Peterborough today, where I picked up a lovely boxed Dapol "Yorkshire Voyager" set. It prompted me to think about what I'll run when my railway gets rebuilt and I figured I should write it down for posterity.

The model a fictional station set somewhere around Leamington Spa circa 2002/2003 (which is when I lived there as a student). At that time, Leamington Spa was served by the following operators:
Virgin Cross-CountryChiltern RailwaysCentral TrainsVirgin were running 220 Voyager and 221 Super Voyager sets at that time, but they still had the last of the Class 47 + Mark 2 sets, plus a brief period running HSTs (both in Virgin West Coast livery, and borrowed from GNER and Midland Mainline). You also might have seen some 158 Express Sprinters.

Chiltern Railways were running 168 Clubmans (I have one of those) and 165 Network Turbos.


Monotron at Rust Belt Rust

So now is over, I thought it was worth writing down a few details about what Monotron can do. It's had a few upgrades since Paris! I tried to keep them under wraps to avoid spoilers but I can share them now. This is an un-roll and re-edit of my Twitter thread, and the features listed here are in no particular order:

1. You can upload binary apps into RAM over serial. 24 KiB is reserved for apps, leaving 8 KiB for stack and character RAM. The ROM passes a structure full of function pointers so that apps can access useful functionality, including a vsync function for smooth gameplay.

2. You can write apps in C and in Rust! Example apps include Tiny Basic, a little slideshow about the system, Snake and even a 6502 emulator running an unmodified copy of 6502 Enhanced BASIC.

3. There is a three channel 8-bit wavetable synthesiser running at 37 kHz (the scan-line frequency). It has four 256 byte samples - square, sawtooth, sine and noise. Snake has multi-t…

Where next for the Monotron

It's a couple of months on from my talk at RustFest on Monotron, so I thought it was worth a quick catch up on where we're going next.
Graphics and Text As a recap, Monotron currently generates an 800 x 600 VGA signal at 60 Hz (with a pixel clock of 40 MHz). It does this using three synchronised SPI peripherals, a timer generating the horizontal-sync pulse and a GPIO pin for the vertical-sync. With the CPU running at a clock speed of 80 MHz, the SPI peripherals are clocked at 20 MHz producing 400 horizontal pixels per line. This is half the nominal 800 pixels, but we needed to sacrifice resolution to double the amount of CPU time we have to 4 clocks per pixel (i.e. 32 clocks per 8-bit character column).

The pixels are generated from a 48 x 36 character buffer. Each cell can store one 8-bit character (in MS-DOS CodePage 850) and one 8-bit attribute value. Currently the attribute value stores a 3-bit (1 red bit, 1 green bit, 1 blue bit) background colour and a 3-bit foreground c…

Talking about Monotron at RustFest

So, today I did a talk about Monotron at RustFest Paris. You can find the code on my Github and/or on
The top-level crateThe generic embedded VGA Framebuffer Driver, with callbacks for hardware specific bitsThe command-line menu systemThe PS/2 keyboard driver (unfinished)The tm4c123x-hal and tm4c123x chip support cratesThe excellent Cortex-M and Cortex-M-RT crates from japaric. If you want to buy a Tiva-C Launchpad (it's the same as a Stellaris Launchpad) of your very own, try RS Components, or Farnell or Digi-Key. Just add a VGA connector and three resistors. The Github README tells you where to put them but I take no responsibility if you blow something up - double-check your working with an oscilloscope before risking your monitor!

You can find the slides here. There's a quick video of the closing animation here. The video of the talk will be on the RustFest Paris website soon!

If you want to ask a question, catch me on IRC (try #rust-embedded) or as @therealjpst…