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] 2 3 ... 24
1
OLEDs / Re: I2C Errors on NHD-0216CW-AB3 but not NHD-0220CW-AB3
« on: December 08, 2016, 02:30:08 PM »
There is a known issue on our Slim Character OLED display modules which affects its operation when used in I2C mode.
When using the module’s I2C interface, AND using 5.0V operation, I2C bus errors such as NACKs/bit errors/hanging, may occur.

The I2C interface, when low voltage operation (2.4-3.6V) is used, works correctly without any such errors.
The display’s Parallel interface options, along with the SPI interface option, are not affected by this issue, and may be used as the original specification indicates.

Therefore, if using the I2C interface of these Slim Character OLED display modules, 5.0V operation should NOT be used.
If only 5.0V logic is available, and I2C must be used, as a work-around you may use 5.0V I2C, as long as 2.4-3.6V is available for VDD.

In either case (3.3V or 5V I2C logic), if the I2C interface must be used, the following must be true for reliable operation:
-   2.4-3.6V applied to VDD (pin 2)
-   0V/GND applied to REGVDD (pin 3)
-   During initialization, you must send the “Function Selection A” command (available after setting the ‘RE’ bit to ‘1’ in the “Function Set” command), with the following parameter for A[7:0] being 0x00.  This disables the internal VDD regulator.
For additional details, please refer the Table of Commands beginning on page 7 of the Slim Character OLED display module’s datasheet.

We have updated the I2C section of our datasheet to reflect this information, and the updated specs should be accessible on our website shortly.
If you have any questions or need any assistance getting these OLED modules working, please contact us by emailing our technical support email nhtech@newhavendisplay.com, or by calling our phone M-F, 8am - 5pm CST (number listed on our website in the contact us section), we're always happy to help!  :D

2
OLEDs / Re: NHD-2.8-25664UCB2 goes dark under heavy updates
« on: December 08, 2016, 02:11:37 PM »
Hi Peter,

Please use our technical support email nhtech@newhavendisplay.com to send any relevant documents/files.
You may reference Paul/this forum post in your email, and we will be more than happy to provide any help needed to get your display fully functional.

Thanks!

3
TFTs / Re: Writing Character strings to NHD-1.8-128160EF-CTXI#
« on: July 13, 2016, 09:45:21 AM »
Hi daota, please see below  :)

Code: [Select]
void comm_out(unsigned char c)
{
  DC_LOW;
  PORTA = c;
  WR_LOW;
  WR_HIGH;
}

void data_out(unsigned char d)
{
  PORTA = d;
  WR_LOW;
  WR_HIGH;
}

void Set_Column_Address(unsigned int a, unsigned int b, unsigned int c, unsigned int d)
{
  comm_out(0x2A);
  digitalWrite(RS, HIGH);
  data_out(a);                 
  data_out(b);                 
  data_out(c);
  data_out(d);                 
}

void Set_Page_Address(unsigned int a, unsigned int b, unsigned int c, unsigned int d)
{
  comm_out(0x2B);
  digitalWrite(RS, HIGH);
  data_out(a);                 
  data_out(b);                 
  data_out(c);
  data_out(d);                 
}
void LCD_Pixel(unsigned int color)
{
    data_out((color>>16));
    data_out((color>>8));
    data_out((color));
}

4
TFTs / Re: NHD-5.0-800480TF-ATXL-CTP with LPC1788
« on: June 03, 2016, 09:29:40 AM »
If the TFT interface on that microcontroller can support up to 1024x768 pixels, then using our 800x480 pixel TFT with it will be fine.
To calculate frame buffer:
800 (horizontal pixels) x 480 (vertical pixels) x 3 (24bpp [3 bytes per pixel]) = 1,152,000 bytes.

5
Chris,

