My final project is to create a "DISTRIBUTED MESSAGE DISPLAY SYSTEM", USING "MASTER-SLAVE COMMUNICATION", where the "DESKTOP" acts as the "master" and the "Microcontroller+LCD" acts as the "slave".
Our 1st step was to interface the Microcontroller with the Desktop using MAX232 and a DB9 connector, trying to display some message at the Hyperterminal Screen of the Desktop. (Specifications: using 4Mhz oscillator, baud rate 9600, 0-5V supply). BUT WE HAVE NOT YET GOT THE DESIRED CHARACTERS DISPLAYED !!!
Now, We are trying to interface the microcontroller PIC16F877a with a LCD - JHD162A. (Specifications: 5Mhz oscillator, baud rate 9600, 0-5V supply). BUT NO RESULT ! ONLY THE CURSOR IS BLINKING AT THE BEGINNING !!!
CAN ANYONE PLZ HELP ??????? FIND OUT OUR FAULTS AND POSSIBLE SOLUTIONS PLZZZZZ !!!!!!

Here is the program that we have written, burnt in the MC and are still trying to display text in the LCD:
#INCLUDE <P16F877A.INC>
__CONFIG _CP_OFF & _CPD_OFF & _DEBUG_OFF & _LVP_OFF & _WRT_OFF & _BODEN_OFF & _PWRTE_ON & _WDT_OFF & _XT_OSC
COUNTA EQU 0x30
COUNTB EQU 0x64
ORG 0X000
GOTO MAIN
ORG 0X004
STOP
GOTO STOP
ORG 0X010
MAIN
MOVLW 0X00
BSF STATUS, 5 ; BANK 1
MOVWF TRISB ; SET PORT B AS O/P
MOVWF TRISA ; SET PORT A AS O/P
MOVWF TRISC
BCF STATUS, 5
MOVLW 0x38 ; 8 BIT DATA BUS AND 2 LINE DISPLAY
CALL COMD
BSF PORTC, 1
CALL DELAY
BCF PORTC, 1
MOVLW 0x0E ; TURN ON LCD AND CURSOR BLINKING
CALL COMD
BSF PORTC, 1
CALL DELAY
BCF PORTC, 1
MOVLW 0X80
CALL COMD
BSF PORTC, 1
CALL DELAY
BCF PORTC, 1
MOVLW 0X01
CALL COMD
BSF PORTC, 1
CALL DELAY
BCF PORTC, 1
LOOP:
MOVLW 0x31
CALL TEXT
BSF PORTC, 1
CALL DELAY
BCF PORTC, 1
GOTO LOOP
COMD: BCF PORTA, 1 ; RS=0 (INSTRUCTION REGISTER)
MOVWF PORTB ; COMMAND OR TEXT IN PORTB
BCF PORTA, 2 ; R/W=0
BSF PORTA, 0
CALL DELAY
BCF PORTA, 0
RETURN
TEXT:
BSF PORTA, 1 ; RS=1 (DATA REGISTER)
MOVWF PORTB ; COMMAND OR TEXT IN PORTB
BCF PORTA, 2 ; R/W=0
BSF PORTA, 0
CALL DELAY
BCF PORTA, 0
CALL DELAY
RETURN
RETURN
DELAY:
MOVLW D'11'
MOVWF COUNTB
NEW2 DECF COUNTB
BTFSS STATUS, Z ; SET/RESET?
GOTO NEW1 ; IF A IS NOT 0
GOTO NEW ; IF A IS 0
NEW1 MOVLW D'100'
MOVWF COUNTA
LOOP2 DECF COUNTA
BTFSS STATUS, Z ; SET/RESET?
GOTO LOOP1 ; IF A IS NOT 0
GOTO NEW2 ; IF A IS 0
LOOP1 MOVLW D'249'
LOOP3 ADDLW D'255'
BTFSS STATUS, Z ;IS ZERO FLAG SET?
GOTO LOOP3 ; NO
GOTO LOOP2 ; YES
NEW RETURN
END
"Almost" Good Answers: