Closed GoogleCodeExporter closed 9 years ago
Additionally: U8GLIB_NHD31OLED_2X_GR is not working correctly
device wiki page: "The U8GLIB_NHD31OLED_2X_GR never work for this screen
properly.In that mode, only half of the screen is working and half of the
horizontal lines are active."
ToDo
- review U8GLIB_NHD31OLED_2X_GR
- document U8GLIB_NHD31OLED_GR
Original comment by olikr...@gmail.com
on 19 Oct 2013 at 4:02
The library seems extremely slow with this display. I'm using an Arduino Mega
2560, the display lags and takes several seconds to catch up when attempting to
display character changes coming in from the serial port at only 5 a second.
Original comment by ccrane...@gmail.com
on 23 Oct 2013 at 2:17
@All: Main problem is, that i do not own such a display. I can not test the
code. This is also the reason why this device is not officially part of the
documentation.
Now i see that major testing and optimization might be required on this.
Personal Note:
Two different users involved: ccrane148 (see above) and hpvideo11 (device wiki)
Original comment by olikr...@gmail.com
on 23 Oct 2013 at 3:00
I will send you mine to test with or purchase one and have it shipped to you if
you like. I sent an email in regard to it. Thanks.
Original comment by ccrane...@gmail.com
on 23 Oct 2013 at 3:37
fixed byte cnt calculation in u8g_dev_ssd1322_nhd31oled_gr.c
Original comment by olikr...@gmail.com
on 23 Oct 2013 at 9:08
Hi Oliver, add my voice. Playing with a NHD31OLED and if I run it on the
"native" SPI pins 31, 11,10,9 on an Arduino or if I move SPI to A5, A4, A3, A2
the speed at which the display updates is very slow. You can actually see
characters "painting" on to the display from top to bottom. The arrangement is
to have it perform in a similar fashion to a 20X4 LCD display. Could the font
libraries decoding what is essentially ASCII in to display be slowing the whole
works down? Crude graphic attached. I have been working on the same project
Casey is working on.
Original comment by wb2...@gmail.com
on 25 Oct 2013 at 1:04
Attachments:
For SW SPI (all four or five pins assigned) the speed might be indeed very slow
(depending on the controller). Usually it is better to use HW SPI here. Did you
check HW SPI?
Original comment by olikr...@gmail.com
on 25 Oct 2013 at 6:25
Well here's where I'm really having a mental block. How do I change to HW SPI
in Arduino? Is it as simple as just using 13, 11, 10, 9? When I changed to use
A5, A4, A3, A2 did I then move to SW SPI by simply NOT using 13, 12, 11, 10, 9?
I'm just not certain about how to change from HW to SW SPI. Thanks, Oliver.
GeorgeC
Original comment by wb2...@gmail.com
on 25 Oct 2013 at 1:23
If a constructor has 4 or 5 argumens, SW SPI is used:
U8GLIB_NHD31OLED_GR(sck, mosi, cs, a0 [, reset])
Whith 2 or 3 arguments, HW SPI is selected:
U8GLIB_NHD31OLED_GR(cs, a0 [, reset])
See the table here: http://code.google.com/p/u8glib/wiki/device
Original comment by olikr...@gmail.com
on 25 Oct 2013 at 1:37
Thanks George for asking about that, I was too chicken to ask myself hah... I
have it working via hardware SPI now and it is definitely faster when testing
with the serial data simulator program. I will test with the device next.
Thanks Oliver for helping us with this.
Original comment by ccrane...@gmail.com
on 25 Oct 2013 at 5:11
Thanks, Oliver, one more question, though, how can I modify the constructor? Or
am I over complicating this? Is it that if there are two arguments after the
constructor "U8GLIB_NHD31OLED_GR(cs, a0 [, reset])" the arduino compiler will
make it hardware SPI but if I have 3 or 4 arguments it will compile for SW SPI?
I am looking at U8glib.h and I see it in there both ways plus parallel. I
think...
Thanks very much for clarifying this and all of your very hard work on this
stuff.
GeorgeC
Original comment by wb2...@gmail.com
on 26 Oct 2013 at 12:33
> Is it that if there are two arguments after the constructor
> "U8GLIB_NHD31OLED_GR(cs, a0 [, reset])" the arduino compiler
> will make it hardware SPI but if I have 3 or 4 arguments it
> will compile for SW SPI?
Yes, exactly. If is a feature of the C++ compiler (which is used by the Arduino
IDE) to write two different procedures (one for HW SPI and one for SW SPI), but
use the same function or constructor name with different number of arguments.
See also here: http://en.wikipedia.org/wiki/Function_overloading
Original comment by olikr...@gmail.com
on 26 Oct 2013 at 5:11
Hello.
Thank you for this library,again.
Can somebody tell me exactly how to use HW SPI please.
The U8g(10,9) only activates 2 pin's on Arduino, i did checked that with
oscilloscope,pin10 is connected it to SC(display),and pin 9 to D/C(display),the
screen was set first to 3 wire and then 4 wire serial interface, SPI mode,from
the display DATA SHEET,the screen was black on eider mode.
The 4‐wire serial interface mode needs SCLK, SDIN, D/C, CS and 3-wire SCLK,
SDIN, CS, so i cant understand,
how this display can work with only 2 control wires (10,9)
Thank you, for everything
Original comment by hpvide...@gmail.com
on 26 Oct 2013 at 6:35
[deleted comment]
What you are defining with 10 and 9 are the Chip Select and RESET. By not
including the other two it is defaulting to hardware SPI. That means you need
to hook the remaining two connections of SCLK and SDIN to the hardware linked
pins on the board. I have my MEGA2560 setup this way: U8GLIB_NHD31OLED_2X_GR
u8g(46, 48); My CS= 46 and my A0(reset)= 48 (just for ease of use of unused
pins out of the way). I then have the other two, SCLK and SDIN connected to the
middle two rows of the SPI hardware 6 pin connector (SCLK on the left most
middle pin and SDIN on the right most middle) It's confusing I know.
The nomenclature of the pins throws us new people off (A0) I started
thinking...A0 as in Analog 0? Then there is a reset pin on the board too but
that's not it either.
Original comment by ccrane...@gmail.com
on 26 Oct 2013 at 8:50
Thanks for replying.
U8GLIB_NHD31OLED_GR(cs, a0 [, reset])
1) Use the SCLK and MOSI pins of the HW SPI subsystem of your controller. The
actual pin numbers depend on controller and board.
2) Yes, there is a confusion about "a0". In the context of U8glib "a0" is
always the data/command selection line of many controllers (a digital pin). It
is often called a0 in the data sheets of the controller. In the context of
Arduino "A0" is usually the analog input pin "0".
Original comment by olikr...@gmail.com
on 26 Oct 2013 at 11:26
Yes, it's me again. I finally figured out how to connect NHD31OLED to Arduino
MEGA,
with HW SPI mode.
Wire1 OLED Pin (D/C or A0) = MEGA Pin (9) Configurable
Wire2 OLED Pin (CS) = MEGA Pin (10) Configurable
Wire3 OLED Pin (SCLK or SCK) = MEGA Pin (52)
Wire4 OLED Pin (SDIN or MOSI) = MEGA Pin (51)
This is for New People like me :)
The screen is now a lot faster then in SW SPI mode.
Thank you Oliver for this library.
Original comment by hpvide...@gmail.com
on 27 Oct 2013 at 2:44
Remember that you can use the six pin header as well for SCK and MOSI.
Another question for Oliver, please. The NHD31OLED has a 3 wire and 4 wire SPI
mode. In the 3 wire mode the connection info shows pin 14 being grounded
instead of going to pin 9 (A0). A jumper is moved on the display to enable this
mode. I have tried it and it does not want to work. Or should I, in that case,
use this:
U8GLIB_NHD31OLED_GR u8g(10); and not use (10,9)??
I think I'll try that, just thought that maybe having only one pin defined
there may make it work
GeorgeC
Original comment by wb2...@gmail.com
on 27 Oct 2013 at 2:53
OK, got that answer...no...
Original comment by wb2...@gmail.com
on 27 Oct 2013 at 2:55
The 3-Bit mode is not implemented. The implementation would require to send 9
bits (the a0 bit is just appended to the byte stream). As far as i know, the
ATMega does not support 9 Bit SPI.
Original comment by olikr...@gmail.com
on 27 Oct 2013 at 5:03
confirmation received, that the SSD1322 is working --> update documentation
Original comment by olikr...@gmail.com
on 5 Nov 2013 at 4:43
Original comment by olikr...@gmail.com
on 5 Nov 2013 at 4:45
added to device table
Original comment by olikr...@gmail.com
on 24 Jan 2014 at 7:51
Original comment by olikr...@gmail.com
on 24 Jan 2014 at 7:51
Hi Oliver, I brought a 25664 OLED with SSD1322 recently, but this screen has 16
gray level.
So, I failed to light it up.
I want to modify u8g_dev_ssd1322_nhd31oled_gr.c to change the init process, you
know, also failed.
Would you like to help me let this 4BIT GRAY LEVEL screen work?
I can send the factory's refer code to you.
Original comment by imk...@gmail.com
on 1 May 2014 at 9:42
This controller should be supported. However U8glib only support 4 of the 16
levels. So at least you should be able to use your device with 4 levels (2 bit)
gray lavels.
So the question is: Do you fail to use this display in general and would be 4
gray levels enough or do you want U8glib to support the full range of 16 levels?
Maybe we should check wiring first... Is there a datasheet of the display?
Which controller/board are you using? How did you wire the display to your
controller?
Original comment by olikr...@gmail.com
on 1 May 2014 at 9:49
Thanks you very much for reply so quickly!
The problem is I could not light up completely....... I use both SW SPI and HW
SPI, and I check the wiring again and again. but I could not get any response.
I use MEGA2560 and use ICSP pins.This is my wiring schedule.
HW SPI
+----------+----------+-------------+-------------+
| OLED Pin | OLED No. | ArduinoColor| Arduino Pin |
+----------+----------+-------------+-------------+
| GND | 1 | Black | GND |
| VBAT | 2 | Orange | 5V |
| DB0 | 4 | Yellow | SCK |
| DB1 | 5 | Green | SDIN/MOSI |
| DC | 14 | Puple | 8 |
| REST | 15 | White | REST |
| CS | 16 | Blue | 9 |
+----------+----------+-------------+-------------+
Original comment by imk...@gmail.com
on 1 May 2014 at 10:04
Attachments:
Are you sure you have an SPI variant of that display?
You did not name the actual pin numbers. For the Mega this is
SCK = 52
MOSI = 51
How does the u8glib constructor look like?
Original comment by olikr...@gmail.com
on 1 May 2014 at 11:16
the u8glib constructor is :
U8GLIB_NHD31OLED_GR u8g(9,8);
and I use the ICSP pin on the board to connect display:
SCK, MOSI, RESET, 5V and GND
Original comment by imk...@gmail.com
on 1 May 2014 at 11:25
and I change to use 51,52pin to connect the display.... no response too.
Original comment by imk...@gmail.com
on 1 May 2014 at 11:34
The reset of the display should not be connected to the reset of the
controller. These are two different kind reset lines. Instead use a normal
Arduino GPIO pin and connect this pin to the reset input of the display.
then use
U8GLIB_NHD31OLED_GR u8g(9,8,
place_here_the_reset_gpio_pin_number_for_the_display);
Original comment by olikr...@gmail.com
on 1 May 2014 at 11:36
no response too....
what ever, thanks Oliver very much.
I will ask my workmate to use other MCU Board to test this display.
Original comment by imk...@gmail.com
on 1 May 2014 at 12:06
Original issue reported on code.google.com by
olikr...@gmail.com
on 18 Oct 2013 at 5:39