STM32 microcontroller thin client

STM32 microcontroller thin client


MIT Media Labber David Cranor writes:

For the FAB6 conference this year, Max Lobovsky and I made a microcontroller-based thin client which uses a NTSC TV as its output device.

It does the NTSC video generation totally in hardware, has a full 480×240 framebuffer, and the code is written all in in c. Additionally, the code is written in such a way to make it easy for applications to draw arbitrary bitmapped graphics to the framebuffer, as well as access the serial receive buffer and keyboard character buffer.

This is my first STM32 project, so it was a fun exercise to make something which uses so many of the chip’s peripherals. Doing color is next on the agenda; the only reason this iteration is black and white is that we only had a week from “here’s the datasheet, cortex-M-what?” to finished project.

The STM32 used in this project runs at 80 MHz, has awesome peripherals, a DMA, tons of RAM/flash, a built in serial bootloader, and costs about $6 – I’m probably never going to use an atmega for anything again!

Source and board files included!

8 thoughts on “STM32 microcontroller thin client

  1. Alan Blue says:

    Does anyone know of a cheap chip that has ATSC output instead?

  2. David says:

    Hey Alan!

    I’m not an expert on these things, but I’m not sure why you’d want to do this with ATSC – I *think* that ATSC is a specification for how to broadcast digital video, so it’s pointless to encode an MPEG2 stream which will then be decoded by your TV’s tuner 3 feet away. Besides, you aren’t going to be doing realtime MPEG2 encoding on a hobby level microcontroller.

    If you want something more compatible with “modern” TVs, it should be fairly straightforward to hack this into a DVI connector and use the analog color and sync pins available on the connector, and tweak the source code to do the right timings.

    You could also look into how the digital lines in DVI/HDMI work and see about doing actual digital video encoding according to the scheme that they use.

    Since the minimum allowable pixel clock rate is 25-ish MHz, you could theoretically do it in software with this microcontroller, but implementation details are outside the scope of this blog comment. ^_^

  3. Dan says:

    Hi David! Nice project. I noticed you officially adopted the STM32 for all your projects from here out. I guess that you already knew Atmel has a whole line of the ARM Cortex-M3’s as well, nearly identical features and for close to the same price. If you didn’t know it, well you do now!

    Again, nice project, I’d like to know more as well, such as what tools you used to compile the C code, what hardware to burn the hex files to chip, etc. I went from PIC to Atmel a while back but really have no loyalty to any of them, they all need to stay competitive, eh?

  4. David says:

    Glad you like it!

    I went with this particular micro for several reasons:

    First of all, I LOVE the built in serial bootloader that comes programmed on each chip. No external programmers necessary, you just hold a pin high on startup and you can download the code with an FTDI cable and a python script!

    Second, I am excited about Leaf Labs’ arduino API support for these chips. With AVRs, I currently use the design around an “atmega328->flash arduino bootloader->use arduino IDE and community support-> go to C/asm if completely necessary” toolchain. I look forward to doing the same with these STM32’s.

    Finally, these are available in pretty low pin count packages which is important to me since I mill/etch most of my prototypes, so I usually ty to constrain most of my board layouts to single-sided topologies.

    I used this skeleton project to get started:

Comments are closed.

Discuss this article with the rest of the community on our Discord server!

Becky Stern is a Content Creator at Autodesk/Instructables, and part time faculty at New York’s School of Visual Arts Products of Design grad program. Making and sharing are her two biggest passions, and she's created hundreds of free online DIY tutorials and videos, mostly about technology and its intersection with crafts. Find her @bekathwia on YouTube/Twitter/Instagram.

View more articles by Becky Stern


Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).