The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Streaming Radio Player: OLED Garble

Even in the dim light of dawn, it’s obvious slowing the SPI clock to 1 MHz didn’t quite solve the problem:

RPi OLED display - garbled
RPi OLED display – garbled

The display started up fine, became encrypted during the next few hours, and remained garbled as the track information changed. This is almost certainly a bad SPI transfer trashing the OLED module’s control registers.

Dropping the clock to the absolute minimum of 0.5 MHz didn’t help, either:

serial = spi(device=0,port=0,bus_speed_hz=500000)
device = sh1106(serial)

This particular display woke up blank after loading the new code, then worked OK after another reset. The other streamers lit up as expected on the first try, so the slower SPI isn’t making the situation instantly worse.

Running the clock at 1 MHz definitely reduced the failure rate, which suggests it’s a glitchy thing.

Good embedded systems practice suggests resetting the entire display from scratch every now and again, but my streamer code has no concept of elapsed time. Opening that particular can o’ worms would almost certainly result in an on-screen clock and I do not want to go there.

I suppose I must get a new oscilloscope with SPI bus decoding to verify all the SPI setup and hold times …

Comments

9 responses to “Streaming Radio Player: OLED Garble”

  1. RCPete Avatar
    RCPete

    Any project that involves getting new toys tools can’t be all bad. [grin]

    1. Ed Avatar

      Let’s say the subject has come up; the CRT won’t last forever.

      1. RCPete Avatar
        RCPete

        (Remembers Tek terminal with a circuit layout burned in the storage phosphor. Some last shorter than others…)

        1. Ed Avatar

          Aye! Tek 4015 Graphic Terminals: vector graphics through 9600 baud RS-232!

  2. Jacob Avatar
    Jacob

    Looks like the Standard Galactic Alphabet from Commander Keen (1991). http://www.shikadi.net/keenwiki/Standard_Galactic_Alphabet

    1. Ed Avatar

      Well played, sir!

  3. Streaming Radio Player: RPi and OLED Updates | The Smell of Molten Projects in the Morning Avatar

    […] fuffing and fawing came from watching some OLEDs wake up completely blank or become garbled in one way or another. Evidently, my slower-speed SPI tweak didn’t quite solve the problem, although it […]

  4. Streaming Radio Player: CE Timing Tweak | The Smell of Molten Projects in the Morning Avatar

    […] delays around the SPI control signal changes reduced the OLED glitch rate from maybe a few a week  to once a week, but didn’t completely solve the […]