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 ... 4 5 [6] 7 8 ... 24
77
Character LCDs / Re: NHD-0216K1Z-NSW-BBW-L Back light
« on: February 13, 2017, 10:42:43 AM »
Hello,

We haven't changed the backlight circuitry for these displays, would it be possible to measure the current you have input into the backlight?

78
Character LCDs / Re: I2C slave address for LCD NHD-C0220BIZ-FS(RGB)-FBW-3VM
« on: February 13, 2017, 10:38:50 AM »
I have been able to write to this using 0x78, I have attached my code below:

Code: [Select]
/*************************************************
*  Code written to drive NHD-C0220BiZ-FS... Using Arduino Mega.
*  Arduino Mega (Voltage Regulator switched with 3.3 V)
**************************************************/

#define SC_L 33
#define SD_A 35

/*****************************************************/
char const text1[]=("COG Test 2x20 Module");
char const text2[]=("TESTING TESTING TEST");
char const text3[]=("Testing Contrast Set");
char const text4[]=("Testing Folower Cont");
/*****************************************************/
/*****************************************************/
const char Slave = 0x78;
const char Comsend = 0x00;
const char Datasend = 0x40;
const char Line2 = 0xC0;
/*****************************************************/

/****************************************************
* Output command or data via I2C *
*****************************************************/
void I2C_out(unsigned char j){ //I2C Output
    int n;
    unsigned char d;
    d=j;
    for(n=0;n<8;n++){
      if((d&0x80)==0x80)
        digitalWrite(SD_A,HIGH);
      else
        digitalWrite(SD_A,LOW);
     d=(d<<1);
     digitalWrite(SC_L,LOW);
     digitalWrite(SC_L,HIGH);
     digitalWrite(SC_L,LOW);
   }
   digitalWrite(SC_L,HIGH);
   while(SD_A==1){
      digitalWrite(SC_L,LOW);
      digitalWrite(SC_L,HIGH);
   }
   digitalWrite(SC_L,LOW);
}
/*****************************************************/
/****************************************************
* I2C Start *
*****************************************************/
void I2C_Start(void){
   digitalWrite(SC_L,HIGH);
   digitalWrite(SD_A,HIGH);
   digitalWrite(SD_A,LOW);
   digitalWrite(SC_L,LOW);
}
/*****************************************************/
/****************************************************
* I2C Stop *
*****************************************************/
void I2C_Stop(void){
   digitalWrite(SD_A,LOW);
   digitalWrite(SC_L,LOW);
   digitalWrite(SC_L,HIGH);
   digitalWrite(SD_A,HIGH);
}
/*****************************************************/
/****************************************************
* Initialization For ST7036i *
*****************************************************/
void init_LCD(){
    I2C_Start();
    I2C_out(Slave);//Slave=0x78
    I2C_out(Comsend);//Comsend = 0x00
    I2C_out(0x38);
    delay(10);
    I2C_out(0x39);
    delay(10);
    I2C_out(0x14);
    I2C_out(0x78);
    I2C_out(0x5E);
    I2C_out(0x6D);
    //I2C_out(0x38);
    I2C_out(0x0F);
    I2C_out(0x01);
    I2C_out(0x06);
    delay(10);
    I2C_Stop();
}
/*****************************************************
 *         CONTRAST CONTROL                          *
 /***************************************************/
 void contrast(){

  /************************************************
   *    TESTING CONTRAST SET LOWER / Higher Bits   *
   ************************************************/
   int n;
   I2C_Start();
   I2C_out(Slave); //Slave=0x78
   I2C_out(Datasend);//Datasend=0x40
   for(n=0;n<20;n++){
      I2C_out(text1[n]);
      //++text;
   }
   I2C_Stop();
   nextline();
   I2C_Start();
   I2C_out(Slave); //Slave=0x78
   I2C_out(Datasend);//Datasend=0x40
   for(n=0;n<20;n++){
      I2C_out(text3[n]);
      //++text;
   }
   I2C_Stop();
   delay(200);

    for (int i = 112; i < 128; i++){
        I2C_Start();
        I2C_out(Slave);
        I2C_out(Comsend);
        I2C_out(0x39);
        delay(10);
        I2C_out(i);
        I2C_Stop();
        delay (300);
    }
    for (int i = 94; i < 96; i++){
        I2C_Start();
        I2C_out(Slave);
        I2C_out(Comsend);
        I2C_out(0x39);
        delay(10);
        I2C_out(i);
        I2C_Stop();
        delay (300);
    }
    init_LCD(); // Return to normal
   /************************************************
   *    TESTING Folower mode
   ************************************************/
   I2C_Start();
   I2C_out(Slave); //Slave=0x78
   I2C_out(Datasend);//Datasend=0x40
   for(n=0;n<20;n++){
      I2C_out(text1[n]);
      //++text;
   }
   I2C_Stop();
   nextline();
   I2C_Start();
   I2C_out(Slave); //Slave=0x78
   I2C_out(Datasend);//Datasend=0x40
   for(n=0;n<20;n++){
      I2C_out(text4[n]);
      //++text;
   }
   I2C_Stop();
   delay(200);
     for (int i = 104; i < 112; i++){
        I2C_Start();
        I2C_out(Slave);
        I2C_out(Comsend);
        I2C_out(0x39);
        delay(10);
        I2C_out(i);
        I2C_Stop();
        delay (600);
    }
    init_LCD();
   
   
 
 }
/****************************************************
*            Send string of ASCII data to LCD       *
*****************************************************/
void Show(){
   int n;
   I2C_Start();
   I2C_out(Slave); //Slave=0x78
   I2C_out(Datasend);//Datasend=0x40
   for(n=0;n<20;n++){
      I2C_out(text1[n]);
      //++text;
   }
   I2C_Stop();
   nextline();
   I2C_Start();
   I2C_out(Slave); //Slave=0x78
   I2C_out(Datasend);//Datasend=0x40
   for(n=0;n<20;n++){
      I2C_out(text2[n]);
      //++text;
   }
   I2C_Stop();
}
/*****************************************************/
void nextline(){
    I2C_Start();
    I2C_out(Slave);
    I2C_out(Comsend);
    I2C_out(Line2);
    I2C_Stop();
}
void setup() {
  // put your setup code here, to run once:
  //pinMode(pin, mode)
  pinMode(33, OUTPUT);
  pinMode(35, OUTPUT);
  DDRD = 0xFF;
  init_LCD();
  Show();
  delay(300);
 
 
}

void loop() {
  int i;
  init_LCD();
  delay(2);
  // CONTRAST TESTING
  contrast();
 delay(1000);
}

How does your code send the bits?

79
Character LCDs / Re: Displaying Logo on Character LCD NHD-0440AZ-FL-YBW
« on: February 13, 2017, 08:57:52 AM »
Hi,

Unfortunately those options aren't feasible.

- The font tables on these controllers are set, and it is not possible to overwrite them.
- Because of the technology, the screen has to be refreshed several times per second or the pixels on the screen would start to fade away.
- The ST7066U is not able to work as a graphic display,

The only option that would solve this issue is to replace the display with a graphic display of the same size. However you said it was not possible to implement this.

80
Evaluation Tools / Re: Development/Evaluation board path to VGA?
« on: February 13, 2017, 08:32:29 AM »
Hello,

Unfortunately we do not have a VGA development board.
We are working on other controller boards that would allow you to test this display however these are still under development and should be available later this year.

81
OLEDs / Re: Particle Photon with NHD-0420CS OLED using I2C
« on: February 10, 2017, 03:09:31 PM »
Hello,

Unfortunately we have not wired this display up with the Particle Photon as of yet, We do have a generic wiring diagram on the datasheet.
What pins do you have available to connect to the display?

82
OLEDs / Re: problem with NHD‐2.23‐12832UCB3
« on: January 24, 2017, 02:52:53 PM »
Would it also be able to get a schematic and your initialization sequence?

83
Character LCDs / Re: Problem of contrast NHD-0216K1Z-NSW-BBW-L
« on: January 24, 2017, 02:51:57 PM »
Hello Vincent,

What are you seeing on the display? Also what voltage do you have applied to Pin 3?

The contrast is adjustable for these displays,and it is also dependant on the temperature, if the display is in a colder environment you might have to turn down the voltage being applied to that pin.

85
Evaluation Tools / Re: NHDev support for NHD-C12864LZ-FSW-FBW-3V3
« on: January 17, 2017, 12:15:08 PM »
Yes you would be able to use this with the NHDev Development Board.

I can send you a list of components you would need for this to work.

86
Character LCDs / Re: NHD-0216K1Z-FL-YBW Screen Corruption Problem
« on: January 17, 2017, 12:13:51 PM »
Hello,

This can be attributed to a timing issue.
Do you know if you are using a delay between each data write?

Would you also be able to provide the write function along with the data you are sending?

87
TFTs / Re: TFT NHD-2.4-240320CF-CSXN#-FT
« on: January 17, 2017, 12:10:55 PM »
Would you be able to provide your Schematic for this as well?

88
OLEDs / Re: Reg: NHD-0420DZW DZW SPI Interface with Arudino
« on: December 29, 2016, 08:02:43 AM »
Hello,

Here is an example code for the Serial OLED displays:
Code: [Select]
sbit SCL = P3^4; //Serial Clock Pin
sbit SDOUT = P1^0; // Serial Data Out
sbit SDIN = P1^1; // Serial Data In
sbit C_S = P3^3; // Chip Select

/*************************************************
******** CHARACTER STRINGS ***********************  You can also use these to send a line of text you would like to display
************************************************** 
*************************************************/
char const text1[] = ("Testing OLED Display")
char const text2[] = ("NewHaven Display L 2")
char const text3[] = ("    Line  3 Test    ")
char const text4[] = ("       Line 4       ")

void delay(unsigned int n) //Delay subroutine n* 250 cycles
{
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() // first write data command while setting Register Select
{

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)  //continuous data stream
{
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 Show_String(){
WriteCommand(0x01); // Clear Display
WriteCommand(0x02); // Return Home
WriteDataInit();
for( int i = 0; i< 20; i++){
WriteData(text1[i]);
  }
  WriteCommand(0xC0); // Second Line
  WriteDataInit();
  for(int i = 0; i < 20; i++){
WriteData(text2[i]);
  }
  WriteCommand(0x94); // Third Line
  WriteDataInit();
  for (int i = 0; i<20; i++){
WriteData(text3[i]);
  }

  WriteCommand(0xD4); // Fourth Line
  WriteDataInit();
  for(int i = 0; i < 20; i++){
WriteData(text4[i]);
    }
}

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();

//Show_String();
//delay(1000):
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);
}

}
}

89
OLEDs / Re: NHD-0420DZW-AB5
« on: December 29, 2016, 08:02:00 AM »
Here is an example SPI code for the serial OLED displays:
Code: [Select]
sbit SCL = P3^4; //Serial Clock Pin
sbit SDOUT = P1^0; // Serial Data Out
sbit SDIN = P1^1; // Serial Data In
sbit C_S = P3^3; // Chip Select

/*************************************************
******** CHARACTER STRINGS ***********************  You can also use these to send a line of text you would like to display
************************************************** 
*************************************************/
char const text1[] = ("Testing OLED Display")
char const text2[] = ("NewHaven Display L 2")
char const text3[] = ("    Line  3 Test    ")
char const text4[] = ("       Line 4       ")

void delay(unsigned int n) //Delay subroutine n* 250 cycles
{
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() // first write data command while setting Register Select
{

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)  //continuous data stream
{
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 Show_String(){
WriteCommand(0x01); // Clear Display
WriteCommand(0x02); // Return Home
WriteDataInit();
for( int i = 0; i< 20; i++){
WriteData(text1[i]);
  }
  WriteCommand(0xC0); // Second Line
  WriteDataInit();
  for(int i = 0; i < 20; i++){
WriteData(text2[i]);
  }
  WriteCommand(0x94); // Third Line
  WriteDataInit();
  for (int i = 0; i<20; i++){
WriteData(text3[i]);
  }

  WriteCommand(0xD4); // Fourth Line
  WriteDataInit();
  for(int i = 0; i < 20; i++){
WriteData(text4[i]);
    }
}

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();

//Show_String();
//delay(1000):
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);
}

}
}

90
Evaluation Tools / Re: FTDI Eve screen editor
« on: December 29, 2016, 07:59:29 AM »
I personally have not, the engineer who has been working on this is currently on vacation.
I can have him contact you next week.

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