SSD1309 OLED Library for Proteus Simulation: the 2.42 inch 128x64 OLED showing a counter and a sine wave on an Arduino UNO V4.0

SSD1309 OLED Library for Proteus Simulation

1 View
40
700
60
25
60
PCBWay

Hello friends, I hope you all are doing great. Today, I am going to share the new SSD1309 OLED Library for Proteus Simulation. The 2.42" 128 x 64 OLED is the big brother of the small 0.96" screens: the same resolution on a glass almost three times as wide, readable across a room. It uses the SSD1309 controller, which looks like the SSD1306 - and that is exactly the trap, because a few commands are different and SSD1306 code stops working in strange ways. With this library you can run a full Proteus simulation of the module, watch every command on the bus and see what the SSD1309 does with them.

SSD1309 OLED Proteus simulation running: counter, sine wave, contrast fade, scroll and inverse on an Arduino UNO
Figure: The SSD1309 OLED simulation at work.
Updates

SSD1309 OLED Library for Proteus

Latest version: V1.0 (December 2026, this tutorial)

Helping Tools

The demo drives the OLED from an Arduino UNO V4.0 over hardware SPI with a tiny driver of its own: a counter, shapes and a moving sine wave, a contrast fade, the SSD1309's own scroll and the inverse mode.

NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the LCD board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the SSD1309 OLED Library for Proteus Simulation:

SSD1309 OLED Library for Proteus Simulation: the 2.42 inch 128x64 OLED showing a counter and a sine wave on an Arduino UNO V4.0
Figure: The SSD1309 OLED Library for Proteus Simulation.

What Is the SSD1309 OLED?

The SSD1309 is a controller for monochrome OLED glass with up to 128 x 64 pixels. Each pixel emits its own light, so there is no backlight: unlit pixels are truly black and the contrast is excellent. The common module is a blue board with the 2.42" glass and a 7-pin header, and it ships in SPI mode; I2C needs two small resistors moved on the back.

  • The board: 72.0 x 43.0 mm, four holes on 68 x 39 mm centres, the 7-pin 2.54 mm header GND, VCC, SCL, SDA, RES, DC, CS.
  • The glass: 60.5 x 37.0 mm, an active area of 55.01 x 27.49 mm, pixels 0.40 mm on a 0.43 mm pitch.
  • One colour per panel: white, blue, yellow or green.
  • Supply 3.3 - 5 V: the board has a regulator for the logic and a boost converter for the panel's high voltage.
  • SPI up to 10 MHz (write only), or I2C up to 400 kHz at the address 0x3C or 0x3D.

The Display RAM

The controller keeps the picture in 1024 bytes of RAM: 8 pages of 128 columns. A byte is a column of 8 vertical pixels inside a page, the lowest bit at the top. Pixel (x, y) is in page y / 8, column x, bit y % 8. A sketch sets the page and the column, then sends data bytes - in page addressing mode the column moves on after each byte and the page stays. The horizontal and vertical modes move through a window instead.

Where the SSD1309 Differs from the SSD1306

Most of the command set is the same, which is why SSD1306 libraries often draw a picture on an SSD1309. The differences show up in the details:

  • No charge pump: the SSD1309 needs its panel voltage from outside - the module's boost makes about 12.5 V. The SSD1306 command 8D 14 (pump on) does not exist here.
  • A command lock: FD 16 locks the controller, and then it ignores everything except FD 12. Vendor start-ups send FD 12 first, in case the chip was left locked.
  • Seven-byte scrolls: the scroll setups 26 / 27 take seven parameter bytes - the SSD1306's six plus a start and an end column. SSD1306 code sends one byte too few, the SSD1309 takes the next command (usually the 2F) as the end column, and the scroll never starts.
  • Its own VCOMH levels: DB 00 / 34 / 3C, with 34 (about 0.78 x VCC) after reset.
  • Extras: a one-column content scroll (2C / 2D) and a GPIO command (DC).
  • Stronger drive: the segment and common drivers are stronger, which is what lets it drive a bigger glass.

SPI and I2C

On SPI the controller reads the data on the rising edge of SCL, most significant bit first, while CS is low; DC low means commands and their parameters, DC high means display data. On I2C, CS must be low, the DC pin becomes the address bit (0x3C low, 0x3D high), and each transfer starts with a control byte: 0x00 for commands, 0x40 for data.

Features of the SSD1309 Library

  • A real-looking module: the 72 x 43 mm board with its glass, holes and header at true size; the picture glows on the sheet in the panel's colour.
  • Both buses: SPI as the board ships, or I2C with BUS = I2C.
  • The SSD1309 command set: the lock, the seven-byte scrolls, the content scroll, VCOMH, GPIO, contrast, inverse, remap, multiplex, offset and start line.
  • SSD1306 code caught: an 8D, a short scroll or a write while locked shows up in the log.
  • The RAM as stored: all three addressing modes, with the pointer and the scroll window drawn.
  • Simple and Advance: an on-sheet status panel, or a pop-up with the glass, a decoded Bus log and Tests for the start-up, the bus, the speed and the pixels.
  • A complete package: about 1.3 MB with the library, our Arduino UNO V4.0 and the demo, without the source code of the model.

The SSD1309 OLED in Proteus

The library has two devices in TEPSSD1309.LIB with the model TEPSSD1309.DLL: OLED242SSD1309TEP (Simple, with the on-sheet status panel) and OLED242SSD1309ADVTEP (Advance, with the pop-up). Search SSD1309 in Pick Devices. The pins are GND, VCC, SCL, SDA, RES, DC and CS, in the order of the real header; the properties are COLOUR (white, blue, yellow or green) and BUS (SPI or I2C).

SSD1309 2.42 inch OLED module from the SSD1309 Library for Proteus Simulation, at its true size with its 7-pin header
Figure: The SSD1309 OLED module.

Download SSD1309 OLED Library for Proteus Simulation

Click the button below to download SSD1309-OLED-Library-for-Proteus-v1.0.zip (about 1.3 MB, without the source code of the models):

SSD1309 OLED Library for Proteus V1.0
  • README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
  • Proteus Library Files: TEPSSD1309.LIB and ArduinoV4TEP.LIB.
  • Proteus Model Files: TEPSSD1309.DLL and TEPARDUINO.DLL.
  • Arduino Code: the demo sketch (SPI).
  • Proteus Simulation: the demo project, its HEX file and copies of the DLLs.

No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.

How to Install SSD1309 OLED Library for Proteus Simulation

  1. Close Proteus and extract the whole zip file, for example to your Desktop.
  2. Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
  3. Copy the files from Proteus Model Files into the MODELS folder.
  4. Delete TEPSSD1309.IDX from the LIBRARY folder if it is there.
  5. Start Proteus, press P and search for SSD1309.

Proteus Simulation of the 2.42" OLED on an Arduino UNO

The demo uses an A4 sheet with our Arduino UNO Library for Proteus V4.0 and the OLED, OLED1, wired as the board ships - SPI: SCL to D13 (SCK), SDA to D11 (MOSI), CS to D10, DC to D9 and RES to D8, VCC and GND to the supply. The module is a little wider than the UNO, as the real one is. The Arduino's monitor is built in, the same window as our TEP Serial Monitor Advance for Proteus. Open SSD1309-OLED-ArduinoUnoV4.pdsprj.

SSD1309 simulation in Proteus: the 2.42 inch OLED wired to an Arduino UNO V4.0 over SPI, A4 sheet
Figure: The whole simulation on an A4 sheet.

The Sketch

The sketch uses no display library: a few functions are the whole driver, so every byte the SSD1309 gets is in the code. The start-up is the vendor's 2.42" sequence, without the AF - the RAM is written first. It begins like this:

  0xFD, 0x12,          // command lock OFF (unlocked) - the SSD1309's own command
  0xAE,                // display off
  0x00, 0x10,          // column 0 (page addressing: low / high nibble)
  0x40,                // start line 0
  0x81, 0xBF,          // contrast 191

Note what is missing: there is no 8D anywhere. The scroll is the SSD1309's, with its seven parameter bytes:

  0x26,                // right horizontal scroll setup
  0x00,                // A: dummy 00
  0x01,                // B: start page 1 (the title bar's page 0 stays)
  0x04,                // C: interval code 4 = one column every 2 frames (the SSD1309's table)
  0x06,                // D: end page 6 (page 7 - the status line - stays)
  0x00,                // E: dummy 00
  0x01,                // F: start column 1   } the two bytes an SSD1306 setup does not send:
  0x7E,                // G: end column 126   } the frame's columns 0 and 127 stay put
  0x2F                 // activate the scroll

