Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hi to all. I wrote again and again an assembler program for 16F877A to write S and A letters to lcd module with hd 44780. ...Ladies and gentylmen, I cant make it work...Where is my mistake...please help ..( I spend 2 months help please)
LIST P=16F877A
INCLUDE "P16F877A.INC"
BSF STATUS,5
MOVLW h'00'
MOVWF TRISB
MOVWF TRISD
BCF STATUS,5
POLIT EQU h'0D'
ZOLITE EQU h'0E'
CLRF PORTB
CLRF PORTD
CALL UZUNG
CALL UZUNG
CALL UZUNG
CALL UZUNG
CALL UZUNG
CALL UZUNG
MOVLW h'01'
MOVWF PORTB ;EKRANI SILDIM
CALL UZUNG
CALL MESGUL
MOVLW h'02' ;RETURN TO HOME
MOVWF PORTB
CALL UZUNG
CALL MESGUL
MOVLW h'3C'
MOVWF PORTB ;8 BIT INTERFACE,5X7DOT
CALL UZUNG
CALL MESGUL
MOVLW h'07'
MOVWF PORTB ;SAGA HAREKET ET
CALL UZUNG
CALL MESGUL
MOVLW h'0F'
MOVWF PORTB ;CURSOR ALT CIZGI VAR YANIP SONME VAR
CALL UZUNG
CALL MESGUL
MOVLW h'80'
MOVWF PORTB ;ILK YAZILACAK HARFIN ADRESI
CALL UZUNG
CALL MESGUL
HARF
BSF PORTD,4
MOVLW h'4F'
MOVWF PORTB ;ILK HARFIM O
CALL UZUNG
CALL MESGUL
BCF PORTD,5
CALL UZUNG
BCF PORTD,4
BSF PORTD,6
CALL UZUNG
BCF PORTD,6
CALL UZUNG
BSF PORTD,6
CALL UZUNG
BCF PORTD,6
CALL UZUNG
CALL UZUNG
GOTO HARF
UZUNG
MOVLW h'FF'
MOVWF POLIT
DONGU1
MOVLW h'FF'
MOVWF ZOLITE
DONGU2
DECFSZ ZOLITE
GOTO DONGU2
DECFSZ POLIT
GOTO DONGU1
RETURN
MESGUL
BSF STATUS,5
MOVLW h'0FF'
MOVWF TRISB
BCF STATUS,5
BCF PORTD,4
BSF PORTD,5
BSF PORTD,6
MOVF PORTB,0
BCF PORTD,6
ANDLW h'80'
BTFSS STATUS,2
GOTO MESGUL
DEVAM
BCF PORTD,5
BSF STATUS,5
MOVLW h'00'
MOVWF TRISB
BCF STATUS,5
RETURN
END
please find the mplab files compiled as zip fileI can erase notes...remain will be pure assembler
otherwise I can translate notes from turkish to english..
after return you may try to use picsimulatoride from Oshon Software Homepage. they have a time limited demo version.Dear Sarma..I am not in my home ( unfortunately in a night shift) and I cant use mplab program as this computer has not it ..
I changed pic..I programmed 3 different pics and tried. no...then I molded a trimpot to third pin of lcd and contacted trim to +5 V....no......this is a little detail of my project but it made 2 month delay..I will be crazy
I put my program to simulator which I got from above. Program works without problem ..but it doesnt work in real circuit. I changed all components of circuit with new equals. can my mistake be in configuration bits..?