Go Down

Topic: OLED 1.3" I2C IIC 128x64 Serial LCD - Faulty? (Read 2147 times) previous topic - next topic

vgtlcs

Dear All,
Can anyone please advise if the attached pics show the display is faulty or whether it is a program fault?
The 128x64 (IDAFRUIT) Display Demo runs but as can be seen in the pics only the top few lines of this display is working - all the rest of the display lines just show random noise?

Please advise.

Ian

olikraus

Hi

Not sure what you mean by IDAFRUIT, i assume you use the Adafruit Software.

So, i would say this: If your display is NOT a original Adafruit OLED display, then there is a good chance, that your display does not contain the SSD1306 controller (which is the one in the Adafruit display) but instead contains a SH1106 controller, which also is used for 128x64 displays. Any OLED with the SH1106 controller is NOT supported by Adafruit.

All in all, your pictures (partly visible correct bitmap) indicate such a problem.

You may want to use u8glib instead, which has support for both types of 128x64 OLED displays: With SSD1306 or with SH1106 controller.

Oliver

vgtlcs

Thank you for your reply Oliver, greatly appreciated!  Getting any sensibility out of the supplier of this I2S IIC Serial OLED is like pulling out "chickens teeth"??
You are correct about Adafruit - just my crappy typing and no it was not purchased from them - I wish it had been then I wouldn't be having the problems I am having!

To a complete newby finding out who the "reliable deallers are" to deal with is a huge problem when you don't know before hand!

Can you please take the time to explain what the "IIC"  and  "I2(Squared)C parts of this OLED refers to?  I will be ever so grateful if you can.

The actual terminology used by OLEDS is very confusing and I have actually been on to the manufacturers site (www.heltec.cn)  to try to find out both this and what "controller" is used in their 1.3" OLED - I don't know about you but my Mandarin is zip!!!!

I am also trying to locate a complete I2S scanner so I can determine which address is correct for this particular OLED as the one on the back of it (0x78, 0x7B or 0x7A) - can't see if it is an "8" or "B" - just don't work and I got the results in my pictures when I used 0x3C - can you point me in the right direction? The I2C scanner on Arduino site looks great but gettin it into a downloadable form is problematic - a further example of my limited knowledge in this new field!!!

This leads neatly into my last question - what document reader do you use to read and edit ".c; .h; .ino" files as MS Word just spits the dummy and gives up!!

I know I am asking you for a lot of information so I will be really grateful for what ever you decide to provide, if you do.

Cheers, Ian from "Down Under"

Grumpy_Mike

Quote
what the "IIC"  and  "I2(Squared)C parts of this OLED refers to

They both mean the same thing and it is the interface protocol that is used to communicate between the Arduino and the display.
See:-
http://en.wikipedia.org/wiki/I%C2%B2C

Quote
so I can determine which address is correct for this particular OLED

Yes the address is correct or you would not be seeing anything.

However these displays normally run off 3V3 not 5V, are you sure of the voltage?
Also with I2C you need a pull up resistor from each of the signal lines to the display's power.

Quote
what document reader do you use to read and edit ".c; .h; .ino" files

You can use Notepad as all these are simply text files.

olikraus

#4
Aug 06, 2014, 07:17 am Last Edit: Aug 06, 2014, 07:35 am by olikraus Reason: 1
Hi

I have discussed this kind of display on my gallery page (4th pic from top): https://code.google.com/p/u8glib/wiki/gallery. At least my own OLED does not require pull up resistors and it works with 5V:

Also note, that this display might be invisible to the I2C scanner, because it might not send the ACK response.

My suggestion is, with your setup from your first post, try U8glib with the constructors
Code: [Select]
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK); 
or
Code: [Select]
U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NO_ACK);
or
Code: [Select]
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); 
or
Code: [Select]
U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE);

Oliver


Grumpy_Mike

Quote
At least my own OLED does not require pull up resistors


See this for why you always need a pull up resistor:-

http://www.dsscircuits.com/index.php/articles/47-effects-of-varying-i2c-pull-up-resistors

vgtlcs

Thanks guys - for all your help and suggestions: it will take me a bit of time to check it all out and try your various suggestions.

Re the need whether or not to use a pullup resistor with this OLED - seems like what I have seen written is pretty evenly divided between pros & cons BUT who is correct???? And what/how does the internal resistors in Uno & Mega 2560 get used - do you have to include specific code in your sketch to activate them or are they automatically activated? There si a lot of differing opinion on both Arduino and Adafruit (+ other) forums on this very issue - is it possible both views are correct?

Cheers, Ian

olikraus

Hi All

Of course pull up resistors are mandatory for I2C, however it is not clear whether they are included on the OLED module or not. Yet, your pictures did prove, that you are able to transfer some usefull data to your OLED. So, pullups are not required in your specific case. This also aligns with my own experience, that such kind of OLED modules often do not need pullup resistors.

Still my suggestion is to give a try to u8glib with the setup of your picture. All the example sketches include the constructors, and checking the options will be as simple as uncommenting exactly one of the constructors in the examples of U8glib.

The "GraphicsTest" example looks like this in line 89:
Code: [Select]

//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SSD1306_128X64 u8g(4, 5, 6, 7); // SW SPI Com: SCK = 4, MOSI = 5, CS = 6, A0 = 7 (new white HalTec OLED)
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // I2C / TWI
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send ACK
//U8GLIB_SSD1306_ADAFRUIT_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SSD1306_ADAFRUIT_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // I2C / TWI
//U8GLIB_SH1106_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SH1106_128X64 u8g(4, 5, 6, 7); // SW SPI Com: SCK = 4, MOSI = 5, CS = 6, A0 = 7 (new blue HalTec OLED)
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE); // I2C / TWI
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send ACK


Uncomment this line:
Code: [Select]
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE); // I2C / TWI

Compile and upload the example. Will this work? I am very confident it will.

The problem here is not the Adafruit and not the OLED Display. It is the combination of both. I can not promise, that u8glib will work, but i did work together with a lot arduino users and i received a lot of feedback about successful installations.

Moreover, i sometimes order "strange" OLEDs from far east, just to make it work with U8glib. Of course you do not need to use u8glib (it might appear to be strange by itself), but at least you would know the exact controller type: SSD1306 or SH1106. Please also note, that the displays often are offered as SSD1306, although they contain a SH1106.

Oliver




Grumpy_Mike

Quote
seems like what I have seen written is pretty evenly divided between pros & cons BUT who is correct?

Did you not read that link I posted?

Yes the I2C always needs pull up resistors. On the Arduino these are provided by the internal pull up resistors that are automatically enabled using the wire library. The debate is if the 35K pull up resistors are sufficient.

Anyone who has looked at the signals with an oscilloscope will tell you yes. It might actually work without them but that is not to say they are not needed.
The fact that it can actually works is absolutely no proof at all, something that non engineers find hard to understand. But that is the truth.


vgtlcs

Hi Oliver - I finally got around to trying out your u8glib code suggestions and you are correct, either of the following SH1106 constructor code lines works with my 1.3" I2C 128x64 OLED (4 pins; Vcc, GND, SCL, SDA) - that is up to a certain point, see below:
U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NO_ACK);   // Display which does not send ACK
Or
U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE);   // I2C / TWI

However, when I run your "Menu" and "Colour" programs nothing seems to happen, that is I get the four menu items printed to the OLED in the former case and just the "Hello World" in the latter?
There are no instructions or explanations on how to drive either of these programs in their respective codes and I don't mean to be disrespectful at all in this manner, but I find the u8glib code not to be intuitive and rather hard to follow compared to say standard Arduino code?

Clearly my novice status in this highly complex area of programming and all of its "different" variants is having a big impact on my lack of clear understanding of just what to do here!
I have played around with the Arduino serial monitor in trying to communicate with these two programs but whatever I enter, e.g., alphas / numerals / hex from what I see from within the code itself should be entered, does not get any response.

So, how do I communicate with these two (or any other of the u8glib libraries for that matter) programs in using the serial monitor? Really appreciate your continued help in elucidating what for me is a "brick wall" at this point in using these particular programs!

In all of my digging into various websites I have located the Datasheet and Specification Manual for the SH1106 Driver for my OLED and have attached them to this post for all who might be interested.

These two documents have to be the very best Chinese to English translations for technical documents I have ever seen and there is a wealth of information contained in them which is clearly well over and above standard Datasheets info! For instance, it shows you how to select the other protocols that this OLED can utilize if you want to run the OLED under SPI etc, etc., rather than I2C! Additionally, the Spec manual not only shows you which chip locations are to be addressed and what values are to be used but it also includes sample (Arduino??) code for this, as well. Directly programming the control chip is a bit out of my league at that moment!!!

The SH1106 Manual clearly states that Pull-up resistors are definitely required for this OLED but there is ambiguity on just what is the correct(?) value to be used. One other site I visited has investigated this in depth and has determined that 4K7 ohms is the "best value for this pull-up resistor" and that is what I have used - refer the attached pics. The chip actually has 132x64 resolution capability but the display is set inside this to 128x64.

The chip handling section towards the end of the Spec Manual also includes information on what not to clean your OLED with, which in the absence of knowing you might otherwise use and create problems for your chip or OLED!!!

As good as these translations are there are still the odd few examples of wrong words appearing - one very humorous one was; "if your OLED gets 'dewed' [meaning wet!], it will corrode the pins ………"

All in all, the contained info will provide a lot of help for a great many of the forum users who use this type of chip/OLED!

One final question is, I have noted that various 0.96" and 1.3" monochrome OLED LCDs have either a green tag (as in my case) or a red tag on them when purchased - what is the significance of these coloured tags as I have not been able to find any reference to them???
Cheers, Ian 

olikraus

I might be wrong, but i think your questions are not directly related to this thread. So it might be better to start a new thread for your questions.

I tried to locatz your questions, this seems to be the first:
Quote
So, how do I communicate with these two (or any other of the u8glib libraries for that matter) programs in using the serial monitor?

I do not understand the question and perhaps you should be more specific and describe (in a new thread) what you intend to do. Then helping would be better. The actual answer would be (according to my understanding of your question): You need to write a program.

Second question seemst to be:
Quote
what is the significance of these coloured tags as I have not been able to find any reference to them???

What is a coloured tag?

Oliver

vgtlcs

Oliver I don't understand what "you don't understand" from my latest post - I have been very explicit?
1. My latest post is totally pertinent to my original OLED I2C Faulty(??) post - that is why I continued on from the original rather than start a new thread. It's all about getting this particular OLED working properly!
2. I understood from your earlier comments to me that you actually wrote this particular u8glib code yourself - perhaps I am mistaken?
3. If 2., is correct then I would have thought you would have fully understood that the "Menu" and "Colour" programs I referred to were examples that appear within the u8glib Library examples when you include this library in a sketch?
4. What I am trying to do is to see what the "Menu" & "Colour" programs actually do and how you can manipulate them, eg., how you select the different menu items in the case of the "Menu List" examples [Look at my attached JPEG - it clearly shows the Menu list I am talking about].
5. Do you select each list item by entering "something" in the serial monitor when running this program???
6. I am interesting in using a similar Menu Selection program in another program I am writing BUT before I can do this I have to know how this "Menu Selection process" works first and how you select the different menu irems - which it seemingly does not presently do in this particular u8glib code example????
7. The green tags [stick on labels attached to the OLED display - which is clearly visible in my attached jpegs] come from the suppliers of the various OLEDs when the OLEDs are purchased! I have also seen red tags as well on OLEDs when looking at different sellers web sites? These coloured labels are exceedingly common and have appeared on ALL OLEDs I have look at thus far, so I am totally surprised that you don't understand what I am talking about?
8. Have you actually looked at my pictures I attached to my last post??? 

Hopefully I have clarified what it is you don't understand in my questions?
If not then I give up as I must be speaking Swahili!
Cheers, Ian


olikraus


Oliver I don't understand what "you don't understand" from my latest post - I have been very explicit?
1. My latest post is totally pertinent to my original OLED I2C Faulty(??) post - that is why I continued on from the original rather than start a new thread. It's all about getting this particular OLED working properly!

Oh, my mistake, i have not seen that you are the OP.


2. I understood from your earlier comments to me that you actually wrote this particular u8glib code yourself - perhaps I am mistaken?

Correct, i am the author of u8glib.


3. If 2., is correct then I would have thought you would have fully understood that the "Menu" and "Colour" programs I referred to were examples that appear within the u8glib Library examples when you include this library in a sketch?
4. What I am trying to do is to see what the "Menu" & "Colour" programs actually do and how you can manipulate them, eg., how you select the different menu items in the case of the "Menu List" examples [Look at my attached JPEG - it clearly shows the Menu list I am talking about].
5. Do you select each list item by entering "something" in the serial monitor when running this program???

ok, this is more clearer now to me. Maybe a better question would have been "How do i modify the cursor in the menu example of u8glib?".
But the answer is easy: Attach one or more buttons to the ports of your Arduino Board. The buttons should connect the port with GND.
The actual port numbers must be provided here:
Code: [Select]
uint8_t uiKeyPrev = 7;
uint8_t uiKeyNext = 3;



6. I am interesting in using a similar Menu Selection program in another program I am writing BUT before I can do this I have to know how this "Menu Selection process" works first and how you select the different menu irems - which it seemingly does not presently do in this particular u8glib code example????

The menu selection process is just an example. I would say, it has nothing to do with u8glib itself. U8glib just draws something on the display. U8glib is NOT a user interface library (like m2tklib). In the menu example, the serial object is not used at all, so i was confused about your question. Moreover, the menu example reads and reacts on port levels as you can see by looking at the code.



7. The green tags [stick on labels attached to the OLED display - which is clearly visible in my attached jpegs] come from the suppliers of the various OLEDs when the OLEDs are purchased! I have also seen red tags as well on OLEDs when looking at different sellers web sites? These coloured labels are exceedingly common and have appeared on ALL OLEDs I have look at thus far, so I am totally surprised that you don't understand what I am talking about?

I am a software programmer and electronics freak. Why they display vendor attac hes thes tags? How do i know this? I guess i am the wrong person to answer this. In fact i never cared about these tags. Maybe they include an RFID chip which allows easy identification during the manufactoring process. Or it is for a better and easier handling of the user or the person who assembles this display? I had a similar tag on the display of my smartphone, which i purchased recently. What could have been its purpose???


8. Have you actually looked at my pictures I attached to my last post??? 

I never read posts, i never try to understand them and i never look at any picture.  ;)


Hopefully I have clarified what it is you don't understand in my questions?
If not then I give up as I must be speaking Swahili!
Cheers, Ian

Yes, thanks, this reply was more clearer to me.

Oliver

Go Up