SSD1306 vertical scrolling glitch

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
clem
 
Posts: 5
Joined: Thu Feb 02, 2012 2:22 am

SSD1306 vertical scrolling glitch

Post by clem »

I have a few of the Adafruit 128x32 SSD1306 OLEDs and I've been trying to get vertical scrolling to work using the 'start line' register. I load two 128x32 tiles into the display ram and then write to '0x40+y' in a loop with a delay between frames.

This results in glitchy frames being displayed. Mostly a vertical offset, but sometimes a small horizontal shift as well. If it wasn't for the horizontal shift I would guess that the SSD1306 isn't latching the start line register at the start of every frametime so part of the frame is with one start line and the rest is with another. The glitching only lasts one OLED refresh interval, which can be seen by using along delay between writes to the start line.

Here is a video that shows the problem:
http://youtu.be/nIlNApuFGXo

Google turned up references to people doing vertical scrolling using this technique and they didn't report any glitching. Has anyone else seen this problem? Any ideas what might be happening? I'm wondering if this is a SSD1306 bug and different displays are using different stepping of the driver.

The CPU for my target application is already a bit busy, so not having to write the full frame buffer every frame time would free up some CPU for better things, so I'd really like to be able to get this working.

FYI, I can do continuous horizontal scrolling, by writing full frames each frame time, without any glitching:
http://youtu.be/KM-mhbYWSJ8

I'm using a fixed delay between frames, so there a bit of a pause every 128 frames to render a new tile. This is far more noticable in then video then in real life. I was hoping to write the new frame to the other half of the display and then use the 'start line' register to swap buffers, but if it is going to glitch that would not be a good idea.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: SSD1306 vertical scrolling glitch

Post by adafruit_support_rick »

What happens with a longer delay between frames?

clem
 
Posts: 5
Joined: Thu Feb 02, 2012 2:22 am

Re: SSD1306 vertical scrolling glitch

Post by clem »

The longer delay just shows that the glitch only happens for one OLED refresh interval.

I suspect that this a lack of double buffering in the 'start line' register. What I'm curious is why other people that use the same technique to do vertical scrolling. Perhaps there are different steppings of the SSD1306?

clem
 
Posts: 5
Joined: Thu Feb 02, 2012 2:22 am

Re: SSD1306 vertical scrolling glitch

Post by clem »

I re-verified that the SPI data is correct. I haven't noticed anything that screams data-integrity problems and the SPI writes for the 'start line' registers look clean on my logic analyzer and they count as I would expect. Definitely no extra clocks on the bus.

I also tried both slowing down and speeding up the SPI and adding NOP (0xE3) writes around the setting of the start line.

One interesting thing is that the glitch isn't just tearing between the old start line and the new start line. The glitched frame seems to be some entirely different offset. It mostly seems to be a row shift, but sometimes it also has a small column shift as well.

I found some sample code from WiseChip/Univision (Adafruit datasheet is for a Univision UG-2832HSWEG01) that writes to '0x40 + y' to implement smooth vertical scrolling. So I'd assume that this is supposed to work.

I played around with other registers that effect the screen position to see if they glitch as well. Writing to 'display offset' (0xD3) scrolls the display without glitching.

I'm out of things to try. I'm assuming that this is an issue with the specific version of the SSD1306 on this panel. Another possibility is that this display doesn't actually have a SSD1306, but instead one of the other similar, but not same 'compatible' driver parts.

Any ideas would be greatly appreciated.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: SSD1306 vertical scrolling glitch

Post by adafruit_support_rick »

We can try replacing the display. That's about the only thing I can think of.
Please email [email protected] with a link to this thread for a replacement

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”