Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for SSD1305 #808

Open
Sterr1 opened this issue Jan 31, 2025 · 20 comments
Open

Added support for SSD1305 #808

Sterr1 opened this issue Jan 31, 2025 · 20 comments

Comments

@Sterr1
Copy link

Sterr1 commented Jan 31, 2025

I was commit circle display driver for support larger displays SSD1305 32 and 64 pixels height. In minidexed.ini you can set SSD1306LCDWidth=132.
I was test it. Add it to wiki.

@Banana71
Copy link

Banana71 commented Feb 1, 2025

Hello Sterr1,
great that you found your way to miniDexed.
Can you please provide some more information about the displays, e.g. links to the display you are using and/or photos, the Address: SSD1306LCDI2CAddress=0x0

Have fun making music
Peter

@Sterr1
Copy link
Author

Sterr1 commented Feb 1, 2025

Hello Peter. I'm newbee on Github, and not understand some things. But I have some mind for start codespace, change code and compile working project. I change included rsta2/circle driver included in MiniDexed, but when I go to rsta2/circle on github, I can't see driver circle/addon/display/ssd1306device.cpp and my changes. I don't understand why. For support SSD1305 I just change 3 strings in file code. I saw it in mt32-pi project, where my display work. If I make some wrong, here my changes to circle/addon/display/ssd1306device.cpp for working SSD1305:


`	// Validate dimensions - only 128x32 and 128x64 supported for now
	if (!(m_nHeight == 32 || m_nHeight == 64) || !(m_nWidth == 128 || m_nWidth == 132))
		return false;
	
	const bool bIsSSD1305 = m_nWidth == 132;

	const u8 nMultiplexRatio  = m_nHeight - 1;
	const u8 nCOMPins         = (m_nHeight == 32 && !bIsSSD1305) ? 0x02 : 0x12;`

SSD1305 have 132 soft pixels buffer, but really have 128 visible pixels. And changed parameter COMPins. All another compatible with SSD1306. Address the same 3C or 3D selected by pin 4 in HGS128321 and protocol I2C selected by pins 17 and 18. And must be reset pin 16 connected to HIGH. It's rare display but now sales in china more display compatible with larger than 1306 0.91" size.
0.91" too small for use. I order another for my project and test it too.

1 pic - HGS128321 with jumpers pins 17,18.
2 pic - compare with standard 1602 display
3 pic - work with modified driver
4 pic - work with modified driver
On 5 picture you can see how display works on standard SSD1306 driver

My plans: in future I hope integrate mt32, SF2, JV880, MiniDexed in one SDcard switchable as in microdexed. What is your opinion - make it in your project, or make new?
And question - ftp work fine in MiniDexed and in MT32pi. Why you not update in release?

Links: One, Two, Three
Third variant looks like my display but 64 pixels height.

2014061208582147.pdf
Image
Image
Image
Image
Image

probonopd added a commit to probonopd/circle that referenced this issue Feb 2, 2025
Add support for SSD1305 by @Sterr1

Please see probonopd/MiniDexed#808 (comment) for details.
probonopd added a commit to probonopd/circle that referenced this issue Feb 2, 2025
Add support for SSD1305 by @Sterr1.

For details please see probonopd/MiniDexed#808 (comment)
@probonopd
Copy link
Owner

probonopd commented Feb 2, 2025

Hello @Sterr1. Thank you very much. Submitted your patch for inclusion in Circle at rsta2/circle#541. Once it is merged there and once we can use the latest Circle in MiniDexed, support for SSD1305 should appear in MiniDexed.

FTP will land in MiniDexed once #747 or #783 can be merged.

rsta2 pushed a commit to rsta2/circle that referenced this issue Feb 2, 2025
Add support for SSD1305 by @Sterr1.

For details please see probonopd/MiniDexed#808 (comment)
@zippypinhead2025
Copy link

Hi, sadly this does not work with on zero 2w and this oled hat:
https://www.waveshare.com/wiki/2.23inch_OLED_HAT
any suggestions?
thx in advance

@Sterr1
Copy link
Author

Sterr1 commented Feb 23, 2025

Probonopd not compile it with suupport because rsta2 not add it in master. Try my kernel8
You must right configure board for i2c connection and ini file. I have:

# HD44780 LCD
LCDEnabled=1
LCDPinEnable=17
LCDPinRegisterSelect=4
LCDPinReadWrite=0
LCDPinData4=22
LCDPinData5=23
LCDPinData6=24
LCDPinData7=25
LCDI2CAddress=0x00

# SSD1306 LCD
# For a 128x32 display, set LCDColumns=20; LCDRows=2
# For a 128x64 display, set LCDColumns=20; LCDRows=4
SSD1306LCDI2CAddress=0x3C
SSD1306LCDWidth=132
SSD1306LCDHeight=32
SSD1306LCDRotate=1
SSD1306LCDMirror=0

# ST7789 LCD
# SPIBus=0 for any RPi (GPIO 10,11,8,7).
#     Note: Leave blank (default) if no SPI device required.
# Select=0|1 for CE0 or CE1
# Data = GPIO pin number
# Optional: Reset, Backlight = GPIO pin numbers
# Rotation=0,90,180,270
# SmallFont=0 (default), 1
#
# For a 240 wide display set LCDColumns=15 with LCDRows=2
SPIBus=
ST7789Enabled=0
ST7789Data=
ST7789Select=
ST7789Reset=
ST7789Backlight=
ST7789Width=240
ST7789Height=240
ST7789Rotation=0
ST7789SmallFont=0

# Default is 16x2 display (e.g. HD44780)
LCDColumns=20
LCDRows=2

Answer if work fine.

@zippypinhead2025
Copy link

No dice. Sorry.

Image

@Sterr1
Copy link
Author

Sterr1 commented Feb 23, 2025

SSD1306LCDWidth=132 // switch to SSD1305

?

I was buy 1305 LCD. When it come, I will show you.

@zippypinhead2025
Copy link

there's the rub!

Image

Thank a ton!
Спасибо!

@Sterr1
Copy link
Author

Sterr1 commented Feb 23, 2025

Forget switch with to 132?

@zippypinhead2025
Copy link

Yes, exactly!

@probonopd
Copy link
Owner

Hello, I lost track about this one a bit (I don't have the hardware for it). It sure looks great! Do we still need to do something in MiniDexed? Thanks.

@craigyjp
Copy link

craigyjp commented Feb 24, 2025

I bought a couple of these for another project to test but never got around to it. Maybe I will use one in the future. I ended up with ST7789 displays for the colour.

20241020_165742.jpg

@zippypinhead2025
Copy link

SSD1306 OLEDs are too small. As a senior I need reading glasses for those tiny displays.
These SSD1305 hats are a good solution for a compact but readable device.

@Sterr1
Copy link
Author

Sterr1 commented Feb 24, 2025

Do we still need to do something in MiniDexed? Thanks.

Not is really in MiniDexed. I download project, but my changes in circle not present. Update changes and compile project.

@probonopd
Copy link
Owner

Right, so we will need to update to the latest Circle in MiniDexed.

Pending

So it seems we can update Circle once it is at Step49.

@Sterr1
Copy link
Author

Sterr1 commented Feb 24, 2025

It's a problem, when you use external components. So long.

@Sterr1
Copy link
Author

Sterr1 commented Feb 28, 2025

Today I received a display from China. As you can see, it’s smaller than my old one, and that one, in turn, is smaller than the standard 1602. If you remove the metal frame, there’s just a glass layer ~0.5-1 mm thick on a ribbon cable, which is visible on the other side of the board. So, you can glue the display to any glass from the inside and mount the board differently. On the board, you can see address selection via jumpers. But the addresses are listed incorrectly. The Chinese love to mislead buyers. The address is listed as 0x01111000b, but you just need to shift it right, and it becomes 0x00111100b = 0x3Ch. If you move the jumper, it will be 0x3Dh. The display worked immediately without any changes to the circuit or settings. But in old settings I was rotate to180 dg, and here it's reverted. In China, the display costs 46 yuan + 2 yuan purchase tax on the Pinduoduo website. At today’s exchange rate, it’s ~$6.3. Shipping is very cheap, just slow. The same displays are available on Aliexpress, but they’re more expensive.

Also, in another photo, you can see an SD Card ribbon cable from China. The problem is that in the ZERO 2W, the card isn’t secured in any way and could fall out during an impact when mounted in a synthesizer. Plus, I didn’t want to mount the RPi with the connector facing outward close to the case wall. So, I chose an extension and a connector with a locking mechanism.

Once I solve all the issues with MIDI control (and for some reason, it works poorly in MiniDexed — maybe the MIDI adapter is bad), I’ll assemble everything into a MIDI keyboard. I’ll record a video and share it with you.

ImageImage

Image

Image

Image

Image

Image

@Sterr1
Copy link
Author

Sterr1 commented Feb 28, 2025

So it seems we can update Circle once it is at Step49.

I something don't understand on github. rsta2 make changes only in develop branch, but you use main branch, if I'm not mistaken. But in develop branch present two files ssd1306device.cpp, where changes applied, and ssd1306display.cpp where changes not applied. Files are similar.

@diyelectromusic
Copy link
Collaborator

But the addresses are listed incorrectly. The Chinese love to mislead buyers. The address is listed as 0x01111000b, but you just need to shift it right, and it becomes 0x00111100b = 0x3Ch.

They aren't misleading you, it is just a common problem with I2C addresses.

They are all 7-bit addresses, but it is the 7 most significant bits that are the address in the protocol as bit 0 is actually a R/W bit. So if the 7-bit address is specified, then it is 0x3C, but if it is described as an 8-bit value then 0x3C with an additional R/W bit is indeed a shifted left address, in this case 0x78.

Kevin

@probonopd
Copy link
Owner

I something don't understand on github. rsta2 make changes only in develop branch, but you use main branch, if I'm not mistaken. But in develop branch present two files ssd1306device.cpp, where changes applied, and ssd1306display.cpp where changes not applied. Files are similar.

What is currently in the Circle develop branch will likely be in the next Circle release. At that point, we will update Circle and then support should be in MiniDexed.

petemoore pushed a commit to petemoore/circle that referenced this issue Mar 4, 2025
Add support for SSD1305 by @Sterr1.

For details please see probonopd/MiniDexed#808 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants