Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Michael_L

Pages: 1 ... 5 6 [7] 8 9 ... 24
91
Graphic LCDs / Re: NHD-C12864LZ-FSW-FBW-3V3
« on: January 14, 2015, 09:58:59 AM »
So, with your setup and initialization, you are able to write pixel data to the display successfully?  It seems you are able to clear the screen by writing 0's, but are not able to use those particular commands.  Can you write all 1's to the display to see if you are able to turn all the pixels on that way?  Do you have another display to try those commands that aren't working for you?

92
Graphic LCDs / Re: NHD-C12864LZ-FSW-FBW-3V3
« on: January 12, 2015, 05:18:52 PM »
Can you try toggling sending commands A4 and A5 in 1 second intervals?  Do you see the pixels changing?  What about if you send A6 or A7 beforehand?

93
OLEDs / Re: OLED speed
« on: January 12, 2015, 08:44:17 AM »
The execution times listed in the datasheet are correct.  Please also note that these times are the max execution times, and are not representative of the average.  A faster way would be to use a busy flag check after a command is sent instead of using a 600us delay.

94
TFTs / Re: How do you set the SED1963 to 8080 mode?
« on: January 12, 2015, 08:44:00 AM »
You are correct, that signal is not available to the user.  The NHD‐7.0‐800480WF‐CTXI#‐T is configured for 8080 mode.

95
Character LCDs / Re: Changing the Slave Address with NHD-0420D3Z
« on: January 09, 2015, 04:30:08 PM »
The execution time for the command to change the I2C address is longer than the other commands (3ms). See the table on page 7 of the datasheet.  Please make sure you are allowing for this :)

96
TFTs / Re: NHD-1.8-128160EF-CTXI#-F has a display buffer?
« on: January 09, 2015, 04:24:55 PM »
What you speak of is a feature known as double buffering.  This means having 2 full display buffers, allowing you to show one on the screen, and write to the other "hidden" one.  Then a simple command would swap between the two buffers instantly, achieving what you desire.  There are several external TFT controllers that have this capability, but with this small TFT with built-in controller, this feature is not available.  You would either need to increase write speed, or only update parts of the screen.  Another potential optiuon would be turning off the backlight while you write to the display, then turning the backlight back on once the write is done.

97
TFTs / Re: NHD-7.0-800480EF-ATXL#-CTP dead?
« on: January 09, 2015, 04:20:13 PM »
The issue was resolved by supplying the correct signals to the display.
I confirm that it works with using DEN and inverting pixel clock. 8)
I didn't touch R4. I just provided signal DEN from CPU.
Thank you.

98
OLEDs / Re: NHD‐0420DZW‐AB5 Lines
« on: January 09, 2015, 04:18:32 PM »
It seems like you may not be addressing the lines correctly?  Take a look at the code below:

Code: [Select]
//---------------------------------------------------------
/*
NHD_0420DZW_mega.ino
Program for writing to Newhaven Display 4 x 20 Character OLED (4-bit, 6800 mode)

(c)2014 Mike LaVine - Newhaven Display International, LLC.

        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.

        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
*/
//---------------------------------------------------------

// The 4 bit data bus is connected to PORTA[3..0] of the Arduino Mega2560

int RS =  30;    // RS signal connected to digital pin 30 of Arduino Mega2560
int RW =  31;    // R/W signal connected to digital pin 31 of Arduino Mega2560
int  E =  32;    // E signal connected to digital pin 32 of Arduino Mega2560

const char text1[] = {"  Newhaven Display  "};
const char text2[] = {"   Character OLED   "};
const char text3[] = {"  4 Line x 20 Char  "};
const char text4[] = {"0123456789!@#$%^&*()"};

void toggle()
{
   digitalWrite(E, HIGH);
   delay(1);
   digitalWrite(E, LOW);
}

void command(char c)

   
   PORTA = (c>>4);
   digitalWrite(RS, LOW);
   toggle();
   //delay(10);
   PORTA = c;
   toggle();
}

