Try downloading the pdf file called "how to use Inteligent LCDs" from Everyday Practical Electronics magazine = www.epemag.com is very useful. -----Mensaje original----- De: Robert A. LaBudde Para: PICLIST@MITVMA.MIT.EDU Fecha: Miircoles, 24 de Noviembre de 1999 01:36 a.m. Asunto: PIC control of LCD >I have to admit I'm confused about how to interface to a Hitachi 44780 >controlled LCD via 4-bits. > >I've got a number of sample programs from books and websites, and there >doesn't appear to be a unanimity on how to accomplish initialization of the >LCD. > >The most common initialization sequence is (after 15 ms startup delay): > >1. Send 0x'3' (8-bit interface, 1/2 of command) >2. Wait > 4.1 ms >3. Send 0x'3' >4. Wait 100 us >5. Send 0x'3' >6. Wait 100 us >7. Send 0x'2' (4-bit interface) >8. Wait 40 us >9. Send 0x'28 (4-bit interface, 2-line) >10. Wait 40 us. > >When I try this sequence with my 20 x 4 display, it doesn't reliably >initialize. So I went to the 44780 controller specification from the >Hitachi website, and I found that they recommended the following sequence >(after the 15 ms startup delay): > >1. Send 0x'2'. (4-bit interface, 1/2 of command) >2. Wait 40 us. >3. Send 0x'28' (4-bit, 2-line) >4. Wait 40 us. > >This sequence initializes the LCD reliably. It also makes sense, since the >0x'2' command would be logically interpreted by the controller as a switch >to 4-bit mode. Then the 0x'28' would be executed completely. > >My question is: What's with the extraneous three 0x'3' commands recommended >and used by others? Why are these even hypothetically necessary, since the >controller comes up in 8-bit mode by default anyway? > > > > >================================================================ >Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral@lcfltd.com >Least Cost Formulations, Ltd. URL: http://lcfltd.com/ >824 Timberlake Drive Tel: 757-467-0954 >Virginia Beach, VA 23464-3239 Fax: 757-467-2947 > >"Vere scire est per causae scire" >================================================================