Do Other Things Besides Output Video

Small microcontrollers and tiny systems-on-chips are getting more and more popular these days as the price comes down and the ease of programming goes up. A Raspberry Pi is relatively inexpensive and can do pretty much everything you need, but not every chip out there can do something most of us take for granted like output video. For a lot of platforms, it’s next to impossible to do while saving any processor or memory for other tasks besides the video output itself.

[Dave] aka [Mubes] has been working on the Blue Pill platform which is a STM32F103C8 board. While they don’t natively output video, it’s a feature that provides a handy tool to have for debugging in order to see what’s going on in your code. However, if the video code takes up all of the processor power and memory there’s not much point. [Dave]’s video output program, on the other hand, takes up only 1200 bytes of RAM and 24% of the processor for a 50×18 text display over VGA, leaving a lot of room left for whatever else you need the tiny board to do.

Video output on a device this small and lightweight is an impressive feat, especially while saving room for other tasks. This brings it firmly out of the realm of novelty and into the space of useful tools to keep around. If you want to try the same thing on an ATtiny, though, you might have to come up with some more impressive tricks.

18 thoughts on “Do Other Things Besides Output Video

  1. Pretty darn amazing. I am a great lover of the blue pill boards. My hat is off to Dave, but ….

    As with all truly great Hackaday projects, it is fundamentally useless, abeit incredible.
    The pill has a serial port already, a bunch of them as I remember, and these do just fine
    for most needs. Hard to beat a serial port as a “handy tool for debugging”.

    1. Even better, it has SWIO, so you can just step your code line by line or print debug information without using those 3 serial ports or any of the other ports (you lose 2 GPIO though). Programmers cost about $5 (st-link).

      1. Agree completely! SWO (and Trace) are _much_ more useful than a video screen. This was an exercise in Reattime programming, not really in producing VGA output. Any mistiming in the order of 3nS or greater on a VGA signal will result in visible artefacts, which makes it a very good vehicle for this kind of thing. I’m much more interested in getting that 24% figure than I am in getting video output!

        If you’re interested in SWO and what can be done with it then it’s worth starting at http://shadetail.com/blog/debug-communication-with-an-arm-cortex-m-target/ and reading the following few articles which lead up to the use of the Orbuculum suite (https://github.com/orbcode/orbuculum) which can do stuff like ‘top’ for embedded and integration with KCacheGrind …. who knows, one day perhaps Hackaday will discover that stuff in the blog too :-) (Apologies BTW, I just realised that it’s pretty hard to find older blog entries…I’ll try to fix that).

      2. Agree completely! SWO (and Trace) are _much_ more useful than a video screen. This was an exercise in Reattime programming, not really in producing VGA output or Debug. Any mistiming in the order of 3nS or greater on a VGA signal will result in visible artefacts, which makes it a very good vehicle for this kind of thing. I’m much more interested in getting that 24% figure than I am in getting video output!

        If you’re interested in SWO and what can be done with it then it’s worth starting at http://shadetail.com/blog/debug-communication-with-an-arm-cortex-m-target/ and reading the following few articles which lead up to the use of the Orbuculum suite (https://github.com/orbcode/orbuculum) which can do stuff like ‘top’ for embedded and integration with KCacheGrind …. who knows, one day perhaps Hackaday will discover that stuff in the blog too :-) (Apologies BTW, I just realised that it’s pretty hard to find older blog entries…I’ll try to fix that).

        Mubes

    2. … especially if you spice your debug output with some vt100 controll sequences to use your beloved serial terminal programm as a “screen” :)

      that’ costs nearly zero resources on your mirco…

      however, stand-alone debugging can be quite a thing!

      73

      1. I bought into the Propeller but got wrong advice from the community, did not get documentation, got the wrong products shipped to me so I moved on. Their forum is not growing because they aren’t reproducing themselves in others and learning is more caught than taught over there.

  2. Cool little hack!!!!

    Remind me of the old 8 bitters like the Timex Sinclair and Ataris. if someone wanted to they could use this as a video controller for a 8 ot 16 bit homebrew sbc.

Leave a Reply to Abbadon Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.