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 ... 7 8 [9] 10 11 ... 24
121
Graphic LCDs / Re: Connecting NHD-12232AZ-FL-YBW to a Cypress PSoC 3
« on: December 04, 2014, 03:06:55 PM »
You are correct, there are two chips used for this display.  Each Enable signal controls one, and the R/W signal is shared (tied together) between them.  Because of this, you would not be able to use the display in 8080 mode because you would then write (with the shared /WR signal) to both chips anytime your micro sends data to the display.

122
Graphic LCDs / Re: NHD-C160100DiZ-FSW-FBW w/PIC18F47J53
« on: December 02, 2014, 08:38:18 AM »
Are you issuing a hard reset when you initialize the display?  Take a look at the code below that we use for one of our testers and try and use these initialization values and sequence.  Also note the hard reset at the beginning:

Code: [Select]
void C160100DiZ_Init(void)
{
GPIO_WriteBit(GPIOC, RES, Bit_RESET);
graphic_delay(10);
GPIO_WriteBit(GPIOC, RES, Bit_SET);
GPIO_SetBits(GPIOC, CS1);
GPIO_SetBits(GPIOC, nRD);
GPIO_SetBits(GPIOC, RS);
GPIO_SetBits(GPIOC, nWR);
ST7528i_Start();
ST7528i(Slave);
ST7528i(Send_Command);
ST7528i(0x48); //set partial display duty
ST7528i(0x64);
ST7528i(0xA0); //ADC: normal
ST7528i(0xC8); //SHL: COM reverse
ST7528i(0x40); //set initial display line
ST7528i(0x00); //set initial display line = 0x00
ST7528i(0x44); //set initial COM0 register
ST7528i(0x00);
ST7528i(0xAB); //start oscillator
ST7528i(0x26); //select regulator resistor ratio
ST7528i(0x81); //set electronic volume
ST7528i(0x1C); //contrast value
ST7528i(0x56); //select LCD bias
ST7528i(0x64); //select DC-DC step-up
graphic_delay(2000);
ST7528i(0x2C); //set power control
ST7528i(0x66); //select DC-DC step-up
graphic_delay(2000);
ST7528i(0x2E); //set power control
graphic_delay(2000);
ST7528i(0x2F); //set power control
ST7528i(0xF3); //bias power save
ST7528i(0x00); //bias power save
ST7528i(0x96); //select FRC and PWM mode
ST7528i(0x38); //mode set
ST7528i(0x75); //mode set (FR and BE)

ST7528i(0x80); //begin Gray Scale level settings
ST7528i(0x00);
ST7528i(0x81);
ST7528i(0x00);
ST7528i(0x82);
ST7528i(0x00);
ST7528i(0x83);
ST7528i(0x00);
ST7528i(0x84);
ST7528i(0x06);
ST7528i(0x85);
ST7528i(0x06);
ST7528i(0x86);
ST7528i(0x06);
ST7528i(0x87);
ST7528i(0x06);
ST7528i(0x88);
ST7528i(0x0B);
ST7528i(0x89);
ST7528i(0x0B);
ST7528i(0x8A);
ST7528i(0x0B);
ST7528i(0x8B);
ST7528i(0x0B);
ST7528i(0x8C);
ST7528i(0x10);
ST7528i(0x8D);
ST7528i(0x10);
ST7528i(0x8E);
ST7528i(0x10);
ST7528i(0x8F);
ST7528i(0x10);
ST7528i(0x90);
ST7528i(0x15);
ST7528i(0x91);
ST7528i(0x15);
ST7528i(0x92);
ST7528i(0x15);
ST7528i(0x93);
ST7528i(0x15);
ST7528i(0x94);
ST7528i(0x1A);
ST7528i(0x95);
ST7528i(0x1A);
ST7528i(0x96);
ST7528i(0x1A);
ST7528i(0x97);
ST7528i(0x1A);
ST7528i(0x98);
ST7528i(0x1E);
ST7528i(0x99);
ST7528i(0x1E);
ST7528i(0x9A);
ST7528i(0x1E);
ST7528i(0x9B);
ST7528i(0x1E);
ST7528i(0x9C);
ST7528i(0x23);
ST7528i(0x9D);
ST7528i(0x23);
ST7528i(0x9E);
ST7528i(0x23);
ST7528i(0x9F);
ST7528i(0x23);
ST7528i(0xA0);
ST7528i(0x27);
ST7528i(0xA1);
ST7528i(0x27);
ST7528i(0xA2);
ST7528i(0x27);
ST7528i(0xA3);
ST7528i(0x27);
ST7528i(0xA4);
ST7528i(0x2B);
ST7528i(0xA5);
ST7528i(0x2B);
ST7528i(0xA6);
ST7528i(0x2B);
ST7528i(0xA7);
ST7528i(0x2B);
ST7528i(0xA8);
ST7528i(0x2F);
ST7528i(0xA9);
ST7528i(0x2F);
ST7528i(0xAA);
ST7528i(0x2F);
ST7528i(0xAB);
ST7528i(0x2F);
ST7528i(0xAC);
ST7528i(0x32);
ST7528i(0xAD);
ST7528i(0x32);
ST7528i(0xAE);
ST7528i(0x32);
ST7528i(0xAF);
ST7528i(0x32);
ST7528i(0xB0);
ST7528i(0x35);
ST7528i(0xB1);
ST7528i(0x35);
ST7528i(0xB2);
ST7528i(0x35);
ST7528i(0xB3);
ST7528i(0x35);
ST7528i(0xB4);
ST7528i(0x38);
ST7528i(0xB5);
ST7528i(0x38);
ST7528i(0xB6);
ST7528i(0x38);
ST7528i(0xB7);
ST7528i(0x38);
ST7528i(0xB8);
ST7528i(0x3A);
ST7528i(0xB9);
ST7528i(0x3A);
ST7528i(0xBA);
ST7528i(0x3A);
ST7528i(0xBB);
ST7528i(0x3A);
ST7528i(0xBC);
ST7528i(0x3C);
ST7528i(0xBD);
ST7528i(0x3C);
ST7528i(0xBE);
ST7528i(0x3C);
ST7528i(0xBF);
ST7528i(0x3C); //end Gray Scale level settings

ST7528i(0x38); //mode set
ST7528i(0x74); //mode set (FR and BE)
ST7528i(0xAF); //display ON
ST7528i_Stop();
}

123
TFTs / Re: NHD-7.0-800480EF-ATXV#-CTP dull display
« on: November 26, 2014, 09:02:48 AM »
You're welcome!  Thank you for sharing your issue & solution!

124
TFTs / Re: NHD-7.0-800480EF-ATXV#-CTP dull display
« on: November 25, 2014, 08:15:34 AM »
How are your connections to the display?  Do you have a schematic you can share?

125
Character LCDs / Re: Nothing Display on my NHD-0108CZ-FSW-GBW-33V3
« on: November 24, 2014, 08:52:12 AM »
Our example code is verified to work correctly.  Have you verified your signals are working/toggling correctly with a scope?
Also, typically you need to set up the ports as outputs in your code.
For example :
DDRB = 0xFF;
DDRD = 0xFF;

126
TFTs / Re: ILI9341 Freeze Display
« on: November 24, 2014, 08:43:19 AM »
There is not a way to do this.  What you are describing is essentially double-buffering, and the ILI9341 controller does not have this feature.

127
TFTs / Re: Touch Screen - NHD-2.4-240320SF-CTXL#-FTN1
« on: November 20, 2014, 09:16:09 AM »
Yes it will work.  The resistive touch panels are simply voltage dividers when pressed at a certain location.  There is no IC or chip that is being powered.  Normally with 5.0V you would get near 0V when touching one end of the touch panel, and near 5.0V when touching the other end, with all the voltage levels in between representing you location.  With 3.3V, it will work the same, except it will be from 0 - 3.3V. You will need to test it to ultimately decide if it works for you.

128
TFTs / Re: NHD-7.0-800480EF-ATXV#-CTP dull display
« on: November 20, 2014, 09:12:46 AM »
I have not seen this before, however, there is no contrast setting adjustment available.  I doubt it is the display, but do you have another to try?  Try changing some of your display signal timings (i.e. CLK, HSYNC, VSYNC) and see if it changes anything for you in terms of this "dullness" you are seeing.  Also, what voltage are you supplying the display with?  What are the voltage levels of your signals?  When you say you changed the brightness to the full range, are you referring to the backlight?  Have you checked the backlight current to make sure it is within spec?

130
Graphic LCDs / Re: NHD-C12832A1Z-FS(RGB)-FBW-3V Backlight Color Control
« on: November 18, 2014, 08:42:52 AM »
1. Yes, all you need to supply is 3.3V to the interface board.
2. I'm sorry but there is no schematic available, however, the board is simply made up of the capacitors needed (as in the wiring diagram on page 4 of the display's datasheet, here: http://www.newhavendisplay.com/specs/NHD-C12832A1Z-FSRGB-FBW-3V.pdf), and the current limiting resistors for each color LED.  The pinout for the interface board can be seen here:
http://www.newhavendisplay.com/specs/NHD-PCB12832A1Zrev2.pdf

131
TFTs / Re: ILI9341 Command Delay
« on: November 18, 2014, 08:37:09 AM »
Sounds like you will need to implement a small delay if it is not working without it.  I didn't have any delays in my Arduino example code below because it operates at 16MHz:

