hi all,
first post - i registered to get help with this issue, any help is greatly appreciated.
i know it's a less popular LCD, but it's what I designed around... anyway - here's the scoop:
about four years ago i designed a development / test PCB with an optrex 51320 (w/ sed1565 controller) and after very little testing, it just worked. the pdf "Optrex_LCD-mod_Tech_Note" was very helpful - i used all of the parameter values given there, provided in code below. afterward, i'd planned a version-2 of that PCB and finally got around to populating that board recently.
now - i've got one of the boards built up using an Atmel AVR Mega128 and am using the following code to initialize the screen. so far, i've not seen the internal voltage pump turn on at all. ever. it just doesn't react. what i see instead is that the voltages on V1-V5 float up to +5V then slowly trickle down when probed with a 1M scope probe. Vout floats up to about +5V, then when probed it quickly trickles down to about 3.9V.
i've checked the usual suspects - there are no solder bridges under the LCD connector and there are no floating pads. i've had the micro generate 0x55 on the data and control ports, i probed the pins on the topside of the LCD connector with the LCD plugged in. i could see alternating 1s & 0s on every other pin - therefore every pin is driven and there are no solder bridges between neighboring pins.
as for timing, at first i was running at 8MHz, then i tried slowing down and running at 1MHz. now i've got delays sprinkled in during /write pulses and between writes. originally i was lifting /CS between writes, i found a user here that just left it low from first use and it seemed more efficient.
the LCD is connected as so:
the method i am currently trying to initiate the device:
so - does anyone see anything here? i can honestly say i'm stumped.
i've ported the code working from the old PCB (written for IAR) to avr-gcc on the new board. as far as i can see, the signals are all proper high / low and write timing should be very slow and stable. i'm seeing rise / fall times of about 15ns and the 'scope indicates the delays are being held as the code indicates. i've also tried shorter delays (which should be perfectly permissible down to reasonable execution rates) and i've tried cranking delays up to seconds between transitions...
none of this has started the internal charge pumps.
also - i've tried three LCDs - two new, one is a spare from when i built the first batch of boards years ago.
so - please tell me i'm missing something stupid
sorry for the long post - thanks for reading!
first post - i registered to get help with this issue, any help is greatly appreciated.
i know it's a less popular LCD, but it's what I designed around... anyway - here's the scoop:
about four years ago i designed a development / test PCB with an optrex 51320 (w/ sed1565 controller) and after very little testing, it just worked. the pdf "Optrex_LCD-mod_Tech_Note" was very helpful - i used all of the parameter values given there, provided in code below. afterward, i'd planned a version-2 of that PCB and finally got around to populating that board recently.
now - i've got one of the boards built up using an Atmel AVR Mega128 and am using the following code to initialize the screen. so far, i've not seen the internal voltage pump turn on at all. ever. it just doesn't react. what i see instead is that the voltages on V1-V5 float up to +5V then slowly trickle down when probed with a 1M scope probe. Vout floats up to about +5V, then when probed it quickly trickles down to about 3.9V.
i've checked the usual suspects - there are no solder bridges under the LCD connector and there are no floating pads. i've had the micro generate 0x55 on the data and control ports, i probed the pins on the topside of the LCD connector with the LCD plugged in. i could see alternating 1s & 0s on every other pin - therefore every pin is driven and there are no solder bridges between neighboring pins.
as for timing, at first i was running at 8MHz, then i tried slowing down and running at 1MHz. now i've got delays sprinkled in during /write pulses and between writes. originally i was lifting /CS between writes, i found a user here that just left it low from first use and it seemed more efficient.
the LCD is connected as so:
Code:
LCD pin Mega128 pin
IRS tied to +5V -- internal V5 resistor divider in use
C86 tied to +5V -- set I/O mode to 6800
/CS1 PORTF.3 -- chip select, active low
/RST PORTF.4 -- reset, active low
/A0 PORTF.5 -- command or data indicator - low indicates cmd
/WR PORTF.6 -- write, active low
/RD PORTF.7 -- read, active low -- kept high in normal operation
D0 PORTA.0
D1 PORTA.1
D2 PORTA.2
D3 PORTA.3
D4 PORTA.4
D5 PORTA.5
D6 PORTA.6
D7 PORTA.7
V1-5 1uF cer cap to GND
VR no connection
VOUT 10uF tant cap- to GND and CAP3-
CAP3- 10uF tant cap- to GND and VOUT
CAP1+ 10uF tant cap+ to CAP1-
CAP1- 10uF tant cap- to CAP1+
CAP2- 10uF tant cap- to CAP2+
CAP2+ 10uF tant cap+ to CAP2-
Code:
// set up LCD ports - defined in glcd.h
LCD_CTRL_DDR = 0xF8;
LCD_DATA_DDR = 0xFF;
// start up with /RESET low
LCD_CTRL = ~( LCD_RST );
LCD_DATA = 0x00;
// hold reset state for some time
_delay_us(200);
LCD_CTRL |= LCD_RST;
// drop chip select - held low as it's the only device on this bus
_delay_us(200);
LCD_CTRL &= ~ LCD_CS;
_delay_us(200);
// write reset command
LCD_DATA = RESET_DISPLAY; // 0xE2
LCD_CTRL &= ~ LCD_A0;
_delay_us(50);
LCD_CTRL &= ~ LCD_WR;
_delay_us(50);
LCD_CTRL |= LCD_WR;
_delay_us(50);
// write lcd bias - this was used successfully on previous board
// i've tried 1_7 // 0xA3
LCD_DATA = LCD_BIAS_1_9; // 0xA2
LCD_CTRL &= ~ LCD_A0;
_delay_us(50);
LCD_CTRL &= ~ LCD_WR;
_delay_us(50);
LCD_CTRL |= LCD_WR;
_delay_us(50);
// adc select normal
LCD_DATA = ADC_SELECT_NORMAL; // 0xA6
LCD_CTRL &= ~ LCD_A0;
_delay_us(50);
LCD_CTRL &= ~ LCD_WR;
_delay_us(50);
LCD_CTRL |= LCD_WR;
_delay_us(50);
//
LCD_DATA = COM_OUTPUT_NORMAL; // 0xC0
LCD_CTRL &= ~ LCD_A0;
_delay_us(50);
LCD_CTRL &= ~ LCD_WR;
_delay_us(50);
LCD_CTRL |= LCD_WR;
_delay_us(50);
// i've tried a range of values here... no luck
LCD_DATA = V5_RESISTOR_RATIO; // 0x21
LCD_CTRL &= ~ LCD_A0;
_delay_us(50);
LCD_CTRL &= ~ LCD_WR;
_delay_us(50);
LCD_CTRL |= LCD_WR;
_delay_us(50);
// set contrast (electronic volume in technote and other docs)
LCD_DATA = CONTRAST_SET; // 0x81
LCD_CTRL &= ~ LCD_A0;
_delay_us(50);
LCD_CTRL &= ~ LCD_WR;
_delay_us(50);
LCD_CTRL |= LCD_WR;
_delay_us(50);
// initial contrast value
// i've treid a range of values, this worked on previous board
LCD_DATA = CONTRAST_INIT; // 0x20
LCD_CTRL &= ~ LCD_A0;
_delay_us(50);
LCD_CTRL &= ~ LCD_WR;
_delay_us(50);
LCD_CTRL |= LCD_WR;
_delay_us(50);
// power setup - trying stepped writes per advice in forum post
LCD_DATA = 0x2C; // 0x2C
LCD_CTRL &= ~ LCD_A0;
_delay_us(50);
LCD_CTRL &= ~ LCD_WR;
_delay_us(50);
LCD_CTRL |= LCD_WR;
_delay_us(50);
LCD_DATA = 0x2E; // 0x2E
LCD_CTRL &= ~ LCD_A0;
_delay_us(50);
LCD_CTRL &= ~ LCD_WR;
_delay_us(50);
LCD_CTRL |= LCD_WR;
_delay_us(50);
LCD_DATA = 0x2F; // 0x2F
LCD_CTRL &= ~ LCD_A0;
_delay_us(50);
LCD_CTRL &= ~ LCD_WR;
_delay_us(50);
LCD_CTRL |= LCD_WR;
_delay_us(50);
// turn the display on...
LCD_DATA = DISPLAY_ON; // 0xAF
LCD_CTRL &= ~ LCD_A0;
_delay_us(50);
LCD_CTRL &= ~ LCD_WR;
_delay_us(50);
LCD_CTRL |= LCD_WR;
_delay_us(50);
i've ported the code working from the old PCB (written for IAR) to avr-gcc on the new board. as far as i can see, the signals are all proper high / low and write timing should be very slow and stable. i'm seeing rise / fall times of about 15ns and the 'scope indicates the delays are being held as the code indicates. i've also tried shorter delays (which should be perfectly permissible down to reasonable execution rates) and i've tried cranking delays up to seconds between transitions...
none of this has started the internal charge pumps.
also - i've tried three LCDs - two new, one is a spare from when i built the first batch of boards years ago.
so - please tell me i'm missing something stupid
sorry for the long post - thanks for reading!
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.