Display (controller SSD1306) hardware features

I am sure it will be ever of use for somebody but maybe its good to post it here. Sometimes I am tinkering around with the hardware registers and thus I tried to find out if there is hardware vertical scroll support. Actually there is nothing such mentioned in the datasheet but when using the following code:

    /* now scroll vertically */                                             
    LCDCommandMode();                                                       
    SPI.transfer(0x29);                                                     
    SPI.transfer(0x00); /* dummy */                                         
    SPI.transfer(0x00); /* start (page)*/                                   
    SPI.transfer(0x00); /* delay, speed?? */                                
    SPI.transfer(0x00); /* delay, speed?? */                                
    SPI.transfer(0x01); /* offset, speed?? end page*/                       
                                                                            
    SPI.transfer(0x2f); /* start scroll */                                  
                                                                            
    delay(10000);                                                           
                                                                            
    SPI.transfer(0x2e);

it starts scrolling just vertically. If you play with the values in that are 0x00 in my example all kind of funny effects will appear.
For the vertical scroll I uploaded a small video:

Enjoy. Hope there will be many nice findings for this controller so we can use it to create any kind of nice effect.

1 Like

Neat. I believe this is discussed in the technical guide: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf on p45…? It would be cool to take advantage of these effects if it reduces compiled code size. I wonder if there’s any hidden undocumented effects…

LCDCommandMode();
SPI.transfer(0x29);
SPI.transfer(0x00); // dummy. i did not try changing this value
SPI.transfer(0x00); // start row. changing this value produced no visible effect                                    
SPI.transfer(0x00); // delay between shifts                                 
SPI.transfer(0x00); // end row. changing this value produced no visible effect                    
SPI.transfer(0x01); // shift distance 

SPI.transfer(0x2f); // start scroll

delay(10000);                                                           

SPI.transfer(0x2e);

When trying to adapt Adafruit’s “startscrollleft” function, I found that the user is unable to manipulate screen data when scrolling horizontally. However, manipulate the screen data all you want when vertically scrolling. It doesn’t affect it.

Github - Adafruit

OLED Display Documentation Sheet

Try the following code and you get a nice effect:

        /* now scroll vertically */                                             
    LCDCommandMode();                                                       
    SPI.transfer(0x29);                                                     
    SPI.transfer(0x00);                                         
    SPI.transfer(0x07);                                    
    SPI.transfer(0x00);                                 
    SPI.transfer(0x00);                                
    SPI.transfer(0x01);                        
                                                                            
    SPI.transfer(0x2f); /* start scroll */

Looks like this:

4 Likes