NHD0420CW-A*3 tHREE LINE MODE, MIDDLE LINE DOUBLE HEIGHT

Comments

3 comments

  • Dandy

    I have a similar requirement - I wanted the top line double height and the bottom two lines normal.  I got that to work, after a fashion, but there is a gap between the top half of the double-height characters, and the bottom half. Looking at the display, it does look like the OLED is arranged as 4 rows of 20 characters, with gaps between.  So the double-height characters will ALWAYS have a gap in the middle like a black belt.  This would be true of your requirement too.  I think the display is a 4x20 whether that's what you want or not!

    Any comments from anyone?

    0
  • Paul_B

    Hello,

    Our Slim OLED character displays are available in 2x16, 2x20, and 4x20 character formats.

    When you send the Double Height command you are doubling the size of the text. i.e Combining the rows (see picture attached).


    I recommend looking at our Graphic OLED displays if a standard character display will not fit your requirements:
    https://newhavendisplay.com/oled-displays/graphic-oled-displays/ 


    Hope this helps!


    [attachment deleted by admin]

    0
  • Paul_B

    Finally, please see the example Double Height Arduino Sketch below, before proceeding download NHD's US2066 Arduino Library and place the Sketch in the example folder:

    https://github.com/NewhavenDisplay/NHD_US2066

    //---------------------------------------------------------
    /*

    DoubleHeight.ino

    Program for writing to Newhaven Display Slim OLEDs based on US2066 controller.

    Pick one up today in the Newhaven Display shop!
    ------> http://www.newhavendisplay.com/oled-slim-character-oleds-c-119_825.html

    This code is written for the Arduino Mega.

    Copyright (c) 2015 - Newhaven Display International, Inc.

    Newhaven Display invests time and resources providing this open source code,
    please support Newhaven Display by purchasing products from Newhaven Display!

    */
    //---------------------------------------------------------

    #include <SPI.h>
    #include <Arduino.h>
    #include <Wire.h>
    #include <avr\io.h>

    #include "NHD_US2066.h"
    unsigned char text1[]   = {"Newhaven Display    "};
    unsigned char text2[]   = {"International       "};
    unsigned char text3[]   = {"123456789           "};
    unsigned char text4[]   = {"ABCDEFGHI           "};

    unsigned char text5[]   = {"New Slim Profile    "};
    unsigned char text6[]   = {"2 or 4 Lines        "};
    unsigned char text7[]   = {"16 or 20 CHAR       "};
    unsigned char text8[]   = {"OLED Modules        "};


    unsigned char text9[]   = {"2.8V or 5V Power    "};
    unsigned char text10[]  = {"Built-in Reg        "};
    unsigned char text11[]  = {"Parallel or         "};
    unsigned char text12[]  = {"Serial Interface    "};
    unsigned char text13[]  = {"3 Font Tables       "};
    unsigned char text14[]  = {"===================="};
    unsigned char text15[]   ={"***   Built-in   ***"};
    unsigned char text16[]  = {"--------------------"};



    void output()
    {
    int i;
           
            command(0x2E);
            command(0x1C);
            command(0x2C);
           
            command(0x01);
            delay(5);
            for(i=0;i<20;i++){
              data(text1[i]);
            }
            delay(5);
           
            command(0xC0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
            delay(5);
           
            command(0xA0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
           
            delay(7000);
           
            command(0x01);
            delay(5);
            for(i=0;i<20;i++){
              data(text3[i]);
            }
            delay(5);
           
            command(0xC0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
            delay(5);
           
            command(0xA0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
           
            delay(7000);
           
            command(0x01);
            delay(5);
            for(i=0;i<20;i++){
              data(text5[i]);
            }
           
            command(0xC0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
            delay(5);
           
            command(0xA0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
           
            delay(7000);
           
            command(0x28);
            delay(5);
           
            command(0x01);
            delay(5);
            for(i=0;i<20;i++){
              data(text6[i]);
            }
            delay(5);
           
            command(0xA0);
            delay(5);
            for(i=0;i<20;i++){
              data(text7[i]);
            }
            delay(5);
           
            command(0xC0);
            delay(5);
            for(i=0;i<20;i++){
              data(text16[i]);
            }
           
            command(0xE0);
            delay(5);
            for(i=0;i<20;i++){
              data(text16[i]);
            }
           
            delay(7000);

            command(0x01);
            delay(5);
            for(i=0;i<20;i++){
              data(text9[i]);
            }
            delay(5);
           
            command(0xA0);
            delay(5);
            for(i=0;i<20;i++){
              data(text10[i]);
            }
            delay(5);
           
            command(0xC0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
            delay(5);
           
            command(0xE0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
           
            delay(7000);
           
            command(0x01);
            delay(5);
            for(i=0;i<20;i++){
              data(text11[i]);
            }
            delay(5);
           
            command(0xA0);
            delay(5);
            for(i=0;i<20;i++){
              data(text12[i]);
            }
            delay(5);
           
            command(0xC0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
            delay(5);
           
            command(0xE0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
           
            delay(7000);
           
            command(0x01);
            delay(5);
            for(i=0;i<20;i++){
              data(text13[i]);
            }
            delay(5);
           
            command(0xA0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
            delay(5);
           
           
            command(0x2E);
            command(0x10);
            command(0x2C);
           
         
            command(0xC0);
            delay(5);
            for(i=0;i<20;i++){
              data(text15[i]);
            }
            delay(5);
           
            command(0xE0);
            delay(5);
            for(i=0;i<20;i++){
              data(text14[i]);
            }
       
             delay(7000);
             
    }


    void blocks()
    {
    int i;

            command(0x01);
            delay(5);

            for(i=0;i<20;i++){
              data(0x1F);
            }

            command(0xA0);
            for(i=0;i<20;i++){
              data(0x1F);
            }
    }

    void setup()
    {
    init_oled();
    }

    void loop()

      while(1)
      {
        output();
        //blocks();
        delay(2000);
      }
    }
    0

Please sign in to leave a comment.