OLED displays 1.3”

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
viki2000
Posts: 190
Joined: Mon Jul 07, 2014 9:38 am
Has thanked: 30 times
Been thanked: 77 times
Contact:

OLED displays 1.3”

Post by viki2000 »

I tested 2 types of OLED displays 1.3” using PIC18F4550.
1) The first one is SainSmart 1.3” SPI 132X64:
http://www.sainsmart.com/sainsmart-1-3- ... -oled.html
https://drive.google.com/open?id=0BwXmK ... authuser=0

2) The second one is Adafruit Monochrome 1.3" 128x64 OLED graphic display:
http://www.adafruit.com/product/938
https://drive.google.com/open?id=0BwXmK ... authuser=0
Wiring:
https://learn.adafruit.com/monochrome-o ... t-3-128x64

1) SainSmart is cheaper (50% price) than Adafruit, that’s why I wanted it.
I found out that technical support at SainSmart is null. I wrote them and never got and answer. The forum lets you register, but no further possibilities to access it. It seems dead too.
The thing is you can buy cheap these OLED displays also from Ebay, Amazon.
First problem noticed was the wiring. How do I connect this display?
On their website there is a zip file named “1.30_OLED.zip” After download and unzip we can see inside a “Manual” as text document where we can read the connections. I double checked that with the Arduino Mega photos.
There are few things which confused me:
a) The numbering of the pins on the back of the OLED. Which pin is 3.3V for example? Is it the most right one on the back connector J1 or the most left one near component C7.
b) Is it working with 5VDC as it is in description or only with 3.3VDC as it is on PCB and in SPI text manual?
c) Is it really working also with I2C as it is in is in description or only SPI ?
Usually the OLED displays with both communication possibilities have some jumpers to switch from SPI to I2C. Here I see nothing.
The “1.30_OLED.zip” file contains also an I2C manual, but is not readable.
https://drive.google.com/open?id=0BwXmK ... authuser=0
https://drive.google.com/open?id=0BwXmK ... authuser=0
Is then the I2C manual a general one? Maybe only for SainSmart with I2C? And this SPI OLED works only with SPI?
Many questions in the beginning without answers.
I decided to try first the SPI.
I checked photos with the pins on Arduino Mega and compared with OLED photos.
https://drive.google.com/open?id=0BwXmK ... authuser=0
https://drive.google.com/open?id=0BwXmK ... authuser=0

I realized the 3.3V is the most left one near the capacitor C7. Also I made some tests with different pins position and different gLCD based on SSD1306, which is the closest component to SH1106.
Finally I got it working using the component “gLCD_SSD1306_buffered”.
https://drive.google.com/open?id=0BwXmK ... authuser=0
The wiring is as follows:
SainSmart OLED 1.3 SPI 132x64_wiring.jpg
SainSmart OLED 1.3 SPI 132x64_wiring
(109.05 KiB) Downloaded 2532 times
SainSmart OLED 1.3 SPI 132x64_1.jpg
SainSmart OLED 1.3 SPI 132x64_1
(168.32 KiB) Downloaded 2532 times
SainSmart OLED 1.3 SPI 132x64_2.jpg
SainSmart OLED 1.3 SPI 132x64_2
(128.63 KiB) Downloaded 2532 times
A video about it:
https://drive.google.com/open?id=0BwXmK ... authuser=0

Next question from forum ( http://www.matrixtsl.com/mmforums/viewt ... 56&t=16374 ) points to an important problem of the display: it is 132x64 and not 128x64.
That can be seen in my video and my pictures as white vertical lines on the right side of the display.
QUESTION1: - What can be done to remove the vertical white lines?
I tried the settings of “gLCD_SSD1306_buffered” to set 132x64 or even 130x64. The white vertical lines disappear but then the printed characters are garbage.
If I print alphanumeric characters starting with position (x,y)=(0,0) then some parts of them are not printed. I have to start at (x,y)=(2,0).
These results confirm that is 132x64 and not 128x64.
QUESTION2: - how can be modified the component “gLCD_SSD1306_buffered” to become 132x64, but functional for SH1106 without those vertical lines?
2) Adafruit has a lot of info on their website about connection/wiring. With the same code inside the PIC18F4550 as for SainSmart SPI, I just made the proper wiring connections and the OLED Adafruit worked from first time without problems.
https://drive.google.com/open?id=0BwXmK ... authuser=0
https://drive.google.com/open?id=0BwXmK ... authuser=0

I wanted to try also I2C with the OLED Adafruit. I soldered the jumpers on the back side, replaced the component “gLCD_SSD1306_buffered” with “gLCD_SSD1306_I2C” in Flowcode, but the OLED did not work. It is black. I tried with and without pull-up resistors on the SDA and SCL lines.
Looking at the Adafruit website recommended connections, I notice that is also the Reset(RST) pin recommended to be connected to Arduino.
But in my case, using PIC microcontroller, inside the Flowcode 6, are only 2 lines to be configured and not the third one Reset (RST).
QUESTION3: - how do we make the component “gLCD_SSD1306_I2C” working with PIC microcontroller without using the Reset (RST) ) pin recommended to be connected in Arduino case? Or where should be connected the RST?

viki2000
Posts: 190
Joined: Mon Jul 07, 2014 9:38 am
Has thanked: 30 times
Been thanked: 77 times
Contact:

Re: OLED displays 1.3”

Post by viki2000 »

Benj made a new component for OLED with SH1106 controller I2C and SPI here:
viewtopic.php?f=63&t=18240

crazyAlex
Posts: 1
Joined: Wed Dec 28, 2016 11:20 am
Contact:

Re: OLED displays 1.3”

Post by crazyAlex »

Unfortunately, only for Flowcode 7

Post Reply