void data(char d)
{
   
   PORTA = (d>>4);
   digitalWrite(RS, HIGH);
   toggle();
   //delay(10);
   PORTA = d;
   toggle();
}



void disp()
{
   int i;
   delay(50);
   command(0x02);  //Home Command  [Set DDRAM address to Line 1 position 1]
   delay(5);
   for (i=0;i<20;i++)
   {
      data(text1[i]);
   }
   command(0xC0);  //Second Line  [Set DDRAM address to Line 2 position 1]
   for (i=0;i<20;i++)
   {
      data(text2[i]);
   }
   command(0x94);  //Third Line  [Set DDRAM address to Line 3 position 1]
   for (i=0;i<20;i++)
   {
      data(text3[i]);
   }
   command(0xD4);  //Fourth Line  [Set DDRAM address to Line 4 position 1]
   for (i=0;i<20;i++)
   {
      data(text4[i]);
   }
}

void setup()
{
   //delay(200);
   
   DDRA = 0xFF;    //set PORTA (dat bus) as output
   PORTA = 0x00;   //initialize PORTA to 0x00
   DDRC = 0xFF;    //set PORTC (control lines) as output
   PORTC = 0x00;   //initialize PORTC to 0x00
   delay(5);
   toggle();
   delay(5);
   //toggle();
   //delay(5);
   //toggle();
   //delay(5);
   
   
   PORTA = 0x2;
   toggle();
   command(0x28);
   //command(0x28);
   //toggle();
   //PORTA = 0x8;
   //toggle();
   /*PORTA = 0x2;
   toggle();
   toggle();
   PORTA = 0x8;
   toggle();*/
   /*PORTA = 0x2;
   toggle();
   toggle();
   PORTA = 0x8;
   toggle();*/
   PORTA = 0x0;
   toggle();
   PORTA = 0x8;
   toggle();
   PORTA = 0x0;
   toggle();
   PORTA = 0x1;
   toggle();
   delay(5);
   PORTA = 0x0;
   toggle();
   PORTA = 0x6;
   toggle();
   PORTA = 0x0;
   toggle();
   PORTA = 0x2;
   toggle();
   PORTA = 0x0;
   toggle();
   PORTA = 0xC;
   toggle();
   delay(10);
}

void loop()

  disp();
  delay(3000);
}

Take special note of the disp() function, as it addresses each line and writes to it successfully.

99
OLEDs / Re: OLED Streaking
« on: January 09, 2015, 04:15:22 PM »
I'm sure you are probably referring to this post:
http://www.newhavendisplay.com/NHD_forum/index.php/topic,94.0.html

If not, please look through it because various commands that affect this are mentioned, along with other suggestions such as increasing refresh rate or changing the offset.  In that post I have the code posted, which does not have an associated header file.  All defines/prototypes are within that text file.  The customer that posted that never posted after I shared all of that information, so I can only assume he re-checked all of his code and hardware vs what I posted and got the display working correctly.

100
TFTs / Re: TFT 7-inch Sample Code Questions
« on: December 29, 2014, 04:33:53 PM »
Happy Holidays to you too!  After reading your post, I understand you have several questions regarding the example code for the TFT controller board we offer.  I would first like to say that this code is meant to serve as merely an example of working code to get you started.  It is in not necessarily the "best" or most optimized code, but it has been tested to work.  The code can be modified with your desired parameters that are best for your application.  As for some of your last comments, you are correct.  The commands 0x0C and 0x3A have been removed (which is why you see it in the example code unfortunately).  Leaving the lines in there still allows for the SSD1963 to work, but yes they "should" be removed for the more current chip.

