I agree with the suggestions mentioned so far, especially regarding the timing. One other item: some LCDs are 4-bit only, even though there are pins for 8 data bits on the PCB. Sean On Fri, Jul 10, 2009 at 11:31 PM, Steve Maroney wro= te: > Dear gang, > > I have this LCD: http://www.futurlec.com/LED/LCD16x2.shtml > > I can write chars to the LCD and seems to work ok but when I move the > cursor to the 2nd line, and write to the LCD, nothing is displayed. > > To move the cursor the 2nd line, I clear the RS bit, send 0xC0, then > pulse the EN bit. > > The code works as expected on the OSHON PIC IDE/Simulator. =A0Anyone have > any ideas on what im doing wrong ? > > Before writing characters to the LCD, I have this small function to > setup the LCD: > > First I bring the RS bit low and bring the EN bit high > > movlw 0x38 =A0 =A0 =A0; 8bit, 2 line, 5x7 resolution > movwf PORTC > > then =A0I pulse the EN bit > > movlw 0x0C =A0 =A0 =A0 =A0 =A0 =A0 =A0; display on, cursor off > movwf PORTC > > pulse the EN bit again > > movlw 0x01 =A0 =A0 =A0 =A0 =A0 =A0 =A0; clear LCD display > movwf PORTC > > pulse the EN bit again > > finally I bring the RS bit high before returning from the routine. > > > Best Regards, > Steve Maroney > > Business Computer Support, LLC > Mobile Phone:504-914-4704 > Office Phone: 504-904-0266 > Fax: 866-871-7797 > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist