LM016L LCD Display e Saat ve Tarih Yazdırma Uygulaması

LM016L LCD Display e Saat ve Tarih Yazdırma Uygulaması
      LM016L Lcd display e timer ile hesaplanan saat ve tarih yazdırma uygulaması



								LIST P=16F877A
	#INCLUDE "P16F877A.INC"
	TEMP EQU 0X20
	DEGER EQU 0X21
	DEGER2 EQU 0X22
	TMRSAYAC EQU 0X23
	SN EQU 0X24
	SN2 EQU 0X25
	DK EQU 0X26
	DK2 EQU 0X27
	SAAT EQU 0X28
	SAAT2 EQU 0X29
	SN_SAYAC EQU 0X2A
	SN2_SAYAC EQU 0X2B
	DK_SAYAC EQU 0X2C
	DK2_SAYAC EQU 0X2D
	SAAT_SAYAC EQU 0X2E
	SAAT2_SAYAC EQU 0X2F
	GUN EQU 0X30
	GUN_SAYAC EQU 0X31

	ORG 0X00
	CALL INIT
	GOTO MAIN
	ORG 0X04
	CALL KESME
MAIN
	GOTO MAIN
INIT
	BANKSEL TRISB
	CLRF TRISB

	BANKSEL PORTB
	CLRF PORTB
	MOVLW 0XFF
	MOVWF PORTC
	
	MOVLW 0X00
	MOVWF SN
	MOVLW 0X00
	MOVWF SN2
	MOVLW 0X00
	MOVWF DK
	MOVLW 0X00
	MOVWF DK2
	MOVLW 0X00		;0X00
	MOVWF SAAT	
	MOVLW 0X00		;0X00
	MOVWF SAAT2
	MOVLW 0X08
	MOVWF GUN

	MOVLW 0X0A
	MOVWF SN_SAYAC
	MOVLW 0X06
	MOVWF SN2_SAYAC
	MOVLW 0X0A
	MOVWF DK_SAYAC
	MOVLW 0X06			;06
	MOVWF DK2_SAYAC
	MOVLW 0X0A			;0A
	MOVWF SAAT_SAYAC
	MOVLW 0X02			;0X02
	MOVWF SAAT2_SAYAC
	MOVLW 0X04			;0X04
	MOVWF GUN_SAYAC

	BANKSEL T1CON
	BSF T1CON,TMR1ON
	BCF T1CON,TMR1CS
	BSF T1CON,T1CKPS0	
	BSF T1CON,T1CKPS1	
	BANKSEL PIR1
	BCF PIR1,TMR1IF
	BANKSEL PIE1
	BSF PIE1,0

	BANKSEL INTCON
	BSF INTCON,GIE
	BSF INTCON,PEIE
	BANKSEL TMR1L
	MOVLW 0X58		;0X58
	MOVWF TMR1L
	MOVLW 0X9E		;9E
	MOVWF TMR1H
					
	MOVLW 0X0A		;0A
	MOVWF TMRSAYAC
	RETURN
TEMIZLE
	MOVLW 0X02
	CALL KOMUT_YAZ
	MOVLW 0X0C
	CALL KOMUT_YAZ
	MOVLW 0X28
	CALL KOMUT_YAZ
	MOVLW 0X83
	CALL KOMUT_YAZ
	RETURN
	
KOMUT_YAZ
	MOVWF TEMP
	SWAPF TEMP,W
	CALL KOMUT_GONDER
	MOVF TEMP,W
	CALL KOMUT_GONDER
	RETURN

KOMUT_GONDER
	ANDLW 0X0F
	BANKSEL PORTB
	MOVWF PORTB
	BCF PORTB,4
	BSF PORTB,5
	CALL GECIKME
	BCF PORTB,5
	RETURN

KARAKTER_GIR

	MOVLW '1'
	CALL KARAKTER_YAZ
	MOVF GUN,W
	CALL SAYILAR
	CALL KARAKTER_YAZ
	MOVLW '.'
	CALL KARAKTER_YAZ
	MOVLW '1'
	CALL KARAKTER_YAZ
	MOVLW '1'
	CALL KARAKTER_YAZ
	MOVLW '.'
	CALL KARAKTER_YAZ
	MOVLW '2'
	CALL KARAKTER_YAZ
	MOVLW '0'
	CALL KARAKTER_YAZ
	MOVLW '1'
	CALL KARAKTER_YAZ
	MOVLW '6'
	CALL KARAKTER_YAZ
	CALL SATIR2
	
	MOVF SAAT2,W
	CALL SAYILAR
	CALL KARAKTER_YAZ
	MOVF SAAT,W
	CALL SAYILAR
	CALL KARAKTER_YAZ
	MOVLW ':'
	CALL KARAKTER_YAZ
	MOVF DK2,W
	CALL SAYILAR
	CALL KARAKTER_YAZ
	MOVF DK,W
	CALL SAYILAR
	CALL KARAKTER_YAZ
	MOVLW ':'
	CALL KARAKTER_YAZ
	MOVF SN2,W
	CALL SAYILAR
	CALL KARAKTER_YAZ

	MOVF SN,W
	CALL SAYILAR
	CALL KARAKTER_YAZ
	RETURN
SATIR2
	MOVLW 0XC4
	CALL KOMUT_YAZ	
	RETURN

KARAKTER_YAZ
	MOVWF TEMP
	SWAPF TEMP,W
	CALL KARAKTER_GONDER
	MOVF TEMP,W
	CALL KARAKTER_GONDER
	RETURN
KARAKTER_GONDER
	ANDLW 0X0F
	MOVWF PORTB
	BANKSEL PORTB
	BSF PORTB,4
	BSF PORTB,5
	CALL GECIKME
	BCF PORTB,5
	RETURN

SAYILAR
	ADDWF PCL,F
	RETLW '0'
	RETLW '1'
	RETLW '2'
	RETLW '3'
	RETLW '4'
	RETLW '5'
	RETLW '6'
	RETLW '7'
	RETLW '8'
	RETLW '9'
	RETURN

KESME
	BCF INTCON,GIE
	BCF PIR1,0
	CALL TEMIZLE
	CALL KARAKTER_GIR
	DECFSZ TMRSAYAC,F
	GOTO DEVAM_ET
	MOVLW 0X58			;0X58
	MOVWF TMR1L
	MOVLW 0X9E			;0X9E
	MOVWF TMR1H
	MOVLW 0X0A			;0A
	MOVWF TMRSAYAC
	DECFSZ SN_SAYAC,F
	GOTO SN_ARTIR
	GOTO SN2_ARTIR
SN_ARTIR	
	INCF SN,F
	GOTO DEVAM_ET
SN2_ARTIR
	MOVLW 0X0A
	MOVWF SN_SAYAC
	CLRF SN
	INCF SN2,F
	DECFSZ SN2_SAYAC,F
	GOTO DEVAM_ET
	GOTO DK_ARTIR
DK_ARTIR
	MOVLW 0X06
	MOVWF SN2_SAYAC
	CLRF SN2
	INCF DK,F
	DECFSZ DK_SAYAC,F
	GOTO DEVAM_ET
	GOTO DK2_ARTIR
DK2_ARTIR
	MOVLW 0X0A
	MOVWF DK_SAYAC
	CLRF DK
	INCF DK2,F
	DECFSZ DK2_SAYAC,F
	GOTO DEVAM_ET
	GOTO SAAT_ARTIR
SAAT_ARTIR
	MOVLW 0X06
	MOVWF DK2_SAYAC
	CLRF DK2
	INCF SAAT,F
	DECFSZ SAAT_SAYAC,F
	GOTO DEVAM_ET
	GOTO SAAT2_ARTIR
SAAT2_ARTIR
	MOVLW 0X0A
	MOVWF SAAT_SAYAC
	CLRF SAAT
	INCF SAAT2,F
	DECFSZ SAAT2_SAYAC,F
	GOTO DEVAM_ET
	GOTO GUN_ARTIR
GUN_ARTIR
	DECFSZ GUN_SAYAC
	GOTO DEVAM_ET
	CLRF SAAT2
	INCF GUN,F
	CALL INIT
	GOTO MAIN
DEVAM_ET 
	BSF INTCON,GIE
	GOTO MAIN
	RETURN

GECIKME2
	MOVLW 0XFF
	MOVWF DEGER
	GOTO DONGU
GECIKME
	MOVLW 0X10
	MOVWF DEGER
DONGU
	MOVLW 0XFB
	MOVWF DEGER2
DONGU2
	DECFSZ DEGER2,F
	GOTO DONGU2
	DECFSZ DEGER,F
	GOTO DONGU
	RETURN
END
						



Proje kodlarını ve Proteus ISIS Tasarımını İndirmek İçin Aşağıdaki Bağlantıya Tıklayınız
download





Gönderen : Admin
1225
14-09-2017