Code: [Select]
//---------------------------------------------------------
/*
NHD_2_4_240320SF_CTXI_mega.ino
Program for writing to Newhaven Display 2.4 TFT with ILI9341 controller

(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

// /CS signal tied to GND
// IM0 signal tied to VDD

void comm_out(unsigned char c)
{
  digitalWrite(RS, LOW);
  PORTA = c;
  digitalWrite(WR, LOW);
  digitalWrite(WR, HIGH);
}

void data_out(unsigned char d)
{
  digitalWrite(RS, HIGH);
  PORTA = d;
  digitalWrite(WR, LOW);
  digitalWrite(WR, HIGH);
}
void disp()
{
unsigned int i;
comm_out(0x2C);              //command to begin writing to frame memory
for(i=0;i<38400;i++)         //fill screen with blue pixels
{
    data_out(0x00);
            data_out(0x1F);
            data_out(0x00);
            data_out(0x1F);
}
        for(i=0;i<38400;i++)         //fill screen with green pixels
{
    data_out(0x07);
            data_out(0xE0);
            data_out(0x07);
            data_out(0xE0);
        }
}

void setup()
{
  DDRC = 0xFF;   
  PORTC = 0x00;
  DDRA = 0xFF;
  PORTA = 0x00;
  digitalWrite(RD, HIGH);
  digitalWrite(WR, LOW);
  digitalWrite(RES, LOW);
  delay(250);
  digitalWrite(RES, HIGH);
  delay(250);
 
  comm_out(0x28);                                  //display off
  comm_out(0x11);  //exit SLEEP mode
 
  comm_out(0xCB);  //power control A
  data_out(0x39);
  data_out(0x2C);
  data_out(0x00);
  data_out(0x34);
  data_out(0x02);
 
  comm_out(0xCF);  //power control B
  data_out(0x00);
  data_out(0x81);
  data_out(0x30);
 
  comm_out(0xC0);
  data_out(0x26);  //power control 1
  data_out(0x04);  //second parameter for ILI9340 (ignored by ILI9341)
 
  comm_out(0xC1);
  data_out(0x11);                  //power control 2
 
  comm_out(0xC5);
  data_out(0x35);
  data_out(0x3E);  //VCOM control 1
 
  comm_out(0x36);
  data_out(0x88);                  //memory access control = BGR
 
  comm_out(0xB1);
  data_out(0x00);
  data_out(0x18);  //frame rate control
 
  comm_out(0xB6);
  data_out(0x0A);
  data_out(0xA2);  //display function control
 
  comm_out(0xC7);
  data_out(0xBE);                  //VCOM control 2
 
  comm_out(0x3A);
  data_out(0x55);                  //pixel format = 16 bit per pixel
 
  /*comm_out(0xE0);
  data_out(0x1F);                  //positive gamma correction
  data_out(0x1B);
  data_out(0x18);
  data_out(0x0B);
  data_out(0x0F);
  data_out(0x09);
  data_out(0x46);
  data_out(0xB5);
  data_out(0x37);
  data_out(0x0A);
  data_out(0x0C);
  data_out(0x07);
  data_out(0x07);
  data_out(0x05);
  data_out(0x00);
 
  comm_out(0xE1);
  data_out(0x00);                  //negative gamma correction
  data_out(0x24);
  data_out(0x27);
  data_out(0x04);
  data_out(0x10);
  data_out(0x06);
  data_out(0x39);
  data_out(0x74);
  data_out(0x48);
  data_out(0x05);
  data_out(0x13);
  data_out(0x38);
  data_out(0x38);
  data_out(0x3A);
  data_out(0x1F);*/
 
  comm_out(0xF2);                  //3g damma control
  data_out(0x02);                  //off
 
  comm_out(0x26);                  //gamma curve 3
  data_out(0x01);
 
  comm_out(0x2A);
  data_out(0x00);                  //column address set
  data_out(0x00);                  //start 0x0000
  data_out(0x00);
  data_out(0xEF);                  //end 0x00EF
 
  comm_out(0x2B);
  data_out(0x00);                  //page address set
  data_out(0x00);                  //start 0x0000
  data_out(0x01);
  data_out(0x3F);                  //end 0x003F
 
  comm_out(0x29);                  //display ON

  delay(10);
}

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

However, with faster micros, you will probably need to control some of the timing by use of delay(s).

All relevant timing information can be viewed on pages 238 - 241 in the ILI9341 datasheet, here: http://www.newhavendisplay.com/app_notes/ILI9341.pdf

132
Character LCDs / Re: NHD-0420D3Z-FL-GBW-3V Dropping characters over I2c
« on: November 14, 2014, 09:41:07 AM »
You're welcome!  This site should help:

http://www.gammon.com.au/forum/?id=10896

134
OLEDs / Re: NHD-1.27-12896UGC3, can't write data correctly, 4 wire spi
« on: November 14, 2014, 09:30:55 AM »
The set_column_address command uses 2 data parameters after you send it to the display.  You would need to setup the address, and issue the write_memory_start command before writing pixel data to the display.  Please refer to the below example code which has examples with the parallel and serial interface of the display:

http://www.newhavendisplay.com/app_notes/Arduino_OLED_12896.txt

135
Character LCDs / Re: NHD-0420D3Z-FL-GBW-3V Dropping characters over I2c
« on: November 11, 2014, 03:12:01 PM »
I'm not sure if this applies to the Uno as well as the Mega, but with the Arduino Mega I have used "TWBR = 152;" (sets I2C clock frequency to 50kHz) after I call "Wire.begin()" in the setup() function.
I would check the Arduino forums/documentation to confirm this works with the Uno too.

Pages: 1 ... 7 8 [9] 10 11 ... 24