Support for SSD1305 OLED (2.23” Display) 128x32

Hi! I’ve been working on a project and when I tested this OLED on my test board everything was working as it should so I proceeded with the build that took a few days to fully complete…. But now it’s acting up and showing a pixelated screen on poweron but only sometimes. If I power on and off it goes back to normal. I was surprised that although it’s got a SSD1305 driver in it, it worked with SSD1306 enabled. I’m guessing now that’s what’s probably causing my issue.

I’ll admit I’m a newbie when it comes with oleds and this is my first time messing with a “non standard” oled and size.

Is there anyway to get support for this? It’s a 4 pin Oled with the same pixel count as your typical smaller oleds you find on chassis.

Link where I purchased and picture of the issue that only happens on occasion.

Thank you all in advance and I hope this is something that can be resolved easily.

https://a.aliexpress.com/_mL0UZyJ

EDIT: When I tested it on my test board at first I didn’t realize the image wasnt centered. After further research it seems I may need to modify the ssd1306.h folder?? Not sure but I read on the arduino forums that the “charge pump” command may be different for 1305 and some have got it to work with a few tweaks. Again I’m a newb when it comes to this stuff. It might not make any sense what I’m saying but I’m really trying to figure this out. Thank you

Edit edit:
After more research it seems like someone else had the same issue as me trying to use ssd1305 display with the 1306 files. They were able to resolve by adding this to the command list

device = ssd1306(width=128, height=32, …)
device.command(0xDA, 0x12) # Use alternate COM pin configuration
device._colstart += 4
device._colend += 4

Not sure where try this. Or if this is even possible.

Link to GitHub

LINK TO A ADAFRUIT EQUIVALENT

Here would be the place to try it:

Thanks for the reply!

Not sure exactly what I’m doing. Inputing those values gives me
Device was not declared
And colstart was not declared
Errors when compiling

You can’t just paste in the code from above. It’s written for using the adafruit graphics library, which proffieOS doesn’t use. The code would have to be adapted/translated to work with the ProffieOS graphics code, which is what I pointed to.

I see. Thanks for the clarification. I’ll try my best to understand what that means and how to make it work.

I do not have this OLED but this will offset the pixels. Line 1065 in Proffie 7.15:

// Vertical Offset: move image down 4 pixels
Send(SETDISPLAYOFFSET); // 0xD3
Send(0x04); // Vertical offset of 4

// Horizontal Offset: set column start to 4
Send(0x21); // SETCOLUMNADDR
Send(0x04); // Start column (horizontal offset of 4)
Send(WIDTH - 1); // End column

1 Like

I’ve found this post regarding the correct initialization. You might want to test it and make a diff if it works.

In particular, the reply that states this code from SSD1305 initialization:

def _initialize(self):
    # 128x32 pixel specific initialization.
    self.command(0xAE)#--turn off oled panel
    self.command(0x04)#--turn off oled panel	
    self.command(0x10)#--turn off oled panel
    self.command(0x40)#---set low column address
    self.command(0x81)#---set high column address
    self.command(0x80)#--set start line address  Set Mapping RAM Display Start Line (0x00~0x3F)
    self.command(0xA1)#--set contrast control register
    self.command(0xA6)# Set SEG Output Current Brightness

    # PERTINENT 
    self.command(0xA8)#--Set SEG/Column Mapping     0xa0×óÓÒ·´ÖÃ 0xa1Õý³£ 
    self.command(0x1F)#Set COM/Row Scan Direction   0xc0ÉÏÏ·´Öà 0xc8Õý³£

    self.command(0xC8)#--set normal display
    self.command(0xD3)#--set multiplex ratio(1 to 64)
    self.command(0x00)#--1/64 duty
    self.command(0xD5)#-set display offset	Shift Mapping RAM Counter (0x00~0x3F)
    self.command(0xF0)#-not offset


    # PERTINENT 
    self.command(0xd8)#--set display clock divide ratio/oscillator frequency
    self.command(0x05)#--set divide ratio, Set Clock as 100 Frames/Sec

    self.command(0xD9)#--set pre-charge period
    self.command(0xC2)#Set Pre-Charge as 15 Clocks & Discharge as 1 Clock

    # PERTINENT 
    self.command(0xDA)#--set com pins hardware configuration
    self.command(0x12)
    self.command(0xDB)#--set vcomh
    self.command(0x08)#Set VCOM Deselect Level
    self.command(0xAF)#-Set Page Addressing Mode (0x00/0x01/0x02)

The lines with # PERTINENT where those that seemed most important to the poster.

1 Like

Thank you so much for the info and the help! It helps tremendously. I didn’t know exactly what those posts were saying but I do think I get it now that you pointed some stuff out.

Hkwwinger had helped me get it into a much more workable state now and I feel like with the info you provided me I might be able to tweak it some more. Awesome! I appreciate you taking the time to look into the links and to write out what you think. :handshake: