I've bought a ESP32C3 DEV board with a (very) small (0.42") OLED display.
I tried it with the SSD1306 component but can't change the I2C address to 0x3C.
I found this address with my logic analyser and an Arduino sketch that works.
According to all resources this is SSD1306 protocol with address 0X3C.
So I found another FC10 component (SSH1106) that makes use of this I2C address, tried it and it works.
But... this can't change the amount of pixels (the OLED actually has 74 x 40 pixels), so I need an offset to display what I want.
Is there a way to change the SSD1306 component I2C address to 0X3C?
Change I2C address SSD1306 component
-
- Posts: 336
- http://meble-kuchenne.info.pl
- Joined: Tue Dec 08, 2020 5:11 pm
- Has thanked: 93 times
- Been thanked: 67 times
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Change I2C address SSD1306 component
Hi
The component has two preset addresses (0x78 / 0x7A) which you can select, but I guess you could edit the source code to give anything you want.
Regards
The component has two preset addresses (0x78 / 0x7A) which you can select, but I guess you could edit the source code to give anything you want.
Regards
-
- Matrix Staff
- Posts: 1913
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 619 times
- Been thanked: 644 times
Re: Change I2C address SSD1306 component
Hello,
I have changed the source code to allow you to select either the two pre-set addresses or a custom address.
Browse to this location using file explorer , it's hidden by default so just paste the link into your address bar.
Place the attached component.
If Flowcode is already open, then you will need to reload your project for the new component to work
If you run any component updates, then the component you added will be overwritten, so it will stop working again (unless the component update has been pushed).
I have changed the source code to allow you to select either the two pre-set addresses or a custom address.
Browse to this location using file explorer , it's hidden by default so just paste the link into your address bar.
Code: Select all
%ProgramData%\MatrixTSL\FlowcodeV10\Components
If Flowcode is already open, then you will need to reload your project for the new component to work
If you run any component updates, then the component you added will be overwritten, so it will stop working again (unless the component update has been pushed).
- Attachments
-
- gLCD_SSD1306_i2c.fcpx
- (18.44 KiB) Downloaded 21 times
Martin
Re: Change I2C address SSD1306 component
Hey thank you for you fast action!
But it doesn't work.
The I2C address in the new component is set to "custom" and I choose "0x3C" (which shows up as 60).
But when I look at the I2C signal on my logic analyser it sends 0x00
The data send over the I2C bus with address 0x3C (60) (shows up as 0x00)
And the data over the I2C bus with the SSH1106 protocol (and address 0x3C)
But it doesn't work.

The I2C address in the new component is set to "custom" and I choose "0x3C" (which shows up as 60).
But when I look at the I2C signal on my logic analyser it sends 0x00
The data send over the I2C bus with address 0x3C (60) (shows up as 0x00)
And the data over the I2C bus with the SSH1106 protocol (and address 0x3C)
-
- Matrix Staff
- Posts: 1913
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 619 times
- Been thanked: 644 times
Re: Change I2C address SSD1306 component
Sorry, there was a typo within the component.
I have also changed the component so the custom value is shown as hex format.
Can you try the attached , please.
I have also changed the component so the custom value is shown as hex format.
Can you try the attached , please.
- Attachments
-
- gLCD_SSD1306_i2c.fcpx
- (18.49 KiB) Downloaded 18 times
Martin
Re: Change I2C address SSD1306 component
Thanks Medelec35, I only had the chance to test it live on the dev board, but the display stays dimmed.
I need to get my hands on my logic analyser to check the data on the I2C bus, but I probably won’t have the time before the weekend.
I will keep you informed...
I need to get my hands on my logic analyser to check the data on the I2C bus, but I probably won’t have the time before the weekend.
I will keep you informed...
-
- Matrix Staff
- Posts: 1913
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 619 times
- Been thanked: 644 times
Re: Change I2C address SSD1306 component
Hello.
I can see why there is confusion.
with the SSD1306 by selecting 0x78 then that is the 8bits for a write.
The transaction_Initialise right shifts so 0x3C is stored which is the default address.
If a Transaction_write is called then the 7bit address will be left shifted so 0x78 is sent
If a Transaction_Read is called then the 7bit address will be left shifted and OR'd with 1 so 0x79 is sent
You are entering 0x3C, which is entered as a Read.
That means the address analyser will see for the default address is:
0x3C>>1 = 1E
You was not to know that, nor did I util I just looked at the code I2C Cal
I will ask for the reason its done that way.
What you could do to find the correct address to add is use the Address sniffer/scanner
It will show the Write address, which is what you require to enter in the text box In the case of my display, it was 0x78
I can see why there is confusion.
with the SSD1306 by selecting 0x78 then that is the 8bits for a write.
The transaction_Initialise right shifts so 0x3C is stored which is the default address.
If a Transaction_write is called then the 7bit address will be left shifted so 0x78 is sent
If a Transaction_Read is called then the 7bit address will be left shifted and OR'd with 1 so 0x79 is sent
You are entering 0x3C, which is entered as a Read.
That means the address analyser will see for the default address is:
0x3C>>1 = 1E
You was not to know that, nor did I util I just looked at the code I2C Cal
I will ask for the reason its done that way.
What you could do to find the correct address to add is use the Address sniffer/scanner
It will show the Write address, which is what you require to enter in the text box In the case of my display, it was 0x78
Martin
-
- Matrix Staff
- Posts: 1913
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 619 times
- Been thanked: 644 times
Re: Change I2C address SSD1306 component
Have you tried adjusting the properties to match your display?
Martin