101
OLEDs / Re: NHD-042ODZW-AY5 No Display
« on: December 29, 2014, 04:25:45 PM »
I understand it can be frustrating to get a display working (believe me I've been there plenty of times!), but the example code I have sent you apparently did work out for you at least some what yes?  It allowed you to show characters on the display which is a huge step in the right direction.  It sounds to me that the garbage characters you are getting are due to a timing issue with either the serial data transfer routine(s) or the execution time of a command send.  Can you introduce some delays in your serial data transfer to see if this affects what you are seeing on the display?

As for the example code, what in particular is not clear about it?  I would be happy to clarify anything in it for you if you have any questions.

Lastly, thank you for your suggestions and feedback!  They will be considered before any future design change/spec update!

102
OLEDs / Re: damage from reversed power supply?
« on: December 29, 2014, 04:13:25 PM »
Connecting VDD and VSS backwards could result in a damaged unit.  Of course this is not always the case but in answer to your question, yes it may have damaged the display.  The longer it was connected this way, the more likely it damaged it.  When you say you have confirmed the initialization with a logic analyzer, have you confirmed the values, sequence, and timing?  Are you correctly attempting to write characters to the display?  It may be beneficial for you to try another display if possible.

103
OLEDs / Re: NHD-042ODZW-AY5 No Display
« on: December 23, 2014, 12:40:53 PM »
I'm sorry but unfortunately there is not such a test mode on this display.  I have included some example code for this display used in serial mode below:

Code: [Select]
//---------------------------------------------------------
/*
NHD_0216KZW_serial_mega.ino
Program for writing to Newhaven Display 2 x 16 Character OLED (Serial mode)

(c)2014 Mike LaVine - Newhaven Display International, LLC.

        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.

        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
*/
//---------------------------------------------------------

int OLED_SCL =  30;    // SCL signal connected to digital pin 30 of Arduino Mega2560
int OLED_SDO =  31;    // SDO signal connected to digital pin 31 of Arduino Mega2560
int OLED_SDI =  32;    // SDI signal connected to digital pin 32 of Arduino Mega2560
int  OLED_CS =  33;    // /CS signal connected to digital pin 33 of Arduino Mega2560

const char text1[] = {"Newhaven Display"};
const char text2[] = {"2 x 16 Char OLED"};

void command(char c)

   unsigned char i;
   digitalWrite(OLED_CS, LOW);
   delay(2);
   digitalWrite(OLED_SCL, LOW);
   delay(2);
   digitalWrite(OLED_SDO, LOW);
   delay(2);
   digitalWrite(OLED_SCL, HIGH);
   delay(2);
   digitalWrite(OLED_SCL, LOW);
   delay(2);
   digitalWrite(OLED_SDO, LOW);
   delay(2);
   digitalWrite(OLED_SCL, HIGH);
   delay(2);
   digitalWrite(OLED_SCL, LOW);
   delay(2);
   for(i=0x80;i;i>>=1)
   {
      if((c&0x80) == 0x80)
      {
        digitalWrite(OLED_SDO, HIGH);
      }
      else
      {
        digitalWrite(OLED_SDO, LOW);
      }
      c = (c << 1);
      delay(2);
      digitalWrite(OLED_SCL, LOW);
      delay(2);
      digitalWrite(OLED_SCL, HIGH);
      delay(2);
      digitalWrite(OLED_SCL, LOW);
      delay(2);
   }
   digitalWrite(OLED_CS, HIGH);
}

void dataInit(void)
{
   digitalWrite(OLED_CS, LOW);
   delay(2);
   digitalWrite(OLED_SCL, LOW);
   delay(2);
   digitalWrite(OLED_SDO, HIGH);
   delay(2);
   //digitalWrite(OLED_SCL, LOW);
   digitalWrite(OLED_SCL, HIGH);
   delay(2);
   digitalWrite(OLED_SCL, LOW);
   delay(2);
   digitalWrite(OLED_SDO, LOW);
   
   digitalWrite(OLED_SCL, HIGH);
   delay(2);
   digitalWrite(OLED_SCL, LOW);
   delay(2);
}

void data(char d)
{
   unsigned char i;
   for(i=0x80;i;i>>=1)
   {
      if((d&0x80) == 0x80)
      {
        digitalWrite(OLED_SDO, HIGH);
      }
      else
      {
        digitalWrite(OLED_SDO, LOW);
      }
      d = (d << 1);
      delay(2);
      digitalWrite(OLED_SCL, LOW);
      delay(2);
      digitalWrite(OLED_SCL, HIGH);
      delay(2);
      digitalWrite(OLED_SCL, LOW);
      delay(2);
   }
}

void disp()
{
   int i;
   command(0x02);  //Home Command  [Set DDRAM address to Line 1 position 1]
   delay(5);
   dataInit();
   delay(2);
   for (i=0;i<16;i++)
   {
      data(text1[i]);
      delay(2);
   }
   digitalWrite(OLED_CS, HIGH);
   delay(2);
   command(0xC0);  //Second Line  [Set DDRAM address to Line 2 position 1]
   delay(2);
   dataInit();
   delay(2);
   for (i=0;i<16;i++)
   {
      data(text2[i]);
      delay(2);
   }
   digitalWrite(OLED_CS, HIGH);
   delay(2);
   /*command(0x94);  //Third Line  [Set DDRAM address to Line 3 position 1]
   for (i=0;i<20;i++)
   {
      data(text3[i]);
   }
   command(0xD4);  //Fourth Line  [Set DDRAM address to Line 4 position 1]
   for (i=0;i<20;i++)
   {
      data(text4[i]);
   }*/
}

void setup()

   pinMode(OLED_CS, OUTPUT);
   pinMode(OLED_SCL, OUTPUT);
   pinMode(OLED_SDO, OUTPUT);
   //pinMode(OLED_SDI, INPUT);
   digitalWrite(OLED_SCL, LOW);
   digitalWrite(OLED_SDO, LOW);
   
   delay(10);

   command(0x38);  //Function Set  [8-bit mode, Font Table: English/Japanese (FT[1:0] = 00)]
   delay(2);
   command(0x08);  //Display OFF
   delay(2);
   command(0x01);  //Display Clear
   delay(30);
   command(0x06);  //Entry Mode Set  [Auto increment address when a character is written]
   delay(2);
   command(0x02);  //Home Command  [Set DDRAM address to Line 1 position 1]
   delay(2);
   command(0x0C);  //Display ON
   delay(2);
}

void loop()

  disp();
  delay(10);
  //command(0x08);  //Display OFF
  //delayMicroseconds(5000);
  //command(0x0C);  //Display ON
  //delay(2);
}

This code should help you get the display working correctly.  I know it says for 2x16 OLED, but since they use the same controller it works the same.  You will notice the code writes to 4 lines.

104
New Product Wishlists / Re: Low Power LED Backlight
« on: December 23, 2014, 12:38:45 PM »
The resistor on the PCB is in place to current limit the backlight.  If you wish to use higher voltage, you may either replace this resistor with a larger value, or use an external series resistor on the line going to pin 15.  We do not have plans to come out with a version with a 0 ohm resistor there, however, if you are interested in purchasing these displays with a 0 ohm resistor we do offer custom displays and value add services.  To investigate this option further, please email nhtech@newhavendisplay.com.

105
TFTs / Re: NHD-7.0-800480EF-20 Color Modes
« on: December 19, 2014, 12:13:50 PM »
The color mode for the SSD1963 is dictated by the interface you are using.  I've included an image below of a table from page 17 of the SSD1963 datasheet that shows the different available interfaces and their corresponding color depth/pixel arrangement.  On page 78 (second attached image) the spec gives an explanation of the set_pixel_data_interface command (0xF0).  This is the command you will use to select what interface/pixel format you want to use.  You will notice from these images, when using the 8-bit interface for the SSD1963, you must use 24bpp color depth (3 writes per pixel).  The NHD-7.0-800480EF-20 controller board only allows the user to use an 8-bit interface, while the NHD-7.0-800480EF-34 allows for up to an 18-bit interface (16-bit being the most common).  The two controller boards are identical except for the FFC connectors you would be connecting your MCU to (20-pin connector vs 34-pin connector).  The board has solder pads for either connector, allowing you to modify it if you have the means to.

Pages: 1 ... 5 6 [7] 8 9 ... 24