NHD‐1.5‐128128UGC3 OLED ordered from Mouser
Hello I bought the Oled display from mouser. It is on the way. The part number is NHD‐1.5‐128128UGC3 link is http://www.mouser.com/ProductDetail/Newhaven-Display/NHD-15-128128UGC3/?qs=sGAEpiMZZMvHnN%252b%2fGH9WnRoJMEv7X8ZRc2IqbjW%2fbEY%3d there are 20 pins and i do not know which one to use for the arduino. or Which library to use for arduino can someone please help me?
Joseph
-
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/sn74lvc4245a0 -
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?0 -
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.0 -
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
0 -
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.0 -
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.
0 -
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 itself?
0 -
As for the commands such as Display Off you would want to use the display mode command, if you look at the controller datasheet https://newhavendisplay.com/content/app_notes/SSD1351.pdf 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.0 -
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.0 -
i was doing it wrong it is OLED_Command_128128RGB(0xAE); // Display OFF thank you.
0 -
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.
0 -
Hello thank you.
0
Please sign in to leave a comment.
Comments
42 comments