Recent Posts

Pages: [1] 2 3 ... 10
OLEDs / Re: NHD-0420CW-AB3-ND Display variables
« Last post by DataL on January 18, 2018, 06:41:38 AM »
For anybody trying to solve this issue in the future:

Code: [Select]
// global variables
char textbuffer[21];         // 20 characters plus the end marker
const int value1Pin = A0;    // sensor 1 input
int Value1;                  // sensor 1 value

void output(void);
   Value1 = analogRead(value1Pin);      // Capture the value of the pin
   snprintf (textbuffer1, 21, "Value 1 =  %d   ", Value1);  // Where "Value 1 = " may be any text, and %d means insert the variable after the comma (Value 1)

   r= 0;                                    // For line 1 only ("1" for line 2, "2" for 3 etc)
      command(new_line[r]);                 // Moves the cursor to the first column of that line
      for (c=0; c<COLUMN_N; c++)  {         // One character at a time,
        data(textbuffer1[c]);  }            // Displays the corresponding string

If you want to place two values per line or add a unit like "C" or "PSI" after the value, and don't want the second string dancing around as the first changes in size (eg; "99" to "100"):

Code: [Select]
// Not forgetting these:
const int value2Pin = A1;    // sensor 2 input
int Value2;                  // sensor 2 value

void output(void);
   Value2 = analogRead(value2Pin);                          // Capture the value of the pin
   snprintf (textbuffer1, 21, "Val1= %d   ", Value1);       // As above
   snprintf (textbuffer1+10, 21-10, "Val2= %d   ", Value2); // Where textbuffer1+10 starts this addition to the buffer at character 11, 21-10 means it only adds 11 characters from this position.

With many thanks for the good folk on
OLEDs / Re: NHD-0420DZW-AY5 to replace NHD-0420DZ-FSW-FBW
« Last post by BenFR30 on January 18, 2018, 04:30:00 AM »

Thank you for your feedback,
I have an external supply, so i have enough poower.

I'm now trying to improve delay.
Thank you for your help.
OLEDs / Antialiasing on NHD-2.23-12832UCW3
« Last post by Jean-Daniel Gasser on January 17, 2018, 08:48:58 AM »
The picture illustrating the display NHD-2.23-12832UCW3 in your product list shows chars displayed with anti aliasing, is it really possible to do that on this kind of display ?

Is it possible to set the brightness of a single pixel ?

Thank you in advance for your answer.


J-D Gasser
OLEDs / Re: NHD-0420DZW-AY5 to replace NHD-0420DZ-FSW-FBW
« Last post by Saurabh_B on January 17, 2018, 08:18:15 AM »
The display should be compatible for the most part, however a few minor adjustments for the firmware might be necessary.
The instruction execution time for the Oled is a fair amount slower so you might need to add a few delays or check for the busy flag before sending consecutive instructions.

The OLED does also require a larger current input through the +5V (VDD) Input as well, can you check to see if you are limited as to how much current you would be able to supply?
OLEDs / Re: NHD-0216MW-SB3 Font width question
« Last post by Geof Potter on January 16, 2018, 01:32:22 PM »
YES !!!  Your suggestion did indeed solve my problem.
Thanks for the help and for the link. I had not seen that version of initialization routine.

OLEDs / NHD-0420DZW-AY5 to replace NHD-0420DZ-FSW-FBW
« Last post by BenFR30 on January 16, 2018, 08:03:09 AM »

We developp few years ago a board to command a LCD character display (4x20), NHD-0420DZ-FSW-FBW.
It works perfectly.
After some researches, I found NHD-0420DZW-AY5, the OLED characters display.
In the datasheet we can see that is compatible with LCD display, but, when i replace my LCD display with the OLED display, it doesn't work.

Is it this OLED display 100% compatible to replace LCD display, with no firmware modification ?

That is the point i'm searching for.

Many thanks in advance for your feedback, I am stuck :(
OLEDs / Re: NHD-0216MW-SB3 Font width question
« Last post by Saurabh_B on January 15, 2018, 02:22:49 PM »
What you're describing could be caused by how the segments are mapped.

Example Code:

The initialization function, we have the command that sets the SEG Pins Hardware configuration in the middle.
Can you possibly try using 0x00 or 0x10 for the 2nd portion. This remaps the segments so that the full character appears on the same character area.
OLEDs / NHD-0216MW-SB3 Font width question
« Last post by Geof Potter on January 14, 2018, 12:31:17 AM »
We are using an NHD-0216MW-SB3 in a control system for VLF receivers.
I have an apparently working prototype of the control board with all necessary functions of the OLED display operating.
However, the font width comes up as 3 dots instead of 5 (or 6) making the characters unreadable.
DDRAM addresses map onto the display in a repeating manner, i.e. address 0x00, 0x01, etc appear in two locations on the panel.
Since I have multiple modules behaving exactly the same way, I'm assuming the problem is my programming....not the displays.
Any suggestions about the cause of the font width issue, in particular will be appreciated.

OLEDs / Re: NHD-0420CW-AB3-ND Display variables
« Last post by DataL on January 13, 2018, 04:05:57 PM »
Hi Homerjay,

Did you find a solution to your question?

I have found myself in exactly the same boat. It's a steep learning curve!

I haven't tried I2C just yet.
OLEDs / NHD-0420CW-Ax3 Scrolling Text - intended usage?
« Last post by avsa242 on January 13, 2018, 01:28:45 PM »
Hi everyone,

I'm trying to implement the text scrolling functionality of this display/controller in my driver and I have it basically working, but I'm having difficulty determining if I'm really using it correctly.

First, before I started implementing it, I got the impression the number of pixels to scroll was relative, i.e., if I kept issuing a command to scroll 1 pixel, that it would keep scrolling by one more pixel every time, however, it seems that the number of pixels to scroll is an absolute value, i.e., it would shift the display by 1 pixel the same location every time, or if 48 pixels, it'd be the same location every time. I hope this isn't too difficult to understand, but does this sound correct?

Secondly, if I do have the basic understanding correct, then would someone be able to suggest a short example, even pseudocode? Here's a snippet I have right now:
Code: [Select]
    repeat i from 48 to 0
      oled.SetScrollQty (i)
      oled.Position (0, 0)
      oled.Str (string("Scrolling"))
      time.MSleep (30)


    repeat i from 48 to 0
      oled.SetScrollQty (i)
      oled.Position (10, 0)
      oled.Str (string("Scrolling"))
      time.MSleep (30)

This is written in SPIN. repeat used here would be equivalent to a "for (i=0; i < 49; i++)"-loop (and another in the opposite direction) in C. The rest I think should be pretty self-explanatory, except I'll mention that oled.SetScrollQty pokes the us2066 Set Scroll Quantity register (0x80). So the bytes that go out are (0x80 | i). The string "Scrolling" does scroll across the display using this code, but because there is only a maximum of 48 pixels scroll, I have to change the DDRAM address (oled.Position) after the first loop and repeat the process, in order to make it appear that the string is smoothly scrolling across the whole display. This is really where I'm asking for help, and to re-iterate, if I'm even using the functionality the way it's intended (if not, please let me know - I'd rather implement it the way it's intended to be used, at least at first).

Lastly, I'll add I'm currently doing this with double height text disabled, though I've tried it with it enabled as well, with the same results.

Thanks very much!
Pages: [1] 2 3 ... 10