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](https://softsolder.com/wp-content/uploads/2018/02/img_20180211_080850-rpi-oled-display-garbled.jpg?w=562&h=562)
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 …
Any project that involves getting new
toystools can’t be all bad. [grin]Let’s say the subject has come up; the CRT won’t last forever.
(Remembers Tek terminal with a circuit layout burned in the storage phosphor. Some last shorter than others…)
Aye! Tek 4015 Graphic Terminals: vector graphics through 9600 baud RS-232!
Looks like the Standard Galactic Alphabet from Commander Keen (1991). http://www.shikadi.net/keenwiki/Standard_Galactic_Alphabet
Well played, sir!