Have you been referring to the proper datasheet for the NHD-4.3-480272EF-ASXN#-CTP?  The pinout for the CTP is shown on page 4, and the /WAKE signal is not brought out to the 6-pin FFC.
You will notice pin 6 is the /RESET signal for the FocalTech controller IC.  A logic HIGH needs to be present on this pin for the CTP to operate correctly.
Typically, a pull-down resistor is put on this signal, so on start-up the CTP's IC is in reset, then you would have your microcontroller drive it high before use.
Please find my Arduino example code below to help show how to use the CTP:

Code: [Select]
/***********************************************************************\
CTP_Register_Test_Due.ino

(c)2016 Michael LaVine | Newhaven Display International, Inc.

This code is meant to serve as an example of how to communicate with
Newhaven Display's FT5x06 based capacitive touch panels.

  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 3 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.
\***********************************************************************/
#include <Wire.h>

#define RESET 18
#define INT 19
#define slaveAddress_FT5x06 0x38

unsigned char readValue1, readValue2, readValue3, readValue4;

void resetCTP()
{
  delay(5);
  digitalWrite(RESET, HIGH);
  delay(400);
}

void writeI2C(unsigned char slaveAddress, unsigned char registerAddress, unsigned char registerData)      // I2C routine to write to 1 register
{
  Wire.beginTransmission(slaveAddress);
  Wire.write(registerAddress);
  Wire.write(registerData);
  while(Wire.endTransmission());
}

unsigned char readI2C(unsigned char slaveAddress, unsigned char registerAddress)     // I2C routine to read 1 register
{
  unsigned char readValue;
  Wire.beginTransmission(slaveAddress);
  Wire.write(registerAddress);
  while(Wire.endTransmission());
  Wire.requestFrom(slaveAddress, 1);
  while(Wire.available())
  {
    readValue = Wire.read();
  }
  return readValue;
}

void read4I2C(unsigned char slaveAddress, unsigned char registerAddress)     // I2C routine to read 4 consecutive registers
{
  Wire.beginTransmission(slaveAddress);
  Wire.write(registerAddress);
  while(Wire.endTransmission());
  Wire.requestFrom(slaveAddress, 4);
  while(Wire.available())
  {
    readValue1 = Wire.read();
    readValue2 = Wire.read();
    readValue3 = Wire.read();
    readValue4 = Wire.read();
  }
}
/*****************************************************/
/*****************************************************/
/*****************************************************/
void setup()
{
  pinMode(RESET, OUTPUT);
  pinMode(INT, INPUT);
  Wire.begin();
  Serial.begin(9600);
  resetCTP();
}

void loop()
{
  unsigned char dummy = 0, gesture = 0, numpoints = 0, t1xh = 0, t1xl = 0, t1yh = 0, t1yl = 0;
  unsigned int t1x = 0, t1y = 0;
 
  while(1)
  {
    while((digitalRead(INT)) == LOW)
    {
      read4I2C(slaveAddress_FT5x06, 0x00);
      dummy = readValue1;                       // Dummy read
      gesture = readValue2;                     // Gesture value
      numpoints = readValue3;                   // Number of touch points
      t1xh = readValue4;                        // Upper 8 bits of X-axis touch location
      read4I2C(slaveAddress_FT5x06, 0x04);
      t1xl = readValue1;                        // Lower 8 bits of X-axis touch location
      t1yh = readValue2;                        // Upper 8 bits of Y-axis touch location
      t1yl = readValue3;                        // Lower 8 bits of Y-axis touch location
      dummy = readValue4;                       // Dummy read
      t1x = t1xl | (t1xh << 8);                 // Get the 16 bit X-axis touch location
      t1y = t1yl | (t1yh << 8);                 // Get the 16 bit Y-axis touch location
         
      //****************************************************************************//
      //  UNCOMMENT THE LINE BELOW THAT YOU WANT TO BE SHOWN ON THE SERIAL MONITOR  //
      //****************************************************************************//
         
          //Serial.println(gesture, DEC);delay(25);    // Show gesture value
          //Serial.println(numpoints, DEC);delay(25);  // Show number of touch points
          Serial.println(t1x&0x0FFF, DEC);delay(25);   // Show 16-bit X-axis touch location
          //Serial.println(t1y&0x0FFF, DEC);delay(25);   // Show 16-bit Y-axis touch location
    }
  }
}

6
New Product Releases / Re: Full Color OLEDs are now available!
« on: December 29, 2015, 09:11:54 AM »
George,

To allow customers to work with our displays, we provide working initialization code to get the display setup properly.  We also provide the logic needed to communicate to the display (writing data & commands) within the example code.  You can find example code for our displays on our website, here:
http://www.newhavendisplay.com/app_notes.html
Once there, you can either click "Arduino" as there is some nice Arduino example code available for our color OLEDs, or you can click "Ex. code" for additional files.
You can also access our github page to view these examples for the color OLEDs here:
https://github.com/NewhavenDisplay
For detailed information on the initialization settings and the OLED driver IC, please refer to the SSD1351 datasheet (there is a link to it on page 6 of our datasheet for the display).
Also, you should be able to find additional code examples/libraries by searching the web for SSD1351 libraries.  Here is one I just found:
https://github.com/adafruit/Adafruit-SSD1351-library

Hope this helps!

7
TFTs / Re: Program snippet for writing to Newhaven Display 7.0" TFT
« on: October 30, 2015, 12:24:44 PM »
Have you found the Arduino example code for this display on our website?
https://newhavendisplay.com/appnotes/excode/txt/Arduino/70_800480EF.txt
(also below):

Code: [Select]
//---------------------------------------------------------
/*
NHD_7_0_800480EF_mega.ino
Program for writing to Newhaven Display 7.0” TFT with NHD-5.0-800480TF-20 Controller Board (SSD1963, 8-bit)

(c)2013 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 8 bit data bus is connected to PORTA of the Arduino Mega2560
// 5V voltage regulator on Arduino Mega has been replaced with a 3.3V regulator to provide 3.3V logic

int RS  = 30;    // RS signal connected to Arduino digital pin 30
int WR  = 31;    // /WR signal connected to Arduino digital pin 31
int RD  = 32;    // /RD signal connected to Arduino digital pin 32
int RES = 33;    // /RES signal connected to Arduino digital pin 33
int DIS = 34;    // DISP signal connected to Arduino digital pin 34

// /CS signal tied to GND

//;******************************************************************************
void TFT_Write_Command(unsigned char command)
{
  digitalWrite(RS, LOW);
  PORTA = command;
  digitalWrite(WR, LOW);
  digitalWrite(WR, HIGH);
}
//;******************************************************************************
void TFT_Write_Data(unsigned char data)
{
  //digitalWrite(RS, HIGH);
  PORTA = data;
  digitalWrite(WR, LOW);
  digitalWrite(WR, HIGH);
}
//====================================================
void TFT_Command_Write(unsigned char REG,unsigned char VALUE)
{
        TFT_Write_Command(REG);
        digitalWrite(RS, HIGH);
        TFT_Write_Data(VALUE);
}
//======================================================
void WindowSet(unsigned int s_x,unsigned int e_x,unsigned int s_y,unsigned int e_y)
{
TFT_Write_Command(0x2a); //SET column address
digitalWrite(RS, HIGH);
TFT_Write_Data((s_x)>>8); //SET start column address
TFT_Write_Data(s_x);
TFT_Write_Data((e_x)>>8); //SET end column address
TFT_Write_Data(e_x);

TFT_Write_Command(0x2b); //SET page address
digitalWrite(RS, HIGH);
TFT_Write_Data((s_y)>>8); //SET start page address
TFT_Write_Data(s_y);
TFT_Write_Data((e_y)>>8); //SET end page address
TFT_Write_Data(e_y);
}
void disp()
{
unsigned int i, j;
        WindowSet(0,799,0,479);               //set start/end column/page address (full screen)
TFT_Write_Command(0x2C);              //command to begin writing to frame memory
        digitalWrite(RS, HIGH);
for(i=0;i<480;i++)         //fill screen with blue pixels
{
    for(j=0;j<800;j++)
            {
              TFT_Write_Data(0xFF);
              TFT_Write_Data(0x00);
              TFT_Write_Data(0x00);
            }
}
        WindowSet(0,799,0,479);               //set start/end column/page address (full screen)
TFT_Write_Command(0x2C);              //command to begin writing to frame memory
        digitalWrite(RS, HIGH);
        for(i=0;i<480;i++)         //fill screen with green pixels
{
    for(j=0;j<800;j++)
            {
              TFT_Write_Data(0x00);
              TFT_Write_Data(0xFF);
              TFT_Write_Data(0x00);
            }
}
        WindowSet(0,799,0,479);               //set start/end column/page address (full screen)
TFT_Write_Command(0x2C);              //command to begin writing to frame memory
        digitalWrite(RS, HIGH);
        for(i=0;i<480;i++)         //fill screen with red pixels
{
    for(j=0;j<800;j++)
            {
              TFT_Write_Data(0x00);
              TFT_Write_Data(0x00);
              TFT_Write_Data(0xFF);
            }
}
}
//======================================================
void setup()
{
  DDRA = 0xFF;
  PORTA = 0x00;
  DDRC = 0xFF;
  PORTC = 0x00;
  digitalWrite(DIS, HIGH);
  digitalWrite(RD, HIGH);
  digitalWrite(WR, LOW);
  digitalWrite(RES, LOW);
  delay(120);
  digitalWrite(RES, HIGH);
  delay(120);
  TFT_Write_Command(0x01);         //Software reset
  delay(120);
  TFT_Write_Command(0xe2);         //set multiplier and divider of PLL
  digitalWrite(RS, HIGH);
  TFT_Write_Data(0x1d);
  TFT_Write_Data(0x02);
  TFT_Write_Data(0x04);
  TFT_Command_Write(0xe0,0x01);    //Enable PLL
  delay(1);
  TFT_Command_Write(0xe0,0x03);    //Lock PLL
  TFT_Write_Command(0x01);         //Software reset
  delay(120);
  TFT_Write_Command(0xb0); //SET LCD MODE  SET TFT 18Bits MODE
  digitalWrite(RS, HIGH);
  TFT_Write_Data(0x08); //SET TFT MODE & hsync+Vsync+DEN MODE
  TFT_Write_Data(0x80); //SET TFT MODE & hsync+Vsync+DEN MODE
  TFT_Write_Data(0x03); //SET horizontal size=800-1 HightByte
  TFT_Write_Data(0x1f);         //SET horizontal size=800-1 LowByte
  TFT_Write_Data(0x01); //SET vertical size=480-1 HightByte
  TFT_Write_Data(0xdf); //SET vertical size=480-1 LowByte
  TFT_Write_Data(0x00); //SET even/odd line RGB seq.=RGB
  TFT_Command_Write(0xf0,0x00);         //SET pixel data I/F format=8bit
  TFT_Command_Write(0x36,0x09);         //SET address mode=flip vertical 
  TFT_Write_Command(0xe6);    //SET PCLK freq
  digitalWrite(RS, HIGH);
  TFT_Write_Data(0x0f);
  TFT_Write_Data(0xff);
  TFT_Write_Data(0xff);
  TFT_Write_Command(0xb4); //SET HBP
  digitalWrite(RS, HIGH);
  TFT_Write_Data(0x04); //SET HSYNC Total=1056
  TFT_Write_Data(0x20);
  TFT_Write_Data(0x00); //SET HBP 88
  TFT_Write_Data(0x58);
  TFT_Write_Data(0x80);  //SET HSYNC Pulse Width=128=127pixels+1
  TFT_Write_Data(0x00); //SET Hsync pulse start position
  TFT_Write_Data(0x00);
  TFT_Write_Data(0x00); //SET Hsync pulse subpixel start position
  TFT_Write_Command(0xb6); //SET VBP
  digitalWrite(RS, HIGH);
  TFT_Write_Data(0x02); //SET Vsync total 525
  TFT_Write_Data(0x0d);
  TFT_Write_Data(0x00); //SET VBP=32
  TFT_Write_Data(0x20);
  TFT_Write_Data(0x01);  //SET VSYNC Pulse Width= 0=0lines+1
  TFT_Write_Data(0x00); //SET Vsync pulse start position
  TFT_Write_Data(0x00);
  TFT_Write_Command(0x13); //SET display on
  TFT_Write_Command(0x38); //SET display on
  TFT_Write_Command(0x29); //SET display on
  delay(10);
}

void loop()
{
  disp();
  delay(1000); 
}

8
Graphic LCDs / Re: 320x240 sunlight readable dispaly to arduino + library
« on: October 23, 2015, 11:46:04 AM »
Please see my reply to your other post, here:
http://www.newhavendisplay.com/NHD_forum/index.php/topic,1048.0.html

10
Graphic LCDs / Re: NHD-320240WX-CoTFH-V#I040 or NHD-320240WG-BxTFH-VZ#
« on: October 23, 2015, 11:42:29 AM »
Both the Arduino Uno and Mega can be used to drive this display, and accomplish what you are trying to do.
They both have very little on-board memory for storing things like images, however you can use external memory for the storage of these data types.
We do not offer an Arduino library for the display, only the example code we have available in the display datasheets, and in our App Notes section of our website.
If you must use an Arduino library, I would encourage you to search the internet for Arduino libraries for either the RA8835 or S1D13700 controller (depending on which display you are using), since the controller ICs these displays use are common amongst graphic type LCDs.
It is very likely either Arduino has something that will work, or someone else has made a library to work with the Arduino.

11
New Product Wishlists / Re: Series LED for backlighting
« on: October 15, 2015, 08:56:32 AM »
Ah ok, thanks for the explanation I do understand what you mean.  As another option, could it be possible for you to use any built-in PWM on the microcontroller you are using?
Also, thanks for sharing your interest in our display, that is one of our best graphic COG LCDs! 8)

12
New Product Wishlists / Re: Series LED for backlighting
« on: October 14, 2015, 09:22:02 AM »
We would be able to design this as a custom product if you like, however, the FAN5333 can be used with parallel LEDs as well (see the Typical Application diagram on page 1 of the FAN5333 datasheet).  I would think the latter would be more appealing to you than paying for the tooling of a custom display, and dealing with a non-stocked, custom part.  If your company is interested in pursuing the custom design, we are more than happy to provide you a quote, including tooling cost, unit price, and lead times.  For this inquiry, please email nhtech@newhavendisplay.com.

13
TFTs / Re: ILI9341 Read ID not working
« on: October 09, 2015, 10:01:35 AM »
Can you confirm the full part number of the display you are referring to?
We used to sell 2.4" TFTs with the ILI9341 controller, however they used a 8/16 bit parallel interface.
The serial interface read cycle sequence information begins on page 36 of the ILI9341 datasheet:
http://www.newhavendisplay.com/app_notes/ILI9341.pdf
I would ultimately use this document to read from the IC correctly, as you may encounter incorrect examples online.

14
Graphic LCDs / Re: Driving the backlight LED for NHD-C12864WC-FSW-FBW-3V3
« on: October 01, 2015, 08:37:36 AM »
This display does not have a current limiting resistor, one should be used when powering the backlight.
The maximum current for the backlight on this display is 50mA.

15
TFTs / Re: NHD-5.0-800480TF-ATXL-CTP Flickering
« on: September 10, 2015, 08:23:34 AM »
Great!  Thank you for sharing your solution! :)

Pages: [1] 2 3 ... 24