# How to setup and use oled SSD1306 I2C screen(UG-2864HSWEG01) in proteus 8.8

i am trying to simulate an 128 x 64 I2C oled screen with arduino but cannot get to work.

I am using the arduino compiler and the libraries adafruit gfx 1.1.5 and adafruit ssd1306 1.1.2 ( light size instead modern ones )

I have tried some codes and the companion examples in hex format but it does not work.

Also I have tried finding the oled the I2C address and no I2C devices found.

# UPDATED and solved.

My references

OLED Datasheet

The current schema

My example code

#include <Wire.h>
#include<SPI.h>

#define OLED_RESET 4

void setup()
{

Serial.begin(9600);
display.begin(SSD1306_SWITCHCAPVCC, 0x3D);
display.display();
delay(2000);
display.clearDisplay();

display.drawPixel(40, 10, WHITE);
display.drawPixel(50, 10, WHITE);
display.drawPixel(60, 10, WHITE);
display.display();
delay(2000);

}

void loop()
{
delay(100);
}


• Debugging questions needs to include meaningful indication of the failure - so for example, this is an I2C interface, are bus operations getting an ACK?. You have the additional issue here that it's not really knowable if the simulation is true to what it purports to model in all cases - it's entirely possible that something that works in the hardware won't in the simulator. Sep 9, 2020 at 15:40
• Instead of adding [SOLVED] to the question, please accept the correct answer. Sep 9, 2020 at 17:29