Nigel Goodwin said:
Try posting your initialisation code.
Ok, I'll post it, but it's not very pretty..
; RA0..RA4, RB5, RA6..RA7 Are LCD Data outputs 1..8
; DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
; RA7 RA6 RB5 RA4 RA3 RA2 RA1 RA0
;
; RB7 is RS (Register Select) & RB6 is E (Enable)
; RS=0 Instruction, RS=1 Character, E=0 Inputs HiImp, E=1 Write Enabled
; Initialize the LCD
BCF PORTB,7 ; Set LCD for Inst.
MOVLW b'00000001' ; Clear Display
MOVWF PORTA ; Push instruction
BCF PORTB,5 ; Set bit 5
BSF PORTB,6 ; Set Enable
CALL DELAY ; General Delay
BCF PORTB,6 ; Clear Enable
MOVLW b'00111000' ; Function Set. 8-bit transfer and address type
MOVWF PORTA ; Push instruction
BSF PORTB,5 ; Set bit 5
BSF PORTB,6 ; Set Enable
CALL DELAY ; General Delay
BCF PORTB,6 ; Clear Enable
MOVLW b'00001110' ; Turn on the display and cursor
MOVWF PORTA ; Push instruction
BCF PORTB,5 ; Clear bit 5
BSF PORTB,6 ; Set Enable
CALL DELAY ; General Delay
BCF PORTB,6 ; Clear Enable
MOVLW b'00000110' ; Set entry mode
MOVWF PORTA ; Push instruction
BCF PORTB,5 ; Clear bit 5
BSF PORTB,6 ; Set Enable
CALL DELAY ; General Delay
BCF PORTB,6 ; Clear Enable