That's a good point, but you should be getting a garbled mess for characters on the first row if it were set up for 4 bits but you were treating it like an 8 bit display. Sean Breheny wrote: > 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 wrote: > >> 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. Anyone 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 ; 8bit, 2 line, 5x7 resolution >> movwf PORTC >> >> then I pulse the EN bit >> >> movlw 0x0C ; display on, cursor off >> movwf PORTC >> >> pulse the EN bit again >> >> movlw 0x01 ; 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