I am trying to interface with a LCD which uses the HD44780 interface. I am using a PIC16f73. I am trying to use the LCD in 4bit mode connected to PORTC. I am currently just getting a blank screen. I have put my code below. Can anybody see where I have gone wrong or suggest anything I can try please? include "p16f73.inc" CBLOCK 0x020 R_DEL1 R_DEL2 R_WDATA_TMP1 R_WDATA_TMP2 R_SEND_W_TMP RAM_PORTC R_BIT endc org 0 goto init org 4 init movlw 0xFF call delay bsf STATUS, RP0 movlw 0x000 movwf TRISC bcf OPTION_REG,5 bcf STATUS, RP0 clrf PORTC ;bcf PORTC, 4 movlw 0x004 call clear_PORTC_bit movlw 0x003 call w_to_data call pulse_e movlw 0x00A call delay movlw 0x003 call w_to_data call pulse_e movlw 0x004 call delay movlw 0x003 call w_to_data call pulse_e movlw 0x004 call delay movlw 0x002 call w_to_data call pulse_e movlw 0x004 call delay movlw b'00101000';interface length call send_w call delay_1ms call delay_1ms movlw b'00000010' call send_w call delay_1ms call delay_1ms movlw b'00010000' call send_w call delay_1ms call delay_1ms movlw b'00000110' ;Cursor Direction call send_w call delay_1ms call delay_1ms movlw b'00001111' call send_w call delay_1ms call delay_1ms mainloop ;bcf PORTC, 4 movlw 0x004 call clear_PORTC_bit movlw b'00000010' call send_w ;bsf PORTC, 4 movlw 0x004 call set_PORTC_bit call delay_1ms movlw 'H' call send_w goto mainloop pulse_e ;bsf PORTC, 5 movlw 0x005 call set_PORTC_bit nop nop nop nop ;bcf PORTC, 5 movlw 0x005 call clear_PORTC_bit call delay_1ms call delay_1ms return ; Calls the delay_1ms routine the number of times specified by ; the W register. delay movwf R_DEL2 delay_loop call delay_1ms decfsz R_DEL2, F goto delay_loop return ; When called gives a delay of about 1000 cycles, or 1ms at 4Mhz ; before the next instruction is executed. delay_1ms movlw d'248' movwf R_DEL1 delay_1ms_loop nop decfsz R_DEL1, F goto delay_1ms_loop return send_w movwf R_SEND_W_TMP swapf R_SEND_W_TMP, F movlw 0x0F andwf R_SEND_W_TMP, W call w_to_data call pulse_e swapf R_SEND_W_TMP, F movlw 0x0F andwf R_SEND_W_TMP, W call w_to_data call pulse_e return w_to_data movwf R_WDATA_TMP1 movf PORTC, W movwf R_WDATA_TMP2 bcf R_WDATA_TMP2, 0 bcf R_WDATA_TMP2, 1 bcf R_WDATA_TMP2, 2 bcf R_WDATA_TMP2, 3 btfsc R_WDATA_TMP1, 0 bsf R_WDATA_TMP2, 0 btfsc R_WDATA_TMP1, 1 bsf R_WDATA_TMP2, 1 btfsc R_WDATA_TMP1, 2 bsf R_WDATA_TMP2, 2 btfsc R_WDATA_TMP1, 3 bsf R_WDATA_TMP2, 3 movf R_WDATA_TMP2, W movwf PORTC return clear_PORTC_bit movwf R_BIT movfw PORTC movwf RAM_PORTC bcf RAM_PORTC, R_BIT movfw RAM_PORTC movwf PORTC return set_PORTC_bit movwf R_BIT movfw PORTC movwf RAM_PORTC bsf RAM_PORTC, R_BIT movfw RAM_PORTC movwf PORTC return end Stewart Abel -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist