Allo Piano 2.1 J19 header "RST" pin

Hi, sorry for posting this on the main level of this topic but I need to know which pin on the J19 header carries “RST”. It is usually on GPIO 24 which is pin 12 on J19.

I’m having trouble initialising a small Oled screen on this header. I can get it to work when the display programs are launched manually once the Pi3 is up and running but it seems to be impossible to initialise the screen properly while booting the Pi3.

This screen needs an RST pin, so I’m suspecting that may be a part of the problem.

Thanks !

Hi,

I don’t think the RST is hard linked to a single GPIO, I believe you can use any GPIO for RST; you just need to configure it in your software.
So in short, you can use any of the GPIO (=General Purpose I/O) for that matter, as long as you configure it in software accordingly.

Also, I don’t believe all OLED screens require the RST pin, but I don’t know what kind of screen you are using. Maybe you can add a delay if you use a systemd unit to launch the scripts?

Hi,

As far as I can see, RST is usually set to GPIO 24 (= pin 12 on J19) in most scripts. I have an Adafruit 128x64 Oled which apparently needs RST but I’m not sure as it will also come on without RST connected when manually reset (remove 5v, then put it back and manually relaunch display script).

https://www.adafruit.com/product/938

That is correct; doesn’t make it mandatory though :wink:

So we’re talking about an SSD1306 type of screen, which can be used in either I2C or SPI mode. Since you want to use the RST pin, I’m guessing you are going to use the screen over SPI, right? This kind of information might help others.

I’m not too familiar with SPI for the OLED screen, this is as far as my knowledge goes at this point.

Afaik:

SPI = serial = comparable to serial connections on the HD44780 (possibly needs the RST pin on the OLED screen)
I2C = also serial, but minimized and optimized (only needs two data wires as opposed to five); probably doesn’t need the RST pin (I have not seen it)

But I might be wrong, so correct me if I’m wrong please :slight_smile:

Most (all?) of the code I looked at to get my OLED working expected pin values to be changed in the source, so you probably need to choose a GPIO pin for RST and amend the source to use that value.

In the case of vol_oled, the default value is set to

#define OLED_I2C_RESET RPI_V2_GPIO_P1_22 /* GPIO 25 pin 22  */

which doesn’t seem to be provided by your header.

If you attach the OLED RST pin to a pin on your header that corresponds to a GPIO pin e.g. pin 12 for GPIO24, you could try editing volumio_oled.cpp line 263 to include the GPIO number, e.g.

// I2C change parameters to fit to your LCD if ( !display.init(24, oled, i2c_addr) )

Then run make, and test. If it works out I can provide a command line option for the RST GPIO number.

Yes, normally i2c doesn’t need “RST” but this one from Adafruit aparantly needs one… i’ll do the code change later Adrii, got to make some food now :smiley:

GND goes to ground
Vin goes to 5V
Data to I2C SDA (on the Uno, this is A4 on the Mega it is 20 and on the Leonardo digital 2)
Clk to I2C SCL (on the Uno, this is A5 on the Mega it is 21 and on the Leonardo digital 3)
RST to digital 4 (you can change this pin in the code, later)

hmm, no luck. Double checked that RST was on J19 pin 12 but the screen comes on with random dots again, so obviously, RST has no influence (i2c wiring) or the screen is getting bad signals after initialisation :open_mouth:

The only way I get this screen to reset is to unplug Vin then replug, then restart vol_oled.

… anyways, thanks to all for your help, I’ll wait for the Chinese screens to arrive and re-test :frowning: