Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:48 01 May 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : SSD1306 over I2c

Author Message
vincenthimpe
Regular Member

Joined: 14/10/2018
Location: United States
Posts: 45
Posted: 09:37pm 26 Apr 2025
Copy link to clipboard 
Print this post

basic version 6.0001 , rpi2040

The manual says many modules are wired wrong without explaining exactly what is wrong. It's also not explained what base address the built in routines expect.  (0x3c or 0x3d)

Display is attached to physical i2c1 (not i2c0)

option system i2c gp18,gp19 ' i2c1 port as system port
option lcdpanel ssd1306i2c,1,2

i2c2 check &h3c ' returns 0 so the device is there

comment : the naming of the i2c devices is confusing.
i2c means physical i2c0
i2c2 means physical i2c1

i rewired the display to 0x3d and
i2c2 check &h3d ' returns 0 if display wired to 0x3d


Nothing appears on the display.
Tried line and text commands.

it would be good to be able to set the base address for the system display.
like:

option lcdpanel ssd1306i2c,1,2 ,&h3c
option lcdpanel ssd1306i2c,1,2 ,&h3d


any ideas ? any leads on what displays are known to work. ( 1.3inch. need 128x64 )
Thanks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9992
Posted: 09:47pm 26 Apr 2025
Copy link to clipboard 
Print this post

  Quote  The manual says many modules are wired wrong without explaining exactly what is wrong.


What's wrong is they don't work. 0.9" displays are typically fine. 1.3" are typically not although I have had some in the past that have worked. No idea why.
 
vincenthimpe
Regular Member

Joined: 14/10/2018
Location: United States
Posts: 45
Posted: 10:23pm 26 Apr 2025
Copy link to clipboard 
Print this post

most of them seem to use a SSD1315 controller. Looks like the 1306 can't drive the larger oled ( not in pixelcount, but actual pixel size. it takes more current)

studying datasheets now...

looked through the mmbasic sourcecode . looks like 0x3c is the expected base address.
 
vincenthimpe
Regular Member

Joined: 14/10/2018
Location: United States
Posts: 45
Posted: 10:36pm 26 Apr 2025
Copy link to clipboard 
Print this post

Is there a way to trigger the init sequence using a command ?  The display init only happens during power cycle.

i want to trigger "InitDisplayI2C" from the interpreter.
same for I2C_Send_Command and i2c_send_data.

that way i can experiment with initializing the controller.

i could rewrite that code in mmbasic, but if the functions exist it would be faster.

thanks
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2944
Posted: 03:54am 27 Apr 2025
Copy link to clipboard 
Print this post

Hi Vincent,

Many moons ago I designed a PCB called >>> Serial Backpack <<< that took serial commands  to display onto various LCD modules (to alleviate the load on the main Controller).

John Gerrard aka JMan on TBS wrote some drivers in C to support various modules SSD1306 was one of them.

In the link above you might find clues to what you are after. The Serial backpack was based on a MX170 so the C code wont work but if you contact John he may have the source files or you may be able to clean some info from his basic drivers in the above directory.

Unfortunately I don't speak "C" so cant help you directly.

Kind Regards,

Mick (The big one)



.
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7458
Posted: 08:46am 27 Apr 2025
Copy link to clipboard 
Print this post

I use the SSD1306 I2C 128x64 on my fish tank controller. It works fine. These are some I got from AliExpress. I'm using I2C0 on GP0/GP1 but I can't remember the I2C address offhand.

The naming of the devices isn't confusing if you want compatibility with MMBasic platforms that only have a single port called "I2C". If the PicoMite had used I2C0 and I2C1 (as the Datasheet does) none of the software that uses "I2C" would have run without modification.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
mozzie
Regular Member

Joined: 15/06/2020
Location: Australia
Posts: 90
Posted: 08:51am 27 Apr 2025
Copy link to clipboard 
Print this post

G'day Vincent,
Please also be aware that some "SSD1306" Oled displays are really using the SSH1106 controller   they also share the same IIC address  

The SSD and SSH are very similar and if memory serves correct, can be got to work with some commands sent.

I found this out the hard way when the SSD1306 displays I purchased refused to work   am away from main PC for a couple of days but will be able to confirm when home.

Regards,
Lyle.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9992
Posted: 09:16am 27 Apr 2025
Copy link to clipboard 
Print this post

  Quote  most of them seem to use a SSD1315 controller.


Thanks for the hint. I've changed the initialisation to suit the both the 1306 and 1315 so it should work in the next release with the command

OPTION LCDPANEL SSD1306I2C,L,2
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9992
Posted: 09:40am 27 Apr 2025
Copy link to clipboard 
Print this post

If you download RC18 again the fix is now in it. Please try it and report
 
vincenthimpe
Regular Member

Joined: 14/10/2018
Location: United States
Posts: 45
Posted: 06:08pm 27 Apr 2025
Copy link to clipboard 
Print this post

it works ! thanks a lot !
small request for next release candidate :
- add a way to trigger the init routine using a command
- add a way to switch addresses (3C and3D)

something along the lines of

SSD1306I2CINIT &h3C
SSD1306I2CINIT &h3D

SSD1306I2CTARGET &h3C
SSD1306I2CTARGET &h3D

you don't need to alter the commands.
It looks like the 3C address is defined as a constant in the .h file.
make it into a variable and have a command to set the target.
this would enable the use of two displays

Some board have the address bit switchable.

i had to bodge mine on the flex as the D2 trace was hard strapped under the flex.




trial code:

PicoMite MMBasic RP2040 Edition V6.00.02RC18
OPTION SYSTEM I2C GP18,GP19
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL SSD1306I2C, LANDSCAPE, 2

Attached display with ssd1315 (1.3inch oled):

https://goldenmorninglcd.com/oled-display/1.29-inch-oled-128x64-ssd1315-gme12864-77/

sold on amazon
https://www.amazon.com/dp/B09ZP6MLWR?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1

i ordered a bunch of different ones. to see what is out there. will update this post with findings





Edited 2025-04-28 04:16 by vincenthimpe
 
vincenthimpe
Regular Member

Joined: 14/10/2018
Location: United States
Posts: 45
Posted: 04:25pm 29 Apr 2025
Copy link to clipboard 
Print this post

Additional Display tested (i have mor eon the way)

Panel maker : Univision technology / Wisechip
format : 128x64
bus : i2c 0x3c
Flex marked UT-0205-P05
Size : 2.4 inch
Controller: SSD1309
Status : WORKS


Panel maker : unknown
format : 128x64
bus : i2c 0x3c
Flex marked NFP1315-61AY
Size : 0.96in
Controller: SSD1315
Status : WORKS

Panel maker : unknown
format : 128x64
bus : i2c 0x3c
Flex marked NFP1315-45AY
Size : 0.96in
Controller: SSD1315
Status : WORKS

Panel maker : unknown
format : 128x64
bus : i2c 0x3c
Flex marked -blank-
Size : 0.96in
Controller: SSD1315
Status : WORKS


will update with pictures, datasheets and source
 
vincenthimpe
Regular Member

Joined: 14/10/2018
Location: United States
Posts: 45
Posted: 07:05pm 29 Apr 2025
Copy link to clipboard 
Print this post

Panel maker : Goldenmorning
format : 128x64
bus : i2c 0x3c
Flex marked GME12864-98
Size : 1.54 inch
Controller: SSD1315
Status : WORKS but needs offset 0 during init


Panel maker : unknown
format : 128x64
bus : i2c 0x3c
Flex marked XFP1116-07AY
Size : 1.3 inch
Controller: SH1106
Status : WORKS
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2025