A full frame buffer would take 1024 bytes - half the UNO's RAM. The sketch draws page by page instead, into a 128-byte buffer, and sends each page with its address:

  SPI.transfer(0xB0 | p); SPI.transfer(0x00); SPI.transfer(0x10);
  digitalWrite(OLED_DC, HIGH);
  for (uint8_t i = 0; i < 128; i++) SPI.transfer(buf[i]);

SSD1309 Simulation Results

Open the project and press Run. The demo ran 8.0 simulated seconds and took about 2 minutes 43 seconds on our PC with the pop-up open and the pictures being taken. Click OPEN PANEL on the module for its pop-up. Every number below comes from one simulation run, the demo exactly as it ships.

The Start-Up

At 0.6 s the start-up is over and the glass shows the whole picture: the title bar with dark text on lit pixels, the counter at 001, COUNT, four shapes, the sine wave in its box and the status line SPI 8MHZ RUNNING. The tiles under the glass read DISPLAY ON, COMMAND LOCK UNLOCKED, CONTRAST 191, ADDRESSING PAGE, ORIENTATION UPRIGHT, MULTIPLEX 64 ROWS, VCOMH 34 (0.78 VCC) and SCROLL OFF. Two complete frames have arrived - the first written before the display went on.

SSD1309 Proteus simulation pop-up: the picture just after the start-up, counter 001
Figure: Just after the start-up.

The Counter and the Sine Wave

At 1.3 s the counter is at 004 and the wave has moved on: a new frame every 250 ms, five so far. Under the glass the pop-up shows the display RAM exactly as stored, page by page, with the pointer in blue - page 7, column 0, where the last page of the frame ended. The supply card works out the panel's refresh from the clock (0xA0) and the pre-charge (0xF1): 95.5 Hz. The latest transfer: 128 data bytes for page 7, 7.7 us after its three address commands.

SSD1309 Proteus simulation pop-up: the counter, the shapes, the sine wave and the RAM as stored
Figure: The picture running.
SSD1309 Proteus simulation: the 2.42 inch OLED module showing the counter and the sine wave on the sheet
Figure: The OLED on the sheet.
The SSD1309 OLED simulation running in the Proteus workspace
Figure: The simulation in the workspace.

The Contrast Fade

At 1.5 s the sketch starts the contrast fade, sixteen steps every 40 ms: 81 with BF, down to 00, up to FF and back to BF. At 2.1 s the contrast is 15 and the glass is dim - the same RAM, the same pixels, only the segment current turned down. The status line follows the value (FADE 015); only page 7 is sent again for it.

SSD1309 Proteus simulation pop-up: the contrast faded down to 15
Figure: The contrast fade.

The SSD1309 Scroll

At 3.0 s the sketch sends the SSD1309 scroll - 2E, 26 and its seven bytes, then 2F. At 4.3 s pages 1 - 6 have moved to the right and wrapped around: the wave is now on the left and the counter, still at 007, in the middle, while the title bar (page 0) and the status line SCROLL 26 (page 7) stand still, outside the window. Columns 0 and 127 - the frame's sides - stay put too: those are the two column bytes an SSD1306 scroll does not send. The amber outline in the RAM view marks the scroll window; the latest transfer is the 2F, SCROLL ON, at 3.1947 s. The sketch writes nothing to the RAM while the scroll runs, as the datasheet asks.

SSD1309 Proteus simulation pop-up: the horizontal scroll with its 7 parameter bytes, pages 1 to 6 moving
Figure: The scroll.

The Inverse Mode

At 5.6 s the sketch sends 2E, redraws the whole RAM (the scroll had moved the picture inside the controller) and the counter runs again. At 6.0 s it sends A7: every lit pixel goes dark and every dark pixel lights - a white glass with black text, counter 009, status INVERSE A7. The RAM view below still shows the RAM as stored: A7 changes only what the panel shows.

SSD1309 Proteus simulation pop-up: the inverse display mode, A7
Figure: The inverse mode.

At 7.0 s A6 puts the display back to normal, and at 8.0 s the counter is at 015 with 48 frames received - the next 10-second cycle of the demo starts at 10 s.

SSD1309 Proteus simulation pop-up: back to normal, the counter at 015
Figure: Back to normal.

The Bus Log and the Tests Page

