![]() |
Forum Index : Microcontroller and PC projects : SSD1306 over I2c
Author | Message | ||||
vincenthimpe Regular Member ![]() Joined: 14/10/2018 Location: United StatesPosts: 45 |
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 KingdomPosts: 9992 |
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 StatesPosts: 45 |
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 StatesPosts: 45 |
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: AustraliaPosts: 2944 |
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 KingdomPosts: 7458 |
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: AustraliaPosts: 90 |
G'day Vincent, Please also be aware that some "SSD1306" Oled displays are really using the SSH1106 controller ![]() ![]() 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 ![]() Regards, Lyle. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
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 KingdomPosts: 9992 |
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 StatesPosts: 45 |
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 StatesPosts: 45 |
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 StatesPosts: 45 |
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 |
||||
![]() |