← Back to context

Comment by Johanx64

20 hours ago

The same isn't true for modern embedded devices, they don't have tile rendering hardware. If you connect a i2c/SPI screen (SSD1306, ST7735), you write all the pixels on the screen (or pixels to some subregion of the screen), these screens do have a backing memory in them.

So in order to draw a line, you will - objectively - have to copy/move more bytes if you approximate line with character symbols.

This isn't a big deal, but crazy efficient it is not.

All the efficiency when drawing on those screens mostly relies on how well you chain together DMA transfers to portions of the screen you want stuff to be drawn to, so that SPI transfers aren't blocking the CPU (that's assuming you don't have memory for a second full-screen buffer).

SSD1306 is a bit in the middle. It's technically a 128x64 monochrome bitmapped display, but it's organized as eight 128x8 "rows", with each byte representing a single 1x8 group of pixels. That organization really favors being treated as either four or eight lines of text - trying to use it as a generic bitmap display gets awkward, because it's only addressable at the level of those 1x8 groups.

ST7735 is more of a standard (color) bitmap display.

  • SSD1306 is just 1KByte for a second buffer, so even a rather low-end MCU likely can spare that. And you'd absolutely just draw normal lines if you use a display like that.

    It's very easy to use it as a generic bitmap display, there's nothing awkward about packing 8pixels into 1 byte, and you can set the addressing mode (horizontal/vertial) to whatever you want, etc.