Tarun Grover wrote: > I've recently completed a project involving an LCD using this same > controller. What I found is that with the 2 LCD's I was using for testing, > this initialization routine did not work. What I found DID work was when I > left out > the first 3 'write4(3)' instructions. Now, this goes against > everything I've read on the internet and from Hitachi's Datasheet. I > only found 1 instance where someone used a different initialization > scheme and this seemed to work for me. > > Was there anything wrong with what I was doing or do different LCD's behave > differently (even though they use the same controller)? > > I had trouble with some VARITRONIX LCDs, So here is what works till now for about 10 different LCD's -- - Extra delay in Init procedure, after 4-bits setting, -- needed for VARITRONIX MDLS-16268-series delay_1mS ( 40 ) -- even long enough for Vcc as low as 2.7V HD44780_DataCmd_pin = low -- select command _HD44780_write_low_nibble ( 0b_0011 ) -- first init delay_1mS ( 5 ) -- extra delay _HD44780_write_low_nibble ( 0b_0011 ) -- second init delay_10uS( 10 ) -- extra delay _HD44780_write_low_nibble ( 0b_0011 ) -- third init _HD44780_write_low_nibble ( 0b_0010 ) -- set 4-bit interface delay_10uS( _HD44780_short_delay ) -- FOR SOME DISPLAYS (VARITRONIX) required delay _HD44780_Command( 0b_0010_1000 ) -- two lines, 5x7 (high nibble) _HD44780_Command( 0b_0000_1111 ) -- display on, cursor on, blink on _HD44780_Command( 0b_0000_0001 ) -- clear display _HD44780_Command( 0b_0000_0110 ) -- increment and no shift Stef Mientki -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist