Hi Bill, I heard and read that the control should - almost - be the same as for the SSD1306. I must say that I like it that this display is a bit bigger than the SSD1306 so I ordered an IIC and SPI version. If you can wait for some time I will make an sh1106 library and get it working.
Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Bill Beek <[email protected]> Verzonden: vrijdag 16 januari 2026 20:30 Aan: jallib <[email protected]> Onderwerp: Re: [jallib] Re: Update SSD1306 library supporting bigger font Hi Rob, Thank you for the information. As far as sending a 0x00 prior to the command transmission was concerned, I thought the procedure "_sh1106_start_transmission" took care of that. Also I did try to add an extra write _byte(0x00) in the send_command procedure. But nothing changed. If it's too much work for you to look in to it further, it's no problem. I will try further to understand several libraries, but i am not very good in the C coding. Thank you for your effort. Kind regards, Bill. On Thursday, January 15, 2026 at 10:24:37 PM UTC+1 Rob CJ wrote: Hi Bill, Update. I looked at the attached Arduino library and they send a lot of commands during initialization like yoiu do using the procedure sh1106_command(). This procedure is as follows for IIC: void Adafruit_SH1106::SH1106_command(uint8_t c) { // I2C uint8_t control = 0x00; // Co = 0, D/C = 0 Wire.beginTransmission(_i2caddr); WIRE_WRITE(control); WIRE_WRITE(c); Wire.endTransmission(); } So they send all data starting with a transmission of zero. I cannot find in the documentation why that works but maybe it does. Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Rob CJ <[email protected]> Verzonden: donderdag 15 januari 2026 18:07 Aan: [email protected] <[email protected]> Onderwerp: Re: [jallib] Re: Update SSD1306 library supporting bigger font Hi Bill, First quick analisys starting at the intialize routine. You start a transmission and then you send bytes but it does not work that way since the device has various registers and it needs to know to which register you are addressing. Instead you better call the procedure that start a transmission, sends the command and the data and stops the transmission. For example for setting the contrast. You use the following at the initialization after you have sent other data too: _sh1106_write_byte(_sh1106_SET_CONTRAST) _sh1106_write_byte(0x9F) -- A = 0x9F or 0xCF P = 0xAF But you should send the contrast command (control byte) followed by the contrast data in each transmission like in the procedure set_contrast() _sh1106_start_transmission(_sh1106_COMMAND_TRANSMISSION) _sh1106_write_byte(_sh1106_SET_CONTRAST) _sh1106_write_byte(contrast) _sh1106_stop_transmission() I noticed you based this on an olderversion of the ssd1306 library. In the newer version I removed the include of the IIC library which has to be done by the main program (as it should according to the JAL style guide). I hope this helps for the first step. Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Bill Beek <[email protected]> Verzonden: woensdag 14 januari 2026 20:43 Aan: jallib <[email protected]> Onderwerp: Re: [jallib] Re: Update SSD1306 library supporting bigger font Hi Rob, Not working at all, see picture. I studied several arduino libs but that didn't give me a solution. While the programmers write, that it is a small modification of the SSD1306, I don't see it. When I use the 1306 with this lib, the first line written from right to left with the text in mirrored image. Kind regards, Bill. On Wednesday, January 14, 2026 at 6:57:06 PM UTC+1 Rob CJ wrote: Hi Bill, That may take some time because those datasheets are not always that clear, especially Chinese ones. Have you looked at an Arduino library for this display? That often gives an idea about how things should work. I know for example that I could never have written the library for the ili9341LCD without some info I got from the Arduino library and I still wonder how they figured out certain settings while the documentation did not give any clue on that. Is nothing working or are certain things not working? Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Bill Beek <[email protected]> Verzonden: dinsdag 13 januari 2026 20:24 Aan: jallib <[email protected]> Onderwerp: Re: [jallib] Re: Update SSD1306 library supporting bigger font Hi Rob, I tried to make the SSD1306 library suitable for the SH1106, but it won’t work. Addressing the memory is different, with line, page and column addresses. Because I don’t fully understand the 1306 lib, it is difficult for me to make it work. Maybe you want to look at the data sheet to make some suggestions. I send the lib along. I deleted the SPI and scroll functions to keep it simple. Thank you in advance, and best wishes for 2026 to the group. Bill. On Thursday, September 25, 2025 at 9:48:13 PM UTC+2 Rob CJ wrote: Hi Bill. FYI. I finished the update of the glcd_ssd1306 library and the sample files. Tested it with all JAL Fonts using I2C and SPI and all seem to work fine. I uploaded it to GitHub so it should be in the bee package of the upcoming weekend. Since the version you have works for the 12x16 font it did not yet work for all available JAL fonts but that has been fixed. As said before, the IIC and SPI libraries now need to be included by the main program as to make the library compliant with the JAL style guide. It now also gives more flexibilty since you can now also use SPI 2 and I2C 2 if you needed that but it is a breaking change with the previous version of the library. Examples are given in de sample files. Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Rob CJ <[email protected]> Verzonden: donderdag 25 september 2025 19:05 Aan: jallib <[email protected]> Onderwerp: Re: [jallib] Re: Update SSD1306 library supporting bigger font Hi Bill, Good to hear that it works. As I mentioned before the IC on the module operates at 3.3 Volts and the pins are not 5 Volt tollerant so be careful with that. Today I tested the library with all available JAL fonts and they - after some smalle modifications to the library - all work now. I also moved the IIC and SPI part out of the library and moved that to the main program. The library checks which interface (I2C software, I2C hardware, I2C harware 2, SPI hardware and SPI hardware 2) is included by the main program and uses that interface automagically. The only setting that remains for the interface is the SPI software, for all others interfaces it is just including the required interface before including the ssd1306 library and it will then use that interface for the communication with SSD1306 module. I added a text with a bigger font to the current sample programs so that users can see that that works too. It works for I2C but I still need to test it for SPI as wel. If all works then I will upload the updated library and the updated sample programs. Good luck with the project. I think this was a nice extension of the functionality of this library. Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Bill Beek <[email protected]> Verzonden: woensdag 24 september 2025 19:49 Aan: jallib <[email protected]> Onderwerp: Re: [jallib] Re: Update SSD1306 library supporting bigger font Hi Rob, The 12x16 font now works fine, the error was on my side, the hex file worked fine as expected. After compilation of your program it went wrong again. After investigation, the glcd_font lib turned out to be corrupted, so I apologize for the inconvenience. I have looked at the I2C lines, and also see that interference signals are getting bigger as the voltage increases between 3 and 5 Volts. What I also noticed was that the pulses were not very steep, which is of course due to by the weak pullups. After placing 2 x 4k7 resistors it looked much better and realized a more stable data transfer. I noticed that the display regularly fails at 5V, after placing the resistors everything worked well at 5 Volts. According to my info there is some kind of voltage regulator on the display board which would make it applicable from 3 to 5 Volt. Many thanks for the good work, Kind regards, Bill. On Wednesday, September 24, 2025 at 7:01:50 PM UTC+2 Rob CJ wrote: Hi Bill, Attached the JAL testprogram I used and the hex file. Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Bill Beek <[email protected]> Verzonden: dinsdag 23 september 2025 19:29 Aan: jallib <[email protected]> Onderwerp: Re: [jallib] Re: Update SSD1306 library supporting bigger font P.S. send me the hex file for the 18F1825 so i can see of that is okay with my setting. On Tuesday, September 23, 2025 at 7:25:46 PM UTC+2 Bill Beek wrote: Hi Rob, Only the display on IC2 and 3.3V I don't understand it either, are you sure that the posted lib is the same as in your test? That could explain the problem. On Tuesday, September 23, 2025 at 6:34:28 PM UTC+2 Rob CJ wrote: Hi Bill, I cannot explain this. I will do some more testing and also test it with the SPI interface. Did you try it without any other connections to the IIC bus and at 3.3. Volt? Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Bill Beek <[email protected]> Verzonden: dinsdag 23 september 2025 17:25 Aan: jallib <[email protected]> Onderwerp: Re: [jallib] Re: Update SSD1306 library supporting bigger font Hi Rob, Some extra information about the topic. I tested also with a 18f1825 and sw I2C and as expected, got the same image as in the photo I posted. If the 6x8 font is used, everything works well even with the 18f2520, which is equipped with the tiny bootloader which works handy and fast for me. The 16F1825 is programmed with the pickit 2. I hope that you are able to locate the problem. Kind regards, Bill. On Monday, September 22, 2025 at 8:15:03 PM UTC+2 Bill Beek wrote: Hi Rob, Tested without the ina3221, delete the I2C code lines from the program and Vcc 3,3V but nothing changed. So I wondered if it's possible that the lib you posted is not the same as in your test? The 1306 is powered by wires under the board. Kind regards, Bill. On Monday, September 22, 2025 at 7:02:08 PM UTC+2 Rob CJ wrote: Hi Bill, The only thing I found is that you include and initialize i2c_hardware. As you may remember this is currently also done by the ssd1306 and I am not sure if this messes things up so I commented that part out. I also commented out the include of glcd_common since that is needed by the ssd1306 library so it is included there. I also moved the selection of the font but that should not make a difference. I attached the update. For the final version of the updated library you have to include and initialize i2c_hardware but not yet for this version. So it should work but not sure if the I2c_hardware has messed things up (I do not think so). Unfortunately I do not have an 18F2520 to test it. I see you have two devices on the IIC bus. Did you also test with without the INA3221? And to be sure. Although the module works at +5V you should not pull-up the SDA and SCL lines to +5Volt. If you have connected both the INA3221 and the SSD1306 to +5V, the INA3221 will pull-up the lines to +5V and that can kill the module. Last but not least. As I mentioned before the SSD1306 module generates a lot of noise on the SDA and SCL lines and that is gone if you use it on 3.3 Volt. So for this test. Only connect the SSD1306 and use it (including the PIC) at 3.3 Volt and see if that works. If that is the case and you want to use it together with the INA3221 at +5V then use a level shifter between the PIC and the SSD1306. BTW. I do not see any power connection to the SDD1306 🙂. Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Bill Beek <[email protected]> Verzonden: maandag 22 september 2025 12:26 Aan: jallib <[email protected]> Onderwerp: [jallib] Re: Update SSD1306 library supporting bigger font Hi Rob, I tested the lib but the same problem exist. I added your name at the lib to be sure that the right lib was used. You can see what's happens on the picture. I can't understand what I have done wrong so I added my program. Kind regards, Bill. On Sunday, September 21, 2025 at 1:38:05 PM UTC+2 [email protected] wrote: Hi Bill, It took me quite some time to figure this out. First of all, you cannot read data from the SSD1306. This means that I cannot write characters using pixels. So I looked at the procedure ssd1306_write_char() which writes ... characters. This procedure does not require the big cache that you normally need when writing characters as pixels or when using graphics in general. Currently the SSD1306 library worked correctly for the 6x8 font and that was only because that is a vertical font and that matches how the SSD1306 displays the data. This seems to be one of the view (or the only?) vertical font, all other - larger - fonts are horizontal fonts and that causes the problem when using them. So I added code to this procedure that checks if the used font is a horizontal font and if so it rotates the character 90 degrees to match the SSD1306 display and splits the character up into smaller pieces since the SSD1306 works with pages (0..7) each 8 pixels high. If a font is bigger than 8 pixels, it needs to be spit up and divided over 2 pages. I attached the library including a picture that shows the 12x16 font working. I still need to test this for other font sizes and I need to clean the library up since currently the limit is 12x16 and if you use a smaller font I could save data space. So please give it try. You do not need any special setting for this only that you are using text mode. Next to cleaning the library up I am planning to move the IIC and SPI part from this library to the main program so that it is not included by this library anymore. This is in line with the JAL style guide but it results in a breaking change for anyone who is currently using the library since incuding IIC or SPI and initializing them moves to the main program. Kind regards, Rob -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jallib/5f33c130-d73d-4080-b8c4-03900fba52a9n%40googlegroups.com<https://groups.google.com/d/msgid/jallib/5f33c130-d73d-4080-b8c4-03900fba52a9n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jallib/cdba0988-9ce1-4ca3-8c43-d9a18f9d3d12n%40googlegroups.com<https://groups.google.com/d/msgid/jallib/cdba0988-9ce1-4ca3-8c43-d9a18f9d3d12n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jallib/d0a75094-24de-4dc6-a426-0b52e37d3a6cn%40googlegroups.com<https://groups.google.com/d/msgid/jallib/d0a75094-24de-4dc6-a426-0b52e37d3a6cn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jallib/7b59ff16-9193-40ab-955c-5c804d9b4cbfn%40googlegroups.com<https://groups.google.com/d/msgid/jallib/7b59ff16-9193-40ab-955c-5c804d9b4cbfn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jallib/AM7PR02MB6098BC3AE041ABF60033D863E61FA%40AM7PR02MB6098.eurprd02.prod.outlook.com<https://groups.google.com/d/msgid/jallib/AM7PR02MB6098BC3AE041ABF60033D863E61FA%40AM7PR02MB6098.eurprd02.prod.outlook.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jallib/91b559f2-374c-49ba-bba9-2b20f51257fen%40googlegroups.com<https://groups.google.com/d/msgid/jallib/91b559f2-374c-49ba-bba9-2b20f51257fen%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to a topic in the Google Groups "jallib" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/jallib/JdXGKBOcq1A/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jallib/7947f9c7-ce70-4f06-ac3a-242c11b0a3f9n%40googlegroups.com<https://groups.google.com/d/msgid/jallib/7947f9c7-ce70-4f06-ac3a-242c11b0a3f9n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to a topic in the Google Groups "jallib" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/jallib/JdXGKBOcq1A/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jallib/AM0PR02MB4052718D79F34A45306986E3E68CA%40AM0PR02MB4052.eurprd02.prod.outlook.com<https://groups.google.com/d/msgid/jallib/AM0PR02MB4052718D79F34A45306986E3E68CA%40AM0PR02MB4052.eurprd02.prod.outlook.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion visit https://groups.google.com/d/msgid/jallib/aa7c5b75-72cd-4331-9993-95dbff854874n%40googlegroups.com<https://groups.google.com/d/msgid/jallib/aa7c5b75-72cd-4331-9993-95dbff854874n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jallib/AM0PR02MB40520A03CC6C38BF3307C878E68AA%40AM0PR02MB4052.eurprd02.prod.outlook.com.
