Silicon Chip0.91-inch OLED Screen - November 2024 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: The hydraulic analogy is valuable for beginners
  4. Feature: Nikola Tesla, Part 2 by Dr David Maddison
  5. Project: Variable Speed Drive Mk2, Part 1 by Andrew Levido
  6. Subscriptions
  7. Feature: Precision Electronics, Part 1 by Andrew Levido
  8. Project: Surf Sound Simulator by John Clarke
  9. Project: JMP014 - Analog pace clock & stopwatch by Tim Blythman
  10. Project: JMP013 - Digital spirit level by Tim Blythman
  11. Project: FlexiDice by Tim Blythman
  12. Feature: 0.91-inch OLED Screen by Jim Rowe
  13. Project: 3D Printer Filament Dryer, Part 2 by Phil Prosser
  14. Feature: Maxwell’s Equations by Brandon Speedie
  15. PartShop
  16. Serviceman's Log: The Show Must Go On by Dave Thompson
  17. Vintage Radio: Revisting the Zenith Royal 500 by Ian Batty
  18. Market Centre
  19. Advertising Index
  20. Notes & Errata: PicoMSA, September 2024
  21. Outer Back Cover

This is only a preview of the November 2024 issue of Silicon Chip.

You can view 46 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • The life of Nikola Tesla, Part 1 (October 2024)
  • The life of Nikola Tesla, Part 1 (October 2024)
  • Nikola Tesla, Part 2 (November 2024)
  • Nikola Tesla, Part 2 (November 2024)
Items relevant to "Variable Speed Drive Mk2, Part 1":
  • Mk2 VSD PCB [11111241 or 9048-02] (AUD $15.00)
  • STM32G030K6T6 programmed for the VSD Mk2 [1111124A] (Programmed Microcontroller, AUD $10.00)
  • Firmware for the VSD Mk2 (Software, Free)
  • VSD Mk2 PCB pattern (PDF download) [11111241] (Free)
  • Mk2 VSD drilling & cutting diagrams (Panel Artwork, Free)
Articles in this series:
  • Variable Speed Drive Mk2, Part 1 (November 2024)
  • Variable Speed Drive Mk2, Part 1 (November 2024)
  • Variable Speed Drive Mk2, Part 2 (December 2024)
  • Variable Speed Drive Mk2, Part 2 (December 2024)
Articles in this series:
  • Precision Electronics, Part 1 (November 2024)
  • Precision Electronics, Part 1 (November 2024)
  • Precision Electronics, Part 2 (December 2024)
  • Precision Electronics, Part 2 (December 2024)
  • Precision Electronics, Part 3 (January 2025)
  • Precision Electronics, part one (January 2025)
  • Precision Electronics, part one (January 2025)
  • Precision Electronics, Part 3 (January 2025)
  • Precision Electronics, part two (February 2025)
  • Precision Electronics, Part 4 (February 2025)
  • Precision Electronics, Part 4 (February 2025)
  • Precision Electronics, part two (February 2025)
  • Precision Electronics, part three (March 2025)
  • Precision Electronics, part three (March 2025)
  • Precision Electronics, Part 5 (March 2025)
  • Precision Electronics, Part 5 (March 2025)
  • Precision Electronics, Part 6 (April 2025)
  • Precision Electronics, Part 6 (April 2025)
  • Precision Electronics, part four (April 2025)
  • Precision Electronics, part four (April 2025)
  • Precision Electronics, part five (May 2025)
  • Precision Electronics, Part 7: ADCs (May 2025)
  • Precision Electronics, part five (May 2025)
  • Precision Electronics, Part 7: ADCs (May 2025)
  • Precision Electronics, part six (June 2025)
  • Precision Electronics, part six (June 2025)
Items relevant to "Surf Sound Simulator":
  • Surf Sound Simulator PCB [01111241] (AUD $10.00)
  • Surf Sound Simulator PCB pattern (PDF download) [01111241] (Free)
Items relevant to "JMP014 - Analog pace clock & stopwatch":
  • Firmware for JMP014 - Pace Clock (Software, Free)
Articles in this series:
  • Wired Infrared Remote Extender (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Thermal Fan Controller (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Self Toggling Relay (June 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Arduino Clap Light (June 2024)
  • Lava Lamp Display (July 2024)
  • Digital Compass (July 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • IR Helper (September 2024)
  • IR Helper (September 2024)
  • No-IC Colour Shifter (September 2024)
  • No-IC Colour Shifter (September 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • BIG LED clock (January 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Items relevant to "JMP013 - Digital spirit level":
  • Firmware for JMP013 - Digital Spirit Level (Software, Free)
Articles in this series:
  • Wired Infrared Remote Extender (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Thermal Fan Controller (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Self Toggling Relay (June 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Arduino Clap Light (June 2024)
  • Lava Lamp Display (July 2024)
  • Digital Compass (July 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • IR Helper (September 2024)
  • IR Helper (September 2024)
  • No-IC Colour Shifter (September 2024)
  • No-IC Colour Shifter (September 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • BIG LED clock (January 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Items relevant to "FlexiDice":
  • FlexiDice PCB set [08107241-2] (AUD $5.00)
  • PIC16F18146-I/SO programmed for the Flexidice [0810724A.HEX] (Programmed Microcontroller, AUD $10.00)
  • 1.3-inch blue OLED with 4-pin I²C interface (Component, AUD $15.00)
  • 1.3-inch white OLED with 4-pin I²C interface (Component, AUD $15.00)
  • FlexiDice kit (Component, AUD $30.00)
  • Firmware (C and HEX) files for the FlexiDice (Software, Free)
  • FlexiDice PCB patterns (PDF download) [08107241-2] (Free)
Items relevant to "0.91-inch OLED Screen":
  • Software for driving a 0.91in OLED module (Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
Items relevant to "3D Printer Filament Dryer, Part 2":
  • Filament Dryer Control PCB [28110241] (AUD $7.50)
  • PIC16F15214-I/P programmed for the 3D Printer Filament Dryer [2811024A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Firmware and 3D printing (STL) files for the 3D Printer Filament Dryer (Software, Free)
  • Filament Dryer Control PCB pattern (PDF download) [28110241] (Free)
  • 3D Printer Filament Dryer drilling templates (Panel Artwork, Free)
Articles in this series:
  • 3D Printer Filament Dryer, Part 1 (October 2024)
  • 3D Printer Filament Dryer, Part 1 (October 2024)
  • 3D Printer Filament Dryer, Part 2 (November 2024)
  • 3D Printer Filament Dryer, Part 2 (November 2024)

Purchase a printed copy of this issue for $13.00.

Using Electronic Modules with Jim Rowe 0.91-inch monochrome OLED screen Small monochrome OLED display modules have become widely available at a low cost in the last few years. This one is just 37.5 × 11.5 × 4.5mm but has a 128 × 32 pixel display that’s either white or blue. With its I2C serial interface it can be easily driven by a microcontroller. I n the October 2023 issue, we reviewed the ‘big brother’ of this OLED module, with a display measuring 1.3 inches or 33mm diagonally. It had 128 × 64 pixels – twice that of this module – along with an I2C serial interface. We have used the 1.3inch module in several projects, like the Multi-Stage Buck/Boost Charger Adaptor (October 2022; siliconchip. au/Article/15510). We have also used smaller OLED displays in various projects. For example, a 0.96in module with 128 × 64 pixels was used in these projects: » LC Meter Mk3, November 2022: siliconchip.au/Article/15543 » Q Meter, January 2023: siliconchip.au/Article/15613 » Advanced Test Tweezers, February & March 2023: siliconchip.au/Series/396 And there’s an even smaller 0.49in OLED display with 64 × 32 pixels that we used in the: » SMD Test Tweezers, October 2021/April 2022: siliconchip. au/Article/15276 » Pocket Audio Oscillator, September 2020: siliconchip.au/ Article/14563 The main difference between the current module and all of those others is that the ‘active area’ of its display is wider but shorter: 22.4mm wide by 5.6mm high. Since it has 128 × 32 pixels, that means that it provides a display basically equivalent to the top or bottom half of the 1.3in OLED module. We obtained the module shown in the photos from a supplier on AliExpress for ~$2. Another supplier 78 Silicon Chip on AliExpress had it for ~$3, while it was on eBay for ~$12. Closer to home, Tempero Systems offer it for ~$7, while Core Electronics had a very similar module available for ~$17 (siliconchip.au/link/abw3). All the prices listed above are exclusive of postage costs. Inside these OLED modules The 0.91in (23mm) OLED modules all use a single interface/controller and OLED driver IC, usually either the SH1106 device from Sino Wealth or the SSD1306 device from Solomon Systech. The same controllers are also used in many of the larger modules. Fig.1 is a block diagram of the SH1106 and the SSD1306 interface/ controllers. At upper left is the microcontroller (MCU) interface, which can be configured to interface with an MCU via an 8-bit 6800/8080 parallel interface, a 3- or 4-wire SPI interface or an I2C serial interface. Most of the OLED modules currently available use the I2C interface, including the one we’re looking at here. Display data from the MCU is stored in the Data RAM just to the right of the interface block. The SH1106 and SSD1306 controllers both have around 1024 bytes of Data RAM, enough for a 128 × 64 pixel display. Since the 0.91in OLED only has 32 rows, only half of the Data RAM is used in this module. The Display Controller block to the right of the Data RAM takes data from the RAM and displays it on the OLEDs via the page and segment drivers at the right-hand end of Fig.1. The MCU can also send commands to the controller, which pass from the MCU interface to the Command Decoder block below it in Fig.1. The commands can be used to update the display, turn it on or off, set its addressing mode, set the column starting address and adjust the display Fig.1: the block diagram of the SH1106 and SSD1306 OLED driver controller ICs. The SSD1306 has a slightly bigger internal RAM, letting it store 132 x 64 pixels (four more pixels horizontally than the SH1106). Australia's electronics magazine siliconchip.com.au Fig.2: a common circuit diagram for the 0.91in OLED modules using an SSD1306 controller. contrast and brightness (the latter also determining its operating current). The SH1106 and SSD1306 devices both come in very thin (0.3mm) SMD packages with over 260 contact pads. In the modules, they are mounted directly on the rear of the OLED screen. The module’s circuit Fig.2 shows the circuit of a typical 0.91in monochrome OLED module based on the SSD1306 device. As you can see, it’s very similar to that of the 1.3in OLED module we looked at in the October 2023 issue, although a little simpler. The circuitry to the left of the OLED provides the power supply and assists with the I2C interface. These components are all mounted on the rear of the module’s PCB. Four-pin SIL header CON1 at far left handles both the power input and the I2C interface. REG1 takes the incoming Vcc and steps it down to +3.3V to run the OLED and its controller. The +3.3V line is also used to drive the controller’s reset circuit (it needs to be reset as soon as power is applied) and provides the reference for the 4.7kW pull-up resistors used on the I2C interface lines, SCL and SDA. Before we move on to more practical things like driving one of the modules from an MCU, Fig.3 shows how the SH1106 and SSD1306 controllers save the display data in their Data RAM, and how it is shown on the OLED screen. This is achieved by setting them to what is described as Page Addressing Mode. In this mode, the OLED screen is divided into eight horizontal ‘pages’, where each page consists of 128 vertical segments eight pixels high. The siliconchip.com.au Fig.3: the SH1106 and SSD1306 controllers save their display data into RAM using column-major order. The OLED module’s PCB measures just 37.5mm wide, 11.5mm tall and the module is only 4.5mm deep, making it ideal for compact designs. You can see it at actual size in the adjacent image. Australia's electronics magazine November 2024  79 Fig.4: how to connect the 0.9in OLED module to an Arduino Uno or similar. Fig.5: connecting the OLED module to a Micromite Plus Explore 64 are just as simple as an Arduino. If instead you’re operating the module with a Micromite Mk2 or BackPack, then the SCL pin of the module connects to pin 17 of the Micromite, and the SDA pin connects to pin 18. An example photo of the OLED module connected to a Micromite via a breadboard. The underside of the OLED module shown enlarged for clarity. All components except for the screen are mounted to this side. 80 Silicon Chip Australia's electronics magazine pages are themselves arranged vertically, with page 0 along the top of the screen, page 1 immediately below it and the remaining pages descending. With the 0.91in OLED module, though, the pages and segments are used rather differently. In this case, only every second segment byte of each page is used (segments 0, 2, 4 and so on), and only four bits are used in each segment byte (bit 0, bit 2, bit 4 and bit 6). These four data bits are then used to display the four upper pixels in that segment of the OLED. The data for the lower four pixels of that OLED segment come from the next page in the controller’s RAM, which is organised in the same way: only every second segment is used, and only the four bits are used in each segment byte. I think you’ll agree that this all seems a bit weird, but that’s the way data is organised in the 0.91in OLED modules. Now we can turn our attention to what is involved in driving one of these modules from an MCU like an Arduino Uno or a Micromite. Connecting it to an Arduino Connecting the OLED module to an Arduino Uno (or compatible) is quite straightforward, as you can see from Fig.4. The GND and Vcc pins connect to the GND and 3.3V pins om the Arduino, while the SCL and SDA pins connect to the Arduino’s A5 (SCL) and A4 (SDA) pins, respectively. You can also connect the OLED module to an Arduino Uno R4 Minima, simply by connecting the module’s SCL pin to pin 17 of the Minima and the SDA pin to the Minima’s pin 16. As for software to drive the OLED module, if you go to www.arduino. cc and look at the library listings for ‘Display’ applications (siliconchip.au/ link/abw5), you will find quite a few libraries intended to do this job. The first one I found was Adafruit’s SSD1306 library, with the latest version (V2.5.9) able to handle OLED displays with either 128 × 64 or 128 × 32 pixels. It also relies on using their GFX library. The Adafruit library comes with five example sketches, including one called SSD1306_128x32_i2c.ino – which is the one most suitable for use with the 128 × 32 pixel OLED module. siliconchip.com.au When you run this sketch, it gives you a series of graphics and text displays, including those shown in the article lead and at left. As you can see, the 128 × 32 OLED’s display is quite small, but can display a useful amount of information. Connecting it to a Micromite It’s also quite easy to connect the OLED module to a Micromite MCU. Fig.5 shows the connections needed for a Micromite Plus Explore 64 and, as you can see, they are just as straightforward as driving the module from an Arduino. Connecting the module to a Micromite Mk2 or LCD Backpack V1/V2/V3 would be almost the same, except the module’s SCL pin would be connected to pin 17 of the Micromite and the SDA pin to pin 18. As with an Arduino, you also need some software. It turns out that this isn’t quite as easy as with the Arduinos, as it’s much harder to find any Micromite OLED driver software. As I related in the October 2023 article, I could write an MMBasic program to display text and simple graphics on the 1.3in OLED module, with some much appreciated help from fellow Silicon Chip staff member Tim Blythman. Since the 0.91in OLED modules use the same SSD1306 controller, I decided to try adapting that program to work with them. But that approach didn’t work with the 0.91in module, even when I tried quite a few modifications to the program – the OLED’s display remained stubbornly dark. So once again, I asked Tim for help (sorry, Tim). And as before, he provided a lot of help. Tim searched around The Back Shed (www.thebackshed.­ com/forum) and found some valuable information I had missed concerning MMBasic programming of the various OLED modules. He found a driver written by MM­Basic programming guru Peter Mather and soon came up with his own working program by combining elements of Peter Mather’s driver with a few ideas taken from my program for testing the 1.3in OLED module. Tim sent me his new program by email, and when I tried it out, I found it worked very well. So I added a few comments, plus code to display a full four lines of text instead of the single line that Tim had provided. You can see the display produced by this program at lower right. The program is called “091in OLED TB version.bas” and you can download it from siliconchip.au/Shop/6/454 As before, it’s a fairly simple program, and as it stands it only demonstrates how to drive the OLED module to display text and very simple graphic symbols. It doesn’t let you type text in via the Micromite console and display it directly on the OLED, as that would involve a fair bit of additional code. Hopefully it will make it easy for those who want to display up to four lines of text and basic symbols on the screen of one of the 0.91in OLED modules from a Micromite to do so. I’d like to thank Tim Blythman for help in producing this MMBasic program for the Micromite. Useful links • Interfacing the 0.91in OLED with an Arduino Uno: siliconchip.au/link/abw6 • OLED breakouts: siliconchip.au/link/abw7 • LCDwiki MC091GX user manual: siliconchip.au/link/ abw8 SC siliconchip.com.au Australia's electronics magazine November 2024  81