Author Topic: Mouser Oled  (Read 12596 times)

josephchrzempiec

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
    • View Profile
Re: Mouser Oled
« Reply #30 on: July 17, 2015, 12:37:10 PM »
I have a Arduino pro mini it's also 5v but I still run it on 3.3v all the time.

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: Mouser Oled
« Reply #31 on: July 17, 2015, 01:19:35 PM »
The display you are trying to use is a 3.3V display.  It requires 3.3V for VDD and logic to function properly.  The Arduino Uno is a 5V MCU board.  Yes, there is a 3.3V pin on the board, however all other logic signals on the board are TTL (0V / 5V).  So as you may be connecting the display's VDD signal to the Arduino's 3.3V pin, every other display pin you connect will receive 5V, which is over the maximum specified voltage allowed for the display, as indicated in the datasheet.  Therefore, to use this color OLED, you need a 3.3V MCU, or a modification to the Arduino Uno to make it provide 3.3V logic, hence the previous voltage regulator replacement option.  Another way is to use a level shifter IC between the Arduino and the display.

The pin connections are shown in the example code.  Please also note this example code is just a reference, and does not imply this display must be used with an Arduino Uno.  We have chose to release example code for the Arduino Uno simply because it is a low cost, easy to use, MCU board that is very popular for projects and prototyping.  If you have used any other MCU platforms (preferably 3.3V MCUs), you may use this display with it, and port the C code accordingly.

The Arduino Pro Mini 5V board still has the same issue of not being a 3.3V MCU.  It will send TTL signals (5V) on all of the data and control lines of the display.  I believe there is a version of the Arduino Pro Mini that is 3.3V, so if you have or can obtain one of those, that would be recommended.

To get the display to work with your Arduino Uno, you need to either:

1)  replace the voltage regulator on the Arduino Uno with a 3.3V regualtor (such as an LM1117/AME1117/AP1117), and when powering the Arduino + display, you must use the DC jack power input, not the USB.

or

2)  use a level shifter IC.  Here are the level shifters used for this particular program example:
     http://www.ti.com/product/sn74lvc4245a

josephchrzempiec

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
    • View Profile
Re: Mouser Oled
« Reply #32 on: July 17, 2015, 01:54:52 PM »
hello Michael_L thank you. yeah i know i hope its not killed off the oled being that high on the logic i do some place have a 74HC4050  level shifter not sure where i can do it with resistors but it might take a lot. i think i got the pinout correct now one thing in the example code i was unsure of is that


#define   BS1_PIN   A0    // BS1 signal connected to pin A0
#define   BS0_PIN   A1    // BS0 signal connected to pin A1
#define   LVL_DIR   A2    // DIR (direction control) signal of level shifter IC connected to pin A2
#define   LVL_OEN   A3    // /OE (output enable) signal of level shifter IC connected to pin A3


i know the Bs1 and Bs0 are on the display but the DIR and OE N i don't see that on the display wiring part not sure what pins are they are on the lcd  wasn't sure what they are for or where they go to?

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 363
  • Karma: 10
    • View Profile
Re: Mouser Oled
« Reply #33 on: July 17, 2015, 02:14:44 PM »
Those pins are not on the display correct, they're pins that should be on the Level Shifter.

If you take a look at page 3 of the DATASHEET , Michael linked you to, you will find those pins.

The DIR pin controls the direction of shift, whether the signals go from Port A to B or B to A.

The /OE is an Active Low output enable signal. Again both of these pins are on the level shifter.

josephchrzempiec

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
    • View Profile
Re: Mouser Oled
« Reply #34 on: July 17, 2015, 11:24:10 PM »
I been actually going about this the wrong way. I have a arduino zero it's new not used it much but it does have a 3.3v logic and 3.3v wondering if that will work? it's still new to me this board.  https://www.arduino.cc/en/Main/ArduinoBoardZero
« Last Edit: July 17, 2015, 11:27:57 PM by josephchrzempiec »

josephchrzempiec

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
    • View Profile
Re: Mouser Oled
« Reply #35 on: July 18, 2015, 01:16:29 AM »
okay i try to compile it with the zero board i got and i get this error

Arduino: 1.7.6 (Windows 7), Board: "Arduino M0"
Build options changed, rebuilding all
sketch_jul18a.ino: In function 'void OLED_Command_128128RGB(unsigned char)':
sketch_jul18a.ino:402:17: error: 'PORTD' was not declared in this scope
sketch_jul18a.ino: In function 'void OLED_Data_128128RGB(unsigned char)':
sketch_jul18a.ino:445:17: error: 'PORTD' was not declared in this scope
sketch_jul18a.ino: In function 'void setup()':
sketch_jul18a.ino:1119:4: error: 'DDRD' was not declared in this scope
sketch_jul18a.ino:1147:8: error: 'PORTD' was not declared in this scope
Error compiling.
This report would have more information with
 "Show verbose output during compilation"
 enabled in File > Preferences.


josephchrzempiec

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
    • View Profile
Re: Mouser Oled
« Reply #36 on: July 18, 2015, 09:37:28 AM »
I'm guessing it's part of the atmega family avr and trying to use it on a 32bit family totally different and I'm not a good programmer to know what's wrong I'm good at hardware but not software.

josephchrzempiec

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
    • View Profile
Re: Mouser Oled
« Reply #37 on: July 19, 2015, 01:43:55 AM »
Hello with a little work and luck i mange to get the Oled to work now was wondering about a couple of things. How do i get the Display to turn off command or brightness command? second thing is how can i display text instead of using hex characters I'm not use to them and just would like to use text it's self?

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 363
  • Karma: 10
    • View Profile
Re: Mouser Oled
« Reply #38 on: July 20, 2015, 08:27:49 AM »
As for the commands such as Display Off you would want to use the display mode command, if you look at the Controller Datasheet on page 43 it shows you how the different display modes will work depending on what command you send to the display.

With the text, there is no built in font tables or text saved on the controller. If you look at the example code given, it does have a font table that was previously created. You would have to use another set of commands to display that text. You would also need to send the X and Y positions you want the text to appear. And if you're using the same codes you need to specify the text color and background color as well to ensure it works. For the regular sized text the OLED_Text_128128RGB command will work on showing the text. (Each character will be 5 pixels wide, and 8 pixels tall). If you want the larger text, use the OLED_Text2x_128128RGB command.

josephchrzempiec

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
    • View Profile
Re: Mouser Oled
« Reply #39 on: July 20, 2015, 08:40:34 AM »
in the void OLED_Init_128128RGB(void)    i have


   OLED_Command_128128RGB(0xA4h); // Display Off


i get this error



_1.5oled_V3.ino:500:28: error: invalid suffix "xGS0" on integer constant
_1.5oled_V3.ino: In function 'void OLED_Init_128128RGB()':
_1.5oled_V3.ino:498:26: error: 'Ax4h' was not declared in this scope
Error compiling.


what am i doing wrong? is it in the wrong place or did i write it wrong? this is from your example code.

josephchrzempiec

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
    • View Profile
Re: Mouser Oled
« Reply #40 on: July 20, 2015, 08:52:18 AM »
i was doing it wrong it is    OLED_Command_128128RGB(0xAE); // Display OFF thank you.

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 363
  • Karma: 10
    • View Profile
Re: Mouser Oled
« Reply #41 on: July 20, 2015, 09:26:45 AM »
When sending a byte of data using hex, you should only be sending in (0x00) to (0xFF) to denote that the value is in hex, leave off the h at the end.

josephchrzempiec

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
    • View Profile
Re: Mouser Oled
« Reply #42 on: July 20, 2015, 10:23:57 AM »
Hello thank you.

 

16x2 OLED NHD-0216KZW-AY5 Intermittent, and perament vertical dots Brightness

Started by BenB2013Board OLEDs

Replies: 4
Views: 4872
Last post October 23, 2014, 04:55:27 PM
by BenB2013
Display current of 128x64 yellow OLED (2.7-12864UMY3) really 175mA?

Started by flywheelBoard OLEDs

Replies: 1
Views: 3548
Last post June 30, 2014, 04:48:12 PM
by Michael_L
Wiring between NHD-1.5128128ASC3ND OLED Display and NHDev 2.10 Development Board

Started by vcp88Board OLEDs

Replies: 1
Views: 2249
Last post June 07, 2016, 08:20:38 AM
by Saurabh_B
NHD-0420DZW-AG5 OLED character module--Displaying junk data

Started by control3Board OLEDs

Replies: 2
Views: 1319
Last post December 11, 2016, 11:19:54 PM
by control3
Korean Hex GB code for OLED multi font display NHD-2.7-12864UMY3

Started by newhavenuserBoard OLEDs

Replies: 0
Views: 797
Last post May 05, 2017, 01:17:45 PM
by newhavenuser