Hi Lukas, I had trouble going through your code. The big spacing isn't very readable. I sent this to someone a while ago. Pretty sure it worked OK You need to make sure that delays are long enough for the initialisation. Have you done that, based on your crystal ? Following is a working example for 4-bit mode, which is always helpful when you want to save I/O pins When (or if) you check Busy is up to you. The execution times for various commands are in the HD44780 datasheet so you can wait or go off and do something, or check Busy to see if it's clear before you attempt to write anything instead of waiting for the write to complete ;================================================ ; Initialise LCD screen ;================================================ lcd_init movlw 0x30 movwf portb bcf rs nop bcf rw nop bsf en nop bcf en call msdelay ;delay > 4.1ms call msdelay call msdelay call msdelay call msdelay bsf en ;write 0x30 again nop bcf en call msdelay ;delay > 100us bsf en ;write 0x30 again nop bcf en call msdelay ;delay > 100us movlw 0x38 ;2 lines, 5x7 font call write_c movlw 0x0c ;1+DCB = display on, no cursor, no blink call write_c movlw 0x01 ;display clear call write_c movlw 0x06 ;entry mode set, increment address call write_c return ;return from initialisation ;================================================ ; LCD commands ;================================================ line1 movlw 0x00 ;line 1, column 0 call address return line2 movlw 0x40 ;line 2, column 0 call address return address addlw 0x80 ;set high bit of address command call write_c return write_c bcf rs ;write command goto d_out write_d bsf rs ;write data d_out movwf portb bcf rw nop bsf en nop bcf en call busy return busy bsf rw ;set LCD RW for Read nop bcf rs bank1 movlw b'11111111' ;make d7 an input movwf trisb bank0 bsf en rdbusy btfsc portb,bflag ;loop until Busy Flag clear goto rdbusy bcf en nop bcf rw bank1 movlw b'00000000' ;d7 as output again movwf trisb bank0 return 4-bit, fast PIC. delay12 is a 12-instruction delay ;================================================ ; Initialise LCD screen ;================================================ lcd_init bcf rs delay12 bcf rw movlw 0x30 movwf portb movlw 0x00 movwf porta delay12 bsf en delay12 bcf en call msdelay ;delay > 4.1ms call msdelay call msdelay call msdelay call msdelay bsf en delay12 bcf en call msdelay ;delay > 100us bsf en delay12 bcf en call msdelay ;delay > 100us movlw 0x38 ;2 lines, 5x7 font call write_c movlw 0x0c ;1+DCB = display on, no cursor, no blink call write_c movlw 0x01 ;display clear call write_c movlw 0x06 ;entry mode set, increment address call write_c return ;return from initialisation ;================================================ ; LCD commands ;================================================ line1 movlw 0x00 ;line 1, column 0 l1p call address return line2 movlw 0x40 ;line 2, column 0 l2p call address return address addlw 0x80 ;set high bit of address command call write_c return write_c bcf rs ;write command delay12 bra d_out write_d bsf rs ;write data delay12 d_out movwf temp ;split data between PortA and PortB andlw 0xf0 movwf portb movlw 0xf0 andwf porta,w movwf temp0 ;preserve upper nybble of porta movlw 0x0f ;separate low nybble of data andwf temp,w addwf temp0,w ;add to upper nybble of porta movwf porta bcf rw delay12 bsf en delay12 bcf en delay12 call busy return busy bsf rw ;set LCD RW for Read delay12 bcf rs delay12 clrf portb delay12 movlw b'10000100' ;make b7 an input movwf trisb rdbusy bsf en delay12 btfss bflag ;loop until Busy Flag clear bra notbusy bcf en delay12 bra rdbusy notbusy bcf rw delay12 movlw b'00000100' ;b7 as output again movwf trisb return -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist