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

using a different display? #10

Open
wa2mze opened this issue Aug 21, 2024 · 19 comments
Open

using a different display? #10

wa2mze opened this issue Aug 21, 2024 · 19 comments

Comments

@wa2mze
Copy link

wa2mze commented Aug 21, 2024

I found this display, https://www.aliexpress.us/item/3256806709509463.html?ug_edm_item_id=3256806709509463&pdp_npi=4%40dis%21USD%21%246.03%21%243.50%21%21%21%21%21%4021017dd017241432938424107d1f3d%2112000038645521034%21edm%21%21%21&edm_click_module=item_detail&tracelog=rowan&rowan_id1=aeug_edm_56672_1_en_US_2024-08-20&rowan_msg_id=0220biz_search_product%3A0%3A0_575977151%240f0a6fe49d074b1588cfa4e1b5b33538&ck=in_edm_other&gatewayAdapt=glo2usa
which is larger than the one you are using. However, it uses a different controller chip. I wonder how difficult it would be to change the driver code for it? Adafruit has an arduino library that should work, but you are using the SDK not Arduino. Any ideas?

@penfold42
Copy link
Contributor

It claims to be compatible so if you buy the 4 pin I2C version it might just work.
The pictures show a default I2C address of 0x3c which is what this code expects

I was considering adding SH1106 support as i have one and they are 1.3" from memory, but maybe ill buy the one you linked.

@dawsonjon
Copy link
Owner

Yes, I read that it was compatible, I wasn't sure if it meant electrically compatible or a drop replacement. For that price it might be worth a punt.

@wa2mze
Copy link
Author

wa2mze commented Aug 22, 2024

There are two different displays that use the SH1106 and SH1116 chips, the 1.3" and 1.54" I bought the larger one. There is a web page out there that shows the differences between the various OLED controllers, the most important ones being in initialization (if done wrong the display won't even start or light up), and in addressing (the SH versions seem to have a max column address of 132 instead of 128 and also support only a single addressing mode). It is possible to carve out a common feature set that will work with all of the controller versions.

@penfold42
Copy link
Contributor

Many years ago I added sh1106 support to https://github.com/pi1541/Pi1541/
I'll need to see what changes we made there but we had the benefit of a config file for the user to specify I2C address and display type.
Worst case we could use the 2 buttons on startup to force a display type.

The current init sequence is a handy array of commands in ssd1306.c

@MrSVCD
Copy link

MrSVCD commented Sep 3, 2024

Speaking of larger displays, I found these on ebay: https://www.ebay.com/itm/296119960051
SSD1309 should be compatible with SSD1306 but don't quot me on that. I only fund this on a Swedish sellers site.

@bmentink
Copy link

bmentink commented Sep 3, 2024

I found this display, https://www.aliexpress.us/item/3256806709509463.html?ug_edm_item_id=3256806709509463&pdp_npi=4%40dis%21USD%21%246.03%21%243.50%21%21%21%21%21%4021017dd017241432938424107d1f3d%2112000038645521034%21edm%21%21%21&edm_click_module=item_detail&tracelog=rowan&rowan_id1=aeug_edm_56672_1_en_US_2024-08-20&rowan_msg_id=0220biz_search_product%3A0%3A0_575977151%240f0a6fe49d074b1588cfa4e1b5b33538&ck=in_edm_other&gatewayAdapt=glo2usa which is larger than the one you are using. However, it uses a different controller chip. I wonder how difficult it would be to change the driver code for it? Adafruit has an arduino library that should work, but you are using the SDK not Arduino. Any ideas?

I can confirm that this display works perfectly with the latest build of the code. Now my old eyes can actually read the display :)
I am using the rp2350 riscv build and I get 38% CPU usage which is great, for some reason, I was getting 110% on the rp2040

@wa2mze
Copy link
Author

wa2mze commented Sep 3, 2024

I did a git pull and loaded the new .uf2 file for the pico1 and tried the display. It lights, but only displays random junk on the screen. I will need to play with the OLED driver, as mine doesn't work. Some of the Chinese displays actually have a CH1116 controller, not an SSD1309 or SSD1306. The CH1116 internally has a 132 wide column count, not 128, so the addressing may be off if compiled for the SSD variants. The fix may be just to init for 132 X and 64 Y instead of 128 x 64 y.

@bmentink
Copy link

bmentink commented Sep 3, 2024 via email

@penfold42
Copy link
Contributor

Yep, I noticed the same on rp2040 but it works ok on the rp2350 . .. go figure. Also note, mine has CH1116 marked on it, but still works fine on the rp2350 ..

You could try some pull up resistors on SCL and SDA if the display doesn't provide them.

When it works, do you configure it as ssd1306 or sh1106 ?
The init sequences are identical. when we write the data we just offset the starting address by 2 on the sh1106

@bmentink
Copy link

bmentink commented Sep 3, 2024

Yep, I noticed the same on rp2040 but it works ok on the rp2350 . .. go figure. Also note, mine has CH1116 marked on it, but still works fine on the rp2350 ..

You could try some pull up resistors on SCL and SDA if the display doesn't provide them.

When it works, do you configure it as ssd1306 or sh1106 ? The init sequences are identical. when we write the data we just offset the starting address by 2 on the sh1106

I have not touched the code at all. It runs with the default, whatever that is. I have not needed any pull-ups either, maybe the rp2350 has internal pull-ups turned on?
EDIT: The code turns on internal pull-ups ..

.....
gpio_pull_up(PIN_DISPLAY_SCL);
  disp.external_vcc=false;
  ssd1306_init(&disp, 128, 64, 0x3C, i2c1); 

@wa2mze
Copy link
Author

wa2mze commented Sep 3, 2024

Don't know, I haven't recompiled anything, just used the pre built uf2 file. I don't think I need the pull ups, I can see the display being updated, and it responds to changes in frequency, etc. Just not readable because all the pixels are in the wrong place.

@bmentink
Copy link

bmentink commented Sep 3, 2024

Don't know, I haven't recompiled anything, just used the pre built uf2 file. I don't think I need the pull ups, I can see the display being updated, and it responds to changes in frequency, etc. Just not readable because all the pixels are in the wrong place.

Do you have a pico2 you can try? Also, I have compiled the latest pull ..

@wa2mze
Copy link
Author

wa2mze commented Sep 3, 2024

Don't have a pico2 yet. I'm on the notify list at digikey and sparkfun for one.

@bmentink
Copy link

bmentink commented Sep 4, 2024

IMG_20240904_122858196
Here it is ..

@penfold42
Copy link
Contributor

I definitely need to find a better 2X font!

@bmentink
Copy link

bmentink commented Sep 6, 2024

Just discovered that the riscv build works with pico2/CH1116 display combo perfectly, but the ARM build does not, just gives screen full of random pixels ..
I.E pico2rx-riscv.uf2 works, pico2rx.uf2 doesn't ...

@dawsonjon
Copy link
Owner

@bmentink
Copy link

Have you tried these builds? https://github.com/dawsonjon/PicoRX/actions/runs/10704854534

Is that question aimed at me? What has changed for those builds?

@ThiagoDSP
Copy link

Has anyone tested this 2.42" screen? A 2x larger screen would be great. It seems to use the ssd1309 controller

https://a.aliexpress.com/_msi84Y0

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