The Bus log lists every transfer, newest first, decoded: here the last frame - for each page a PAGE START (B0 - B7), LOWER and HIGHER COLUMN START 0 and 128 data bytes. The gaps show the sketch at work: 1.9 us between the address commands, 7.7 us before the data, and 3 - 7 ms between the pages while the UNO draws the next page into its buffer. A whole frame takes about 30 ms.

SSD1309 Proteus simulation Bus log: the page addresses and the data bytes of one frame
Figure: The Bus log.

The Tests page checks the start-up against the SSD1309 datasheet, and every row is green: a RES pulse of 14.4 us (at least 3 us needed; the sketch asks for 10 us and digitalWrite adds the rest), FD 12 sent, no 8D, 64 rows, the alternative COM pins of this glass, upright, VCOMH 0x34, the clock 0xA0, one scroll setup with the seven parameter bytes, page addressing, the display on 188.0 ms after power-on and all 1024 RAM bytes written before it. Below, the start-up as the sketch sent it, byte by byte.

SSD1309 Proteus simulation Tests page: the start-up checked against the datasheet
Figure: The Tests page.

The Arduino's built-in serial monitor prints the banner, the wiring and one line per step. The times come from millis(), and each line is printed when its step is done - the inverse line at 7.12 s is the end of that second.

Arduino UNO V4.0 serial monitor in the SSD1309 Proteus simulation: the start-up and the steps
Figure: The Arduino's monitor.

Which OLED Library?

For the 0.96" 128 x 64 screen with the SSD1306 see our OLED SSD1306 Library for Proteus; the 1.3" screens often carry the SH1106, which has a 132-column RAM and no horizontal addressing - our OLED SH1106 Library for Proteus. The small 0.91" strip is in our OLED 128x32 Library for Proteus. Pick the SSD1309 when the screen has to be read from a distance: the same 128 x 64 pixels, each 0.43 mm instead of about 0.17 mm.

Try It Yourself

  • Add 0x8D, 0x14 to the start-up: the Bus log warns that the SSD1309 has no charge pump.
  • Remove the F and G bytes from the scroll setup: the 2F is taken as the end column and the scroll never starts.
  • Send FD 16 before the drawing: the glass stops changing until FD 12 arrives.
  • Change A1 to A0 or C8 to C0: the picture is mirrored or upside down.
  • Set BUS to I2C and write the sketch with Wire: 0x3C, the control bytes 0x00 and 0x40.

Ideas to Extend the Demo

  • A big clock or a temperature display, readable across a room.
  • A menu with a cursor in inverse.
  • A scrolling ticker on one page with the 2C / 2D content scroll.

Your Own Sketches

The demo sketch is in the zip file, and you can change it in the Arduino IDE. New to Arduino? Start with our Arduino Tutorial for Beginners. Export the compiled binary, and set the UNO's PROGRAM property to the new file. Our guide on How to get the HEX file from Arduino shows you where the file ends up.

Things to Know Before Using a Real SSD1309 OLED

  • SPI from the factory: I2C needs the resistors moved on the back; check your board's marking.
  • No 8D: leave the charge pump command out - some boards ignore it, some show garbage.
  • FD 12 first: in case the controller was left locked.
  • RES: keep it as a pin, or tie it high with a reset circuit; without a clean reset pulse the controller may stay dark.
  • RAM: a full 1 KB frame buffer is half an UNO's RAM - use page buffers.

Troubleshooting

  • Nothing on the glass: no AF, RES held low, CS high, or the controller locked.
  • The scroll never starts: an SSD1306-style scroll setup with six bytes.
  • The picture is mirrored or upside down: A0 / A1 and C0 / C8.
  • Only every second row shows: the COM pins - this glass needs DA 12.
  • The part is not simulated: TEPSSD1309.DLL is missing from MODELS and from the project folder.

Limitations of the Simulation

  • The commands, the RAM, the buses and the module's size follow the SSD1309 datasheet, the module and panel drawings and the published start-up; the module is our own drawing.
  • Our own figures: the glass position on the board, the frame rate from the family's formula, the GPIO reset value.
  • Not modelled: the panel's light-up delay after AF, burn-in, the boost converter itself.
  • Arduino is a name of Arduino; this library is not made or endorsed by Arduino, Labcenter or the makers of the controller or the module.
  • Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.

So, that was all about the SSD1309 OLED Library for Proteus Simulation. I hope it helps you put a big, sharp screen on your next project. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!


Comments

0

Join the conversation