Re: Problem with LCD & PIC16C54C



Hi,

Yup the contrast voltage is -3V. The PIC is working becoz I tied a LED
to one of the o/p. However, the LCD still does not display. It could
be due to the wrong init. sequences or that data are not sent to the
LCD correctly.

;***************************** Initialize LCD
*******************************

CALL DELAY
CALL DELAY
CALL DELAY
BCF PORTA,LCD_RS
BCF PORTA,LCD_RW
CALL DELAY
CALL FUNCTIONSET
CALL FUNCTIONSET
CALL FUNCTIONSET
CALL SDELAY
MOVLW 0x3F ; Function set
MOVWF PORTB
CALL SENDTOLCD

CALL SDELAY
MOVLW 0x08 ; Display ON/OFF = display off, cursor off, blink off
MOVWF PORTB
CALL SENDTOLCD

CALL SDELAY
MOVLW 0x01 ; Clear Display
MOVWF PORTB
CALL SENDTOLCD
CALL DELAY
CALL DELAY
CALL DELAY
CALL DELAY
CALL DELAY
MOVLW 0x06 ; Entry Mode Set
MOVWF PORTB
CALL SENDTOLCD
CALL SDELAY

;************************************
FUNCTIONSET
CALL SDELAY
MOVLW 0x30 ; 2 line, display on
MOVWF PORTB

BSF PORTA,LCD_EN
CALL SDELAY
NOP
BCF PORTA,LCD_EN
CALL SDELAY
RETLW 0

SENDTOLCD
CALL SDELAY
BSF PORTA,LCD_EN
CALL SDELAY
NOP
BCF PORTA,LCD_EN
CALL SDELAY
RETLW 0

///////////////////////////////////////////////////

Any help is appreciated. btw .... could the problem be due to the 4Mhz
osc i am using becoz the data*** has a condition Fosc=270KHz


ywz

.