ssd1306 reset Pin

Hi all,

I was wondering does it matter which pin is used as RESET Pin?

I am using I2C so i was kind of hoping NOT to use a RESET Pin...
If I have to use one could it be done with Pin 13? And still use that Pin as an LED?

Thanks!

You do not need to control the /reset pin by your controller.
You do need to use that reset pin.
Use a resistor and capacitor to keep the reset level low for a bit while powering up the display.

If you omit the reset procedure, then you will probably find that the display will start and be controllable, but the buffer can't be accessed.
So you'd see a static picture with noise, which you can flip or scroll horizontally and vertically as well as invert, but you can't control the contents of the screen.

After a correct reset procedure, you will be able control that buffer.

Remember if you want to have 2 way I2c, you'll need to tie pins 20 (SDAin) and 21 (SDAout) together.
That way the unit can send acknowledge signals and such for you to process.

1 Like

Thanks, Mas...

I have been using it for a while now, without connecting the reset pin... It works just fine. Even after a couple of days... But for some reason if I remove the reset pin from the code, or change it to a non-existing pin, it starts to act up.. That is what i do not understand...

What do you mean by tying the I2C pins together?

I'm assuming you are connecting a flat plastic cable to some PCB.
If you are using a prefabricated PCB, then connecting pins 20 an 21 from that flat cable might already been done by the manufacturer, or not.
Does your software wait for acknowledge upon initialisation ?

The reset pin might be connected via a resistor and capacitor to VCC, and brought out to a pin for you to control too, i really have no way of knowing that.
What display are you using (link please) ?
And are you using some library to that (because of that need of the reset pin) ?
Should have asked those questions before..

I am sorry,

I should have mentioned which one I was using... I am using the Adafruit breakout board with their drivers.

So far everything works, but I do not understand the reset pin. If I omit it, the code behaves strange sometimes but not always. If I just set it to some port (even though it is not connected to anything) everything works like a charm. Igot confused so I came to bug my favourite trouble shooters.

I bought another one from banggood :

(or rather I bought five) but i cannot get them to work. So I figured it might have something to do with the reset pin.

I also thought that if I got one ssd1306 to work the others would be a piece of cake, but I was wrong...

I can't tell about the problem with the Adafruit library if the reset pin isn't declared.
I haven't studied that library and am not planning on doing so soon, perhaps you could have a peek inside that to find out what's going on with that reset pin in there.

Have a look at that picture on the banggood site.
It shows the ribbon cable, and it has numbers 1 and 30 printed on it.
See if you can follow it to pins 20 and 21, and whether they are connected or not (you can't always see all connections).
See if pin 14 (/Reset) is connected to a resistor (from VCC) and a capacitor (to GND).

Thanks Mas3,

I understand you wouldn't want to go through the library. I was just wondering if you knew if , when you use an I2C interface would a reset pin still be necessary on that Arduino...

The connections look snug and well soldered. When I measure pin 20 and 21 to ground it shows no resistance...
Pin 14 gives about 1.5Mohm.

When I use an Arduino I2C portscanner, it crashes. (it's the first time I've ever seen him do that)

I read somewhere in the meantime that it could be that the board isn't running on I2C but on SPI. Even though the markings are GND ~ VCC ~ SCL ~ SDA ~ RST ~ D/C.

That Adafruit board has solder pad jumpers for I2C or SPI interface on the back.

When the Adafruit library is configured for I2C, the code toggles the reset pin, with some delays inserted. Why yours works sometimes without the reset pin disconnected is hard to know. It's possible that a floating line will look low to the 1306 briefly. When you took out the reset code did you also remove the delays? That might have changed things.

I have one of the Adafruit 1306 displays. When I jumper it for I2C it won't work without a low strobe to the reset pin.

It's so much faster when jumpered for the SPI interface.

The Banggood display does have a (10K, if i saw correctly) resistor and capacitor to /reset pin 14.

You could change the I2C scanner to output something more, like every increase of the address under test.
That way you might find something out about when it crashes (if it really does that).
The scanner is "pinging" each address possible, and waits a bit for a reply.
If a reply is not received, it will go on to the next address.
If a reply is received, it will output that address and exit.
This is how i remember the scanner to work, i might be mistaking here.
You could also modify the scanner in such way it always tries every address, and would be able to find multiple devices.
Or that it will not stop and keep scanning all the time.

But the scanner relies on 2 way communication.
If said pins 20 and 21 are not connected, you will not be able to receive an answer to a "ping".
That's what's wrong with my 2 CRIUS v1.0 displays, which could not be found by the scanner.
Those were quite easy to fix (just put a drop of solder over these pins) , and now they are found.
But of course you need to know this, before you'll be able to fix it.

@MAS, I'll have a look at the scanner tomorrow, see if I can find anything out.
Thanks for the info so far... Hope I can get it to work soon!

jboyton:
I have one of the Adafruit 1306 displays. When I jumper it for I2C it won't work without a low strobe to the reset pin.

It's so much faster when jumpered for the SPI interface.

I tried it with SPI and it runs a lot faster indeed... Unfortunately i have no spare pins for my project so I2C will have to do. Also I noticed not connecting the reset pin causes a slight delay on reset...

At least that is solved!

This is a very interesting thread. I am confused. I have an I2C OLED display with only 4 pins (Vcc, GND, SCL, SDA). There is NO reset pin. Yet I'm forced to pass a physical reset pin when I instantiate the display via "Adafruit_SSD1306 display(OLED_RESET);" There is no constructor in the library that doesn't contain the reset pin.

What am I missing? If there is no reset pin on the OLED, then what is the library doing with the reset parameter when I call the constructor? I noticed that when the constructor is called in my code the library code DOES actually take control of the pin (sends it low). What is being accomplished by this library action when the physical pin is not even connected to the OLED?

For U8g2 (another SSD1306 graphics library), I solved this by making the reset pin optional. If you pass U8X8_PIN_NONE (or completly drop the arg from the constructor) the U8g2 tries to do its best to perfom a software reset through the I2C or SPI interface.

Oliver

DesertDrummer:
This is a very interesting thread. I am confused. I have an I2C OLED display with only 4 pins (Vcc, GND, SCL, SDA). There is NO reset pin. Yet I'm forced to pass a physical reset pin when I instantiate the display via "Adafruit_SSD1306 display(OLED_RESET);" There is no constructor in the library that doesn't contain the reset pin.

What am I missing? If there is no reset pin on the OLED, then what is the library doing with the reset parameter when I call the constructor? I noticed that when the constructor is called in my code the library code DOES actually take control of the pin (sends it low). What is being accomplished by this library action when the physical pin is not even connected to the OLED?

The Adafruit_SSD1306(int8_t RST = -1); constructor allows you to omit the reset pin.
It defaults to -1, a sentry value that the driver code treats as a no-connect.

The 0xe4 command does not seem to be documented, but it solves the reset issue. After that the display can be refreshed normally. I have the glass panel only, connected caps and a resistor externally. Reset is connected to VCC. Using I2C.