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 - Saurabh_B

Pages: 1 ... 3 4 [5] 6 7 ... 24
61
Thanks for pointing this out, I will have our website design team take the -20 controller off the suggested links.

62
The code below is for our 8051 Control Board. The REG52.h and AL.h are required libraries to configure this controller.

The sbit command is the same as #define, where instead of toggling P3^7 you would just toggle RW.
P3 is Port 3, which is one of the ports brought out to the user on this controller.

63
OLEDs / Re: How work with NHD-0216AW-SB3
« on: May 17, 2017, 04:30:14 PM »
Hello Racurs,

The datasheet is set up properly. The D/C# and R/W# bits are set when sending the initial data.
The information for this can be found on page nine of the controller datasheet (LINK).

Please also note that when sending data to this display I you do need to break each byte into half and send 4 bits at a time. This is also explained on page ten of the controller datasheet linked above.

64
OLEDs / Re: Interfacing NHD-0420CW-AY3 to PIC controller via I2C
« on: May 05, 2017, 09:31:01 AM »
Hello,

This OLED display does have a rather lengthy command input process. Unfortunately it is one of the few available controllers for OLED displays of this type. I can help guide you to get the display working.

I will be referring to the controller datasheet as well, this can be found here: http://www.newhavendisplay.com/app_notes/US2066.pdf

In your examples below, I don't see you sending the control byte after sending the I2C address. (Page 11, controller datasheet)
After sending the I2C address, you would need to send the Control Byte, this will let the display know that the following incoming information is either Data or a Command. The Control Byte will also be needed between each byte of data.

For the contrast setting, you would first need to activate the RE Flag, then the SD flag.
For this you would send the function SET command (0x2A), then the OLED Characterization command (0x79), this will allow you to modify the contrast.

For the set cursor command I am not sure what the 0x45 is, however you would need to send the Set DDRAM Address command.

The Set SEG pins & hardware configuration command will allow you to rotate the display, or have text coming in from a different location rather than the top left. The entry mode command determines whether you want to enable the shift on the display, or if you would like the Address counter to auto increment or decrement after receiving a character.

I would also recommend looking at the example code here: https://github.com/NewhavenDisplay/NHD_US2066

Could you also provide your I2C1_Wr function?

65
OLEDs / Re: NHD-0216AW-IB3 with Arduino Uno Code example?
« on: May 04, 2017, 04:14:08 PM »
Hello,

You can find the code for this display here: https://github.com/NewhavenDisplay/NHD_US2066

This code will work for both the Arduino Uno and Mega.

66
TFTs / Re: NHD-5.0-800480TF-ATXL# Display timing
« on: April 28, 2017, 04:56:35 PM »
Hello,

Can you tell me what the date code on the display is, or if you could please provide a picture of the back of the display?

67
Character LCDs / Re: interfacing NHD-C0216CZ-FSW-FBW-3V3 with msp430
« on: April 10, 2017, 08:16:36 AM »
Hello,

This display uses the ST7032 controller with a 4-Line SPI.
You can get more information about the communications protocols here: http://www.newhavendisplay.com/app_notes/ST7032.pdf

We do not have any libraries available for this display, however we do have sample code which can be found here: http://www.newhavendisplay.com/app_notes/NHD-C0216CZ.txt

You can also find libraries and example software on sites such as GitHub by searching for the ST7032.

69
OLEDs / Re: NHD-0220CW-AG3 Character set
« on: March 28, 2017, 09:19:53 AM »
Hello,

The Font Tables on our displays are defined by the manufacturers of the controllers, in this case it would be the company that manufactures the US2066 controller.

The best solution for requiring multiple characters would be to use a graphic OLED display.
However for this one you would need to create a font table as well.

70
Character LCDs / Re: ST7066U with ROM 0B
« on: March 08, 2017, 04:45:24 PM »
Hello Bob,

Yes it would be possible to do.
It would require a starting MOQ of 500~1k Pcs.

Please email nhtech@newhavendisplay.com to setup a quote.

71
OLEDs / Re: Light Streaking on NHD-0420CW-AB3 Display w/ I2C rewrites
« on: March 01, 2017, 08:23:04 AM »
I've used a jumper board with this display, and i wasn't seeing any streaking.
Would it be possible to post a picture of the display with the streak?


72
OLEDs / Re: NHD-042ODZW-AY5 Jumpers for Serial Interface
« on: February 23, 2017, 11:31:46 AM »
Hello,

Unfortunately for OLEDs there is no simple way to test the display unless you start writing characters onto the display.

I do have example serial code available here:
Code: [Select]
sbit SCL = P3^4;
sbit SDOUT = P1^0;
sbit SDIN = P1^1;
sbit C_S = P3^3;

void delay(unsigned int n) //Delay subroutine
{
unsigned int i,j;
for (i=0;i<n;i++)
  for (j=0;j<250;j++)
  {;}
}
 

void WriteCommand(unsigned char ins)
{
unsigned char i;
C_S=0;
SCL = 0;
SDOUT = 0; //RS = 0 (Command)
SCL = 1; //RS registered
SCL = 0;
SDOUT = 0; //RW = 0
SCL = 1; //RW registered
SCL = 0;

for (i=0x80;i;i>>=1)
{
if((ins&0x80)==0x80)
SDOUT = 1;
else
SDOUT = 0;
ins=(ins<<1);
SCL = 0;
SCL = 1;
SCL = 0;
}

    C_S=1;
}

void WriteDataInit()
{

C_S=0;
SCL = 0;
SDOUT = 1; //RS = 1 (Data)
SCL = 0; //RS registered
SCL = 1;
SCL = 0;
SDOUT = 0; //RW = 0
SCL = 1; //RS registered
SCL = 0;

}
void WriteData(unsigned char dat)
{
unsigned char i;
for (i=0x80;i;i>>=1)
{
if((dat&0x80)==0x80)
SDOUT = 1;
else
SDOUT = 0;
dat=(dat<<1);
SCL = 0;
SCL = 1;
SCL = 0;
}

}

void init()
{
WriteCommand(0x38);//function set
delay(30);
WriteCommand(0x06);//entry mode set
delay(30);
WriteCommand(0x02);//return home
delay(30);
WriteCommand(0x01);//clear display
delay(30);
WriteCommand(0x0c);//display on
delay(30);
WriteCommand(0x80);//line 1 character 1
delay(30);
}

void main()
{
char i=0x21, j;



init();

while(1)
{
C_S = 1;
WriteCommand(0x80); //Line 1

WriteDataInit();
//WriteDataInit() must only be executed once before starting to write data
//if WriteDataInit() is executed between writes, the display will recognize the two bits as data bits and not RS/RW bits. 
for(j=0; j<20; j++)
{
WriteData(i++);
delay(10);
}

C_S = 1;
//Pulling C_S High means write data is completed
//if next instruction to the display is data, must use WriteDataInit() first
//if write command is executed without pulling C_S high, it will recognize the following instruction on the bus as data regardless
WriteCommand(0xC0); //Line 2

WriteDataInit();
for(j=0; j<20; j++)
{
WriteData(i++);
delay(10);
}

C_S = 1;
WriteCommand(0x94); //Line 3

WriteDataInit();
for(j=0; j<20; j++)
{
WriteData(i++);
delay(10);
}


C_S = 1;
WriteCommand(0xD4); //Line 4

WriteDataInit();
for(j=0; j<20; j++)
{
WriteData(i++);
delay(10);
}

}
}

73
TFTs / Re: NHD-7.0-800480EF-ASXN#-CTP: Nominal Backlight Current
« on: February 20, 2017, 08:25:44 AM »
Answered through Email:

The 180 mA is the nominal value, the max allowed would be ~225 mA.
80 mA should be able to turn on the backlight however the display will be dimmer than what is stated in the datasheet.

75
Character LCDs / Re: NHD-0420D3Z-FL-GBW-V3 not displaying cahracters
« on: February 13, 2017, 10:57:13 AM »
Hello,

I have attached my SPI Code for this display using an Arduino:
Code: [Select]
//---------------------------------------------------------
/*
SPI Code.c
Program for writing to Newhaven Display Serial LCD Character Displays via SPI.

(c)2016 Saurabh Baxi - 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.
*/
//---------------------------------------------------------


// DEFINITIONS
#define SCLK  8
#define  SPIS  9
#define SDO   10

const char slave = 0x7E;
const char comsend = 0x00;
const char datasend = 0x40;

char const t1[]=(" Newhaven  Display  ");
char const t2[]=("=SERIAL==Peripheral=");
char const t3[]=("=====Interface======");
char const t4[]=("=ARDUINO=====TESTER=");
//Basic Functions/////////////////////////////
void spiout(unsigned char a){
  int n;
  unsigned char d;
  d = a;
  digitalWrite(SPIS,LOW);
  for(n =0; n<8; n++){
    delayMicroseconds(20);
    if((d&0x80)==0x80)
      digitalWrite(SDO, HIGH);
    else
      digitalWrite(SDO, LOW);
    d = (d<<1);
    digitalWrite(SCLK, LOW);
    delayMicroseconds(20);
    digitalWrite(SCLK, HIGH);
  }
  digitalWrite(SPIS, HIGH);
}
void disp(const char *text){
  int n;
  for (n = 0; n <20 ; n++){
    spiout(*text);
    text++;
    delay(10);
  }
}

void setup() {
  pinMode(SPIS, OUTPUT);
  pinMode(SDO, OUTPUT);
  pinMode(SCLK, OUTPUT);
  digitalWrite(SCLK, LOW);
  digitalWrite(SDO, LOW);
  digitalWrite(SPIS, HIGH);
  delay(10);
  spiout(0xFE);
  spiout(0x51); //Clear Screen
  delay(10);
  spiout(0xFE);
  spiout(0x46); //Cursor Home
  delay(5);
  spiout(0xFE);
  spiout(0x47); // Underline cursor
  delay(5);
  spiout(0xFE);
  spiout(0x53); // Set backlight Brightness
  spiout(8); // Value
  delay(2);
  spiout(0xFE);
  spiout(0x52); // Set Contrast
  spiout(40); // Value
}

void loop() {
  int i;
  spiout(0xFE);
  spiout(0x46); // Cursor Home
  delay(10);
  disp(t1); // Display T1
  delay(5);
  spiout(0xFE);
  spiout(0x45); // Set Curser Address
  spiout(0x40); // Line 2
  delay(5);
  disp(t2);
  spiout(0xFE);
  spiout(0x45);
  spiout(0x14); // Line 3
  delay(5);
  disp(t3);
  spiout(0xFE);
  spiout(0x45);
  spiout(0x54); // Line 4
  delay(5);
  disp(t4);
  spiout(0xFE);
  spiout(0x49); // Move cursor left 1 place
 while(1); // Wait here
}

Would you be able to send a picture of what you are seeing?

Pages: 1 ... 3 4 [5] 6 7 ... 24