- x
PIC16C54'den çeviri 16f84'de
3 Cevap351 Görüntüleme
Bu konudaki kullanıcılar: hiç
  Seçkin Yorumlar Sistem Belirtin Yazdır
Sayfa: [1]
Giriş
Mesaj


 
557 Mesaj
10 Ocak 2006; 7:55:17 

Saygıdeğer arkadaşlar PIC16C54 için yazılmış programı PIC16F84A ya çeviri yaparken 5 hata veriyor.Bu hataları nasıl düzeltebilirim.Saygılarımla.Şimdiden teşekkürler.
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 1


LOC OBJECT CODE LINE SOURCE TEXT
VALUE

00001 processor 16F84A
00002 #include <P16F84A.INC>
00001 LIST
00002 ; P16F84A.INC Standard Header File, Version 2.00 Microchip Technology, Inc.
00134 LIST
2007 3FFF 00003 __config _CP_OFF & _PWRTE_OFF & _WDT_ON & _RC_OSC ; 0x3FFF
00004 ; __idlocs 0xFF, 0xFF, 0xFF, 0xFF
00005 ; ---------------------------------------------------
00006 ; ------- OTO ALARM Ver. 1 -----------------
00007 ;----------------------------------------------------
00008 ; Elektronic Word
00009 ;mr fisher
00010
00011 ; ----- BIT TANIMLAMALAR
00012 ;====== PORT B
Warning[207]: Found label after column 1. (SIREN)
00000000 00013 SIREN EQU 0 ; 1= CAL
Warning[207]: Found label after column 1. (MK_AC)
00000001 00014 MK_AC EQU 1 ; MERKEZI KILIT 1=CEK
Warning[207]: Found label after column 1. (SINYAL)
00000002 00015 SINYAL EQU 2 ; 1=YAN
Warning[207]: Found label after column 1. (MK_KAPA)
00000003 00016 MK_KAPA EQU 3 ; MERKEZI KILIT 1=CALIS
Warning[207]: Found label after column 1. (UK1)
00000004 00017 UK1 EQU 4 ; UZ KUM OTO ARAMA 1=CALIS
Warning[207]: Found label after column 1. (UK2)
00000005 00018 UK2 EQU 5 ; UZ KUM KILIT 1=CALIS
Warning[207]: Found label after column 1. (JINP1)
00000006 00019 JINP1 EQU 6
Warning[207]: Found label after column 1. (JINP2)
00000007 00020 JINP2 EQU 7
00021
00022
00023
00024 ;====== PORT A
Warning[207]: Found label after column 1. (LED)
00000000 00025 LED EQU 0 ;JAMPER INP
Warning[207]: Found label after column 1. (KAPI)
00000001 00026 KAPI EQU 1 ; KAPI GIRIS 0=ACIK
00027
00028
00029 ;======= BITFLAGS
Warning[207]: Found label after column 1. (TOGGLE)
00000000 00030 TOGGLE EQU 0 ;1 SN FLAG
Warning[207]: Found label after column 1. (SINYALBUF)
00000001 00031 SINYALBUF EQU 1
Warning[207]: Found label after column 1. (FLAS)
00000002 00032 FLAS EQU 2
Warning[207]: Found label after column 1. (SIRENBUF1)
00000003 00033 SIRENBUF1 EQU 3 ;ACMA KAPAMA SIREN UYARISI ENABLE
Warning[207]: Found label after column 1. (SIRENBUF2)
00000004 00034 SIRENBUF2 EQU 4 ;ALARM SIREN ENABLE
00035
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 2


LOC OBJECT CODE LINE SOURCE TEXT
VALUE

00036
00037 ;======= FLAGS2
Warning[207]: Found label after column 1. (KILITKUR)
00000000 00038 KILITKUR EQU 0 ;ALARM KURMA ISLEMI BASLA
Warning[207]: Found label after column 1. (ALFLAG)
00000001 00039 ALFLAG EQU 1 ;ALARM VERILDI
00040
Warning[207]: Found label after column 1. (ZONE)
00000004 00041 ZONE EQU 4 ;ALARM ALINAN ZONE 0=KAPI 1=GOZ,DARBE
Warning[207]: Found label after column 1. (PANIK)
00000005 00042 PANIK EQU 5
00043
00044 ; ---- BYTE TANIMLAMALAR
Warning[207]: Found label after column 1. (BITFLAGS)
00000007 00045 BITFLAGS EQU H'07' ;BIT REGISTER
Warning[207]: Found label after column 1. (FLAGS2)
00000008 00046 FLAGS2 EQU H'08' ;BIT REGISTER
Warning[207]: Found label after column 1. (TIMBUF)
00000009 00047 TIMBUF EQU H'09' ;TIMER BUFFER
Warning[207]: Found label after column 1. (GERISAY)
0000000A 00048 GERISAY EQU H'0A' ;KILIT ACILINCA TEKRAR KILITLEME SURESI
Warning[207]: Found label after column 1. (ROLSURE)
0000000B 00049 ROLSURE EQU H'0B' ;ROLE CEKILI KALMA SURESI
Warning[207]: Found label after column 1. (SINYALSAY)
0000000C 00050 SINYALSAY EQU H'0C' ;SINYAL FLASH SAYISI
Warning[207]: Found label after column 1. (SIRENSAY)
0000000D 00051 SIRENSAY EQU H'0D' ;SIREN CALMA SURESI
Warning[207]: Found label after column 1. (KURSAY)
0000000E 00052 KURSAY EQU H'0E' ;KAPI ACIKKEN KURMADA UYARI SURESI
Warning[207]: Found label after column 1. (UKDISSAY)
0000000F 00053 UKDISSAY EQU H'0F' ;UZAKTAN KUMANDA DISABLE SURESI
Warning[207]: Found label after column 1. (KURDELAY)
00000010 00054 KURDELAY EQU H'10' ;KAPIYI KAPATTIKTAN SONRA KILITLEME GECIKMESI
Warning[207]: Found label after column 1. (DURUM)
00000011 00055 DURUM EQU H'11'
00056 ; EQU H'12'
00057 ; EQU H'13'
00058 ; EQU H'14'
Warning[207]: Found label after column 1. (BUTBAS)
00000015 00059 BUTBAS EQU H'15' ;BUTON OKUMA SAYISI
00060 ; EQU H'1F'
00061
00062 include "P16F84A.INC"
00135 LIST
00136 ; P16F84A.INC Standard Header File, Version 2.00 Microchip Technology, Inc.
Message[310]: Superseding current maximum RAM and RAM map.
00268 LIST
00063 ; *****************************
0000 00064 INSTAL
0000 3002 00065 START MOVLW H'02'
Warning[224]: Use of this instruction is not recommended.
0001 0062 00066 OPTION
0002 30F0 00067 MOVLW B'11110000' ;0=CIKIS
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 3


LOC OBJECT CODE LINE SOURCE TEXT
VALUE

Warning[224]: Use of this instruction is not recommended.
0003 0066 00068 TRIS PORTB
0004 30FE 00069 MOVLW B'11111110' ;0=CIKIS
Warning[224]: Use of this instruction is not recommended.
0005 0065 00070 TRIS PORTA
00071
00072
0006 1186 00073 BCF PORTB,MK_KAPA
0007 1086 00074 BCF PORTB,MK_AC
0008 1106 00075 BCF PORTB,SINYAL
Warning[219]: Invalid RAM location specified.
0009 1087 00076 BCF BITFLAGS,SINYALBUF
000A 1008 00077 BCF FLAGS2,KILITKUR
Warning[219]: Invalid RAM location specified.
000B 1107 00078 BCF BITFLAGS,FLAS
000C 1088 00079 BCF FLAGS2,ALFLAG
Warning[219]: Invalid RAM location specified.
000D 1187 00080 BCF BITFLAGS,SIRENBUF1
000E 1288 00081 BCF FLAGS2,PANIK
000F 018F 00082 CLRF UKDISSAY
0010 018B 00083 CLRF ROLSURE
0011 018C 00084 CLRF SINYALSAY
0012 018A 00085 CLRF GERISAY
0013 018E 00086 CLRF KURSAY
0014 0190 00087 CLRF KURDELAY
00088 ;========================================================================
Error[113] : Symbol not previously defined (RTCC)
0015 0800 00089 MAIN MOVF RTCC,0
0016 1D03 00090 BTFSS STATUS,Z
0017 2815 00091 GOTO MAIN
00092
0018 3006 00093 MOVLW .6
Error[113] : Symbol not previously defined (RTCC)
0019 0080 00094 MOVWF RTCC
001A 0064 00095 CLRWDT
001B 300F 00096 MOVLW B'00001111' ;0=CIKIS
Warning[224]: Use of this instruction is not recommended.
001C 0066 00097 TRIS PORTB
00098
001D 30FC 00099 MOVLW B'11111100'
Warning[224]: Use of this instruction is not recommended.
001E 0065 00100 TRIS PORTA
00101
00102
001F 2033 00103 CALL SIRENKONT
0020 0A89 00104 INCF TIMBUF,1
0021 1903 00105 BTFSC STATUS,Z
0022 2867 00106 GOTO SANIYEOK ; MSN DE BIR GIT
0023 00107 SANOK_DON
00108 ;KAPI ACILINCA GERI SAYMAYI SIFIRLA
0023 1C85 00109 BTFSS PORTA,KAPI
0024 018A 00110 CLRF GERISAY
00111
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 4


LOC OBJECT CODE LINE SOURCE TEXT
VALUE

0025 0064 00112 CLRWDT
0026 2056 00113 CALL SENSKONT
0027 203F 00114 CALL KURKONT
0028 202A 00115 CALL ZONEGOSTER
0029 28C2 00116 GOTO UKOKU
00117 ;========================================================================
002A 00118 ZONEGOSTER ;E470
002A 0811 00119 MOVF DURUM,0 ;ALARM DEVRE DISIMI
002B 1D03 00120 BTFSS STATUS,Z
002C 3400 00121 RETLW .0
00122 ;ALARM DEVRE DISI
002D 1C85 00123 BTFSS PORTA,KAPI ;KAPI KAPALIMI
002E 2831 00124 GOTO ZONGOS_1
002F 1005 00125 BCF PORTA,LED
0030 3400 00126 RETLW .0
0031 00127 ZONGOS_1
0031 1405 00128 BSF PORTA,LED
0032 3400 00129 RETLW .0
00130 ;========================================================================
0033 00131 SIRENKONT ;E470
0033 0064 00132 CLRWDT
Warning[219]: Invalid RAM location specified.
0034 1987 00133 BTFSC BITFLAGS,SIRENBUF1
0035 283C 00134 GOTO SIRK_2 ;SIRENBUF1 =1 SIRK_2 YE ATLA
0036 00135 SIRK_3
Warning[219]: Invalid RAM location specified.
0036 1A07 00136 BTFSC BITFLAGS,SIRENBUF2
0037 283A 00137 GOTO SIRK_1
0038 1006 00138 BCF PORTB,SIREN ;SIREN CALMA
0039 3400 00139 RETLW .0
003A 00140 SIRK_1 ;SIREN CAL
003A 1406 00141 BSF PORTB,SIREN
003B 3400 00142 RETLW .0
003C 00143 SIRK_2
003C 1F06 00144 BTFSS PORTB,JINP1
003D 283A 00145 GOTO SIRK_1
003E 2836 00146 GOTO SIRK_3
00147 ;--------------------------------------------------
003F 00148 KURKONT ;ALARM KURULURKEN KAPININ KAPANMASINI KONTROL EDER
00149 ;E470
003F 1C08 00150 BTFSS FLAGS2,KILITKUR ;KURMA ISLEMI BASLAMISMI
0040 3400 00151 RETLW .0
0041 0064 00152 CLRWDT
0042 1C85 00153 BTFSS PORTA,KAPI ;KAPI KAPALIMI
0043 2853 00154 GOTO KURK_1
00155
0044 0810 00156 MOVF KURDELAY,0 ;KAPATTIKTAN SONRAKI KILITLEME SURESI
0045 1903 00157 BTFSC STATUS,Z
0046 2849 00158 GOTO KURK_2
0047 0390 00159 DECF KURDELAY,1
0048 3400 00160 RETLW .0
0049 3002 00161 KURK_2 MOVLW .2
004A 0091 00162 MOVWF DURUM ;KURMA ISLEMI BASLA
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 5


LOC OBJECT CODE LINE SOURCE TEXT
VALUE

00163
004B 3009 00164 MOVLW .9 ;UK OKUMA DISABLE SURESI
004C 008F 00165 MOVWF UKDISSAY
004D 1586 00166 BSF PORTB,MK_KAPA ;KILIT KAPAMA ROLESI CEK
004E 018E 00167 CLRF KURSAY
004F 1008 00168 BCF FLAGS2,KILITKUR
0050 3008 00169 MOVLW .8
0051 008B 00170 MOVWF ROLSURE
0052 3400 00171 KURK_CIK RETLW .0
0053 00172 KURK_1
0053 30FA 00173 MOVLW .250
0054 0090 00174 MOVWF KURDELAY
0055 3400 00175 RETLW .0
00176
00177 ;--------------------------------------------------
0056 00178 SENSKONT ;ALARM KURULUYKEN SENSORLERI KONTROL EDER
00179 ;E470
0056 3002 00180 MOVLW .2
0057 0211 00181 SUBWF DURUM,0
0058 1D03 00182 BTFSS STATUS,Z
0059 3400 00183 RETLW .0
005A 0064 00184 CLRWDT
005B 1885 00185 BTFSC PORTA,KAPI ;KAPI KONTROL
005C 3400 00186 RETLW .0
005D 1208 00187 BCF FLAGS2,ZONE
005E 3078 00188 SENSK_1 MOVLW .120
005F 008D 00189 MOVWF SIRENSAY
0060 3078 00190 MOVLW .120
0061 008C 00191 MOVWF SINYALSAY
0062 1488 00192 BSF FLAGS2,ALFLAG
Warning[219]: Invalid RAM location specified.
0063 1607 00193 BSF BITFLAGS,SIRENBUF2
0064 3003 00194 MOVLW .3
0065 0091 00195 MOVWF DURUM
0066 3400 00196 SENSK_C RETLW .0
00197 ;--------------------------------------------------
0067 00198 SANIYEOK ;E470
0067 0064 00199 CLRWDT
0068 3083 00200 MOVLW .131 ;TIMBUF I 250 MSN YE AYARLA
0069 0089 00201 MOVWF TIMBUF
Warning[219]: Invalid RAM location specified.
006A 1C07 00202 BTFSS BITFLAGS,TOGGLE ;TOGGLE BITI CEVIR
006B 286E 00203 GOTO SANOK_1
Warning[219]: Invalid RAM location specified.
006C 1007 00204 BCF BITFLAGS,TOGGLE
006D 286F 00205 GOTO SANOK_2
Warning[219]: Invalid RAM location specified.
006E 1407 00206 SANOK_1 BSF BITFLAGS,TOGGLE
00207 ;------------------
006F 0811 00208 SANOK_2 MOVF DURUM,0 ;ALARM KURULUYSA LED FLAS YAP
0070 1D03 00209 BTFSS STATUS,Z
0071 2875 00210 GOTO SANOK_12
00211
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 6


LOC OBJECT CODE LINE SOURCE TEXT
VALUE

0072 1808 00212 BTFSC FLAGS2,KILITKUR
0073 2875 00213 GOTO SANOK_12
0074 287F 00214 GOTO SANOK_3
0075 1405 00215 SANOK_12 BSF PORTA,LED ;KILITLI
0076 1888 00216 BTFSC FLAGS2,ALFLAG ;ALARM VERILDIYSE LED DIREK YAN
0077 2880 00217 GOTO SANOK_4
0078 3001 00218 MOVLW .1 ;DURUM 1 DE LED DIREK YAN
0079 0211 00219 SUBWF DURUM,0
007A 1903 00220 BTFSC STATUS,Z
007B 2880 00221 GOTO SANOK_4
Warning[219]: Invalid RAM location specified.
007C 1C07 00222 BTFSS BITFLAGS,TOGGLE
007D 1005 00223 BCF PORTA,LED
007E 2880 00224 GOTO SANOK_4
007F 1005 00225 SANOK_3 BCF PORTA,LED ;KILITLI DEGIL
0080 00226 SANOK_4 ;----------------------ROLE BIRAKMA KONTROLU
0080 080B 00227 MOVF ROLSURE,0
0081 1903 00228 BTFSC STATUS,Z
0082 2887 00229 GOTO SANOK_5
0083 0B8B 00230 DECFSZ ROLSURE,1
0084 2887 00231 GOTO SANOK_5
0085 1086 00232 BCF PORTB,MK_AC
0086 1186 00233 BCF PORTB,MK_KAPA
0087 00234 SANOK_5 ;---------------------SINYAL FLAS
0087 080C 00235 MOVF SINYALSAY,0
0088 1903 00236 BTFSC STATUS,Z
0089 2899 00237 GOTO SANOK_6
Warning[219]: Invalid RAM location specified.
008A 1907 00238 BTFSC BITFLAGS,FLAS
008B 2891 00239 GOTO SANOK_7
Warning[219]: Invalid RAM location specified.
008C 1487 00240 BSF BITFLAGS,SINYALBUF
Warning[219]: Invalid RAM location specified.
008D 1507 00241 BSF BITFLAGS,FLAS
Warning[219]: Invalid RAM location specified.
008E 1587 00242 BSF BITFLAGS,SIRENBUF1
008F 1506 00243 BSF PORTB,SINYAL
0090 2899 00244 GOTO SANOK_6
Warning[219]: Invalid RAM location specified.
0091 1C87 00245 SANOK_7 BTFSS BITFLAGS,SINYALBUF
0092 2897 00246 GOTO SANOK_8
0093 1106 00247 BCF PORTB,SINYAL
Warning[219]: Invalid RAM location specified.
0094 1187 00248 BCF BITFLAGS,SIRENBUF1
Warning[219]: Invalid RAM location specified.
0095 1087 00249 BCF BITFLAGS,SINYALBUF
0096 2899 00250 GOTO SANOK_6
0097 038C 00251 SANOK_8 DECF SINYALSAY,1
Warning[219]: Invalid RAM location specified.
0098 1107 00252 BCF BITFLAGS,FLAS
0099 00253 SANOK_6 ;---------------------------------------------------
0099 080A 00254 MOVF GERISAY,0 ;TEKRAR KILITLEME KONTROLU
009A 1903 00255 BTFSC STATUS,Z
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 7


LOC OBJECT CODE LINE SOURCE TEXT
VALUE

009B 28A5 00256 GOTO SANOK_9
009C 0B8A 00257 DECFSZ GERISAY,1
009D 28A5 00258 GOTO SANOK_9
009E 1586 00259 BSF PORTB,MK_KAPA
009F 3002 00260 MOVLW .2 ;KURMA SURESI OLMAKSIZIN GERI KILITLE
00A0 0091 00261 MOVWF DURUM
00A1 3001 00262 MOVLW .1
00A2 008C 00263 MOVWF SINYALSAY
00A3 3008 00264 MOVLW .8
00A4 008B 00265 MOVWF ROLSURE
00A5 00266 SANOK_9 ;------------------------------------------
00A5 080D 00267 MOVF SIRENSAY,0 ;SIREN CALMA SURESI DUSUR
00A6 1903 00268 BTFSC STATUS,Z
00A7 28B5 00269 GOTO SANOK_10
00A8 0B8D 00270 DECFSZ SIRENSAY,1
00A9 28B5 00271 GOTO SANOK_10
00AA 3001 00272 MOVLW .1
00AB 008C 00273 MOVWF SINYALSAY
Warning[219]: Invalid RAM location specified.
00AC 1187 00274 BCF BITFLAGS,SIRENBUF1 ;SIREN SUSTUR
Warning[219]: Invalid RAM location specified.
00AD 1207 00275 BCF BITFLAGS,SIRENBUF2 ;SIREN SUSTUR
00276
00AE 1A88 00277 BTFSC FLAGS2,PANIK
00AF 28B4 00278 GOTO SANOK_16
00B0 3002 00279 MOVLW .2
00B1 0091 00280 MOVWF DURUM
00B2 1E08 00281 BTFSS FLAGS2,ZONE
00B3 1408 00282 BSF FLAGS2,KILITKUR ;KAPI KILITLE
00B4 1288 00283 SANOK_16 BCF FLAGS2,PANIK
00B5 00284 SANOK_10 ;--------------------------------------------
00B5 080E 00285 MOVF KURSAY,0 ;KAPI ACIKKEN KURMADA UYARI BEKLEME
00B6 1903 00286 BTFSC STATUS,Z
00B7 28BD 00287 GOTO SANOK_11
00B8 0B8E 00288 DECFSZ KURSAY,1
00B9 28BD 00289 GOTO SANOK_11
00BA 3050 00290 MOVLW .80 ;SIREN CAL
00BB 008D 00291 MOVWF SIRENSAY
Warning[219]: Invalid RAM location specified.
00BC 1607 00292 BSF BITFLAGS,SIRENBUF2
00BD 00293 SANOK_11 ;-----------------------------
00BD 080F 00294 MOVF UKDISSAY,0 ;UZAKTAN KUMANDA DISABLE SURESI
00BE 1903 00295 BTFSC STATUS,Z
00BF 28C1 00296 GOTO SANOK_14
00C0 038F 00297 DECF UKDISSAY,1
00C1 00298 SANOK_14 ;------------------------------
00C1 2823 00299 GOTO SANOK_DON
00300 ;========================================================================
00C2 0064 00301 UKOKU CLRWDT
00C3 080F 00302 MOVF UKDISSAY,0 ;UK DISABLE MI
00C4 1D03 00303 BTFSS STATUS,Z
00C5 2815 00304 GOTO MAIN
00305
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 8


LOC OBJECT CODE LINE SOURCE TEXT
VALUE

00C6 0815 00306 MOVF BUTBAS,0
00C7 1D03 00307 BTFSS STATUS,Z
00C8 28D1 00308 GOTO UKOKU_5
00C9 1A06 00309 BTFSC PORTB,UK1 ;BASILI BUTON VARMI
00CA 28CF 00310 GOTO UKOKU_C1
00CB 1A86 00311 BTFSC PORTB,UK2
00CC 28CF 00312 GOTO UKOKU_C1
00CD 0195 00313 UKOKU_C CLRF BUTBAS
00CE 2815 00314 GOTO MAIN
00CF 0A95 00315 UKOKU_C1 INCF BUTBAS,1
00D0 2815 00316 GOTO MAIN
00D1 3001 00317 UKOKU_5 MOVLW .1
00D2 0215 00318 SUBWF BUTBAS,0
00D3 1D03 00319 BTFSS STATUS,Z
00D4 28DA 00320 GOTO UKOKU_11
00D5 1A06 00321 BTFSC PORTB,UK1 ;1. BUTON BASILIMI
00D6 28F8 00322 GOTO UKOKU_2
00D7 1A86 00323 BTFSC PORTB,UK2 ;2.BUTON BASILIMI
00D8 28E0 00324 GOTO UKOKU_1
00D9 28CD 00325 GOTO UKOKU_C
00DA 00326 UKOKU_11
00DA 1A06 00327 BTFSC PORTB,UK1 ;BASILI BUTON VARMI
00DB 2815 00328 GOTO MAIN
00DC 1A86 00329 BTFSC PORTB,UK2
00DD 2815 00330 GOTO MAIN
00DE 0195 00331 CLRF BUTBAS
00DF 2815 00332 GOTO MAIN
00333
00334 ;============ 2.BUTON BASILDI
00E0 0A95 00335 UKOKU_1 INCF BUTBAS,1
00336 ;---------
00E1 3008 00337 MOVLW .8 ;UK OKUMA DISABLE SURESI
00E2 008F 00338 MOVWF UKDISSAY
00339
00E3 3003 00340 MOVLW .3 ;alarm durumundami
00E4 0211 00341 SUBWF DURUM,0
00E5 1903 00342 BTFSC STATUS,Z
00E6 28EE 00343 GOTO UKOKU_10
00E7 1A88 00344 BTFSC FLAGS2,PANIK
00E8 28F0 00345 GOTO UKOKU_12
00346
00E9 3005 00347 MOVLW .5
00EA 008C 00348 MOVWF SINYALSAY
00EB 3009 00349 MOVLW .9 ;UK OKUMA DISABLE SURESI
00EC 008F 00350 MOVWF UKDISSAY
00ED 2815 00351 GOTO MAIN
00EE 00352 UKOKU_10
00EE 3002 00353 MOVLW .2 ;HAZIR DURUMA AL
00EF 0091 00354 MOVWF DURUM
00F0 3001 00355 UKOKU_12 MOVLW .1 ;SINYAL SONDUR
00F1 008C 00356 MOVWF SINYALSAY
00F2 018D 00357 CLRF SIRENSAY ;SIREN SURESI SIFIRLA
Warning[219]: Invalid RAM location specified.
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 9


LOC OBJECT CODE LINE SOURCE TEXT
VALUE

00F3 1187 00358 BCF BITFLAGS,SIRENBUF1 ;SIREN SUSTUR
Warning[219]: Invalid RAM location specified.
00F4 1207 00359 BCF BITFLAGS,SIRENBUF2 ;SIREN SUSTUR
00F5 1088 00360 BCF FLAGS2,ALFLAG ;ALARM VERILDI ISARETINI SIL
00F6 1288 00361 BCF FLAGS2,PANIK
00F7 2815 00362 GOTO MAIN
00363
00364 ;---------
00F8 1E86 00365 UKOKU_2 BTFSS PORTB,UK2 ;1. BASILI 2.BASILIMI
00F9 2912 00366 GOTO UKOKU_3
00367 ;============ 3.BUTON BASILDI
00FA 0A95 00368 INCF BUTBAS,1
00369 ;-----------
00FB 3008 00370 MOVLW .8 ;UK OKUMA DISABLE SURESI
00FC 008F 00371 MOVWF UKDISSAY
00372
00FD 3003 00373 MOVLW .3 ;alarm durumundami
00FE 0211 00374 SUBWF DURUM,0
00FF 1903 00375 BTFSC STATUS,Z
0100 2908 00376 GOTO UKOKU_9
00377
0101 3028 00378 MOVLW .40
0102 008D 00379 MOVWF SIRENSAY
0103 3028 00380 MOVLW .40
0104 008C 00381 MOVWF SINYALSAY
Warning[219]: Invalid RAM location specified.
0105 1607 00382 BSF BITFLAGS,SIRENBUF2
0106 1688 00383 BSF FLAGS2,PANIK
0107 2815 00384 GOTO MAIN
0108 00385 UKOKU_9
0108 3001 00386 MOVLW .1 ;SINYAL SONDUR
0109 008C 00387 MOVWF SINYALSAY
010A 018D 00388 CLRF SIRENSAY ;SIREN SURESI SIFIRLA
Warning[219]: Invalid RAM location specified.
010B 1207 00389 BCF BITFLAGS,SIRENBUF2 ;SIREN SUSTUR
Warning[219]: Invalid RAM location specified.
010C 1187 00390 BCF BITFLAGS,SIRENBUF1 ;SIREN SUSTUR
010D 3002 00391 MOVLW .2 ;HAZIR DURUMA AL
010E 0091 00392 MOVWF DURUM
010F 1088 00393 BCF FLAGS2,ALFLAG ;ALARM VERILDI ISARETINI SIL
0110 1288 00394 BCF FLAGS2,PANIK
0111 2815 00395 GOTO MAIN
00396 ;----------------
0112 00397 UKOKU_3 ;============ 1.BUTON BASILDI
0112 0A95 00398 INCF BUTBAS,1
0113 3008 00399 MOVLW .8 ;UK OKUMA DISABLE SURESI
0114 008F 00400 MOVWF UKDISSAY
00401
0115 0811 00402 MOVF DURUM,0 ;ALARM DEVRE DISIMI
0116 1903 00403 BTFSC STATUS,Z
0117 2927 00404 GOTO UKOKU_4
00405 ;========ALARM DEVRE DISI=====
0118 1088 00406 BCF FLAGS2,ALFLAG ;ALARM VERILDI ISARETINI SIL
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 10


LOC OBJECT CODE LINE SOURCE TEXT
VALUE

0119 1486 00407 BSF PORTB,MK_AC ;KILIT AC ROLESI CEK
011A 3004 00408 MOVLW .4 ;KILIT CEKME SURESI SET ET
011B 008B 00409 MOVWF ROLSURE
011C 3078 00410 MOVLW .120 ;GERI KILITLEME SURESI SET
011D 008A 00411 MOVWF GERISAY
011E 0191 00412 UKOKU_6 CLRF DURUM ;DURUMU SIFIRLA
Warning[219]: Invalid RAM location specified.
011F 1207 00413 BCF BITFLAGS,SIRENBUF2 ;SIREN SUSTUR
0120 1288 00414 BCF FLAGS2,PANIK
0121 018D 00415 CLRF SIRENSAY ;SIREN SURESI SIFIRLA
0122 018E 00416 CLRF KURSAY
0123 1008 00417 BCF FLAGS2,KILITKUR
0124 3002 00418 MOVLW .2
0125 008C 00419 MOVWF SINYALSAY ;2 KERE SINYAL VER
0126 2815 00420 GOTO MAIN
00421 ;-------------------------
0127 1808 00422 UKOKU_4 BTFSC FLAGS2,KILITKUR
0128 291E 00423 GOTO UKOKU_6 ;TEKRAR KILIT ACMAYA DON
0129 1408 00424 BSF FLAGS2,KILITKUR
Warning[219]: Invalid RAM location specified.
012A 1207 00425 BCF BITFLAGS,SIRENBUF2 ;SIREN SUSTUR
012B 3001 00426 MOVLW .1 ;1 KERE SINYAL VER
012C 008C 00427 MOVWF SINYALSAY
012D 018D 00428 CLRF SIRENSAY ;SIREN SURESI SIFIRLA
012E 1288 00429 BCF FLAGS2,PANIK
012F 3050 00430 MOVLW .80
0130 008E 00431 MOVWF KURSAY
0131 018A 00432 CLRF GERISAY
0132 2815 00433 GOTO MAIN
00434 ;-------------------------
Error[113] : Symbol not previously defined (P16F84A)
0000 00435 ORG P16F84A
Error[118] : Overwriting previous address contents (0000)
Error[118] : Overwriting previous address contents (0000)
0000 2800 00436 GOTO START
00437 END
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 11


SYMBOL TABLE
LABEL VALUE

ALFLAG 00000001
BITFLAGS 00000007
BUTBAS 00000015
C 00000000
DC 00000001
DURUM 00000011
EEADR 00000009
EECON1 00000088
EECON2 00000089
EEDATA 00000008
EEIE 00000006
EEIF 00000004
F 00000001
FLAGS2 00000008
FLAS 00000002
FSR 00000004
GERISAY 0000000A
GIE 00000007
INDF 00000000
INSTAL 00000000
INTCON 0000000B
INTE 00000004
INTEDG 00000006
INTF 00000001
IRP 00000007
JINP1 00000006
JINP2 00000007
KAPI 00000001
KILITKUR 00000000
KURDELAY 00000010
KURKONT 0000003F
KURK_1 00000053
KURK_2 00000049
KURK_CIK 00000052
KURSAY 0000000E
LED 00000000
MAIN 00000015
MK_AC 00000001
MK_KAPA 00000003
NOT_PD 00000003
NOT_RBPU 00000007
NOT_TO 00000004
OPTION_REG 00000081
PANIK 00000005
PCL 00000002
PCLATH 0000000A
PORTA 00000005
PORTB 00000006
PS0 00000000
PS1 00000001
PS2 00000002
PSA 00000003
RBIE 00000003
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 12


SYMBOL TABLE
LABEL VALUE

RBIF 00000000
RD 00000000
ROLSURE 0000000B
RP0 00000005
RP1 00000006
SANIYEOK 00000067
SANOK_1 0000006E
SANOK_10 000000B5
SANOK_11 000000BD
SANOK_12 00000075
SANOK_14 000000C1
SANOK_16 000000B4
SANOK_2 0000006F
SANOK_3 0000007F
SANOK_4 00000080
SANOK_5 00000087
SANOK_6 00000099
SANOK_7 00000091
SANOK_8 00000097
SANOK_9 000000A5
SANOK_DON 00000023
SENSKONT 00000056
SENSK_1 0000005E
SENSK_C 00000066
SINYAL 00000002
SINYALBUF 00000001
SINYALSAY 0000000C
SIREN 00000000
SIRENBUF1 00000003
SIRENBUF2 00000004
SIRENKONT 00000033
SIRENSAY 0000000D
SIRK_1 0000003A
SIRK_2 0000003C
SIRK_3 00000036
START 00000000
STATUS 00000003
T0CS 00000005
T0IE 00000005
T0IF 00000002
T0SE 00000004
TIMBUF 00000009
TMR0 00000001
TOGGLE 00000000
TRISA 00000085
TRISB 00000086
UK1 00000004
UK2 00000005
UKDISSAY 0000000F
UKOKU 000000C2
UKOKU_1 000000E0
UKOKU_10 000000EE
UKOKU_11 000000DA
MPASM 03.90 Released ŞİFRELİ 84.ASM 1-10-2006 7:48:55 PAGE 13


SYMBOL TABLE
LABEL VALUE

UKOKU_12 000000F0
UKOKU_2 000000F8
UKOKU_3 00000112
UKOKU_4 00000127
UKOKU_5 000000D1
UKOKU_6 0000011E
UKOKU_9 00000108
UKOKU_C 000000CD
UKOKU_C1 000000CF
W 00000000
WR 00000001
WREN 00000002
WRERR 00000003
Z 00000002
ZONE 00000004
ZONEGOSTER 0000002A
ZONGOS_1 00000031
_CP_OFF 00003FFF
_CP_ON 0000000F
_HS_OSC 00003FFE
_LP_OSC 00003FFC
_PWRTE_OFF 00003FFF
_PWRTE_ON 00003FF7
_RC_OSC 00003FFF
_WDT_OFF 00003FFB
_WDT_ON 00003FFF
_XT_OSC 00003FFD
__16F84A 00000001


MEMORY USAGE MAP ('X' = Used, '-' = Unused)

0000 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0040 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0080 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
00C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0100 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXX-------------
2000 : -------X-------- ---------------- ---------------- ----------------

All other memory blocks unused.

Program Memory Words Used: 307
Program Memory Words Free: 717


Errors : 5
Warnings : 64 reported, 0 suppressed
Messages : 1 reported, 0 suppressed



_____________________________



270 Mesaj
10 Ocak 2006; 12:13:13 

Bilgim yettiğince cevaplayacağım ama başka arkadaşlar da yardımcı olup hatalarımı düzeltir eleştirirse daha iyi olur...Benim cevabım söyle olacak... dııtdırıdııııttt dırırırı dıttırırıdıııttt

error 1 ve 2 : RTCC file registerni daha önce EQU ile tanımlamadığın için iki tane hata
vermiş. Bunu düzeltirsen sorun kalkar...Tanımlamalar kısmında bu etiketi bir adresle
ilişkilendirmen lazım...

error 3 : Aynı şey satırındaki ""P16F84A"" için de geçerli bunu da aynı yöntemle düzeltmen
lazım...Zira ""ORG P16F84A"" komutunun kullanımında nereden başlanacağı belli değil...Ayrıca
ben bu komut neden burada kullanılmış anlamadım???? Yani algoritmayı bilmiyorum ama bana
cok cok garip geldi...Yanlışlık olabilir mi?

error 4. ve 5. : 3 nolu hatada P16F84A etiketini boş bir adresle ilişkilendirirsen bu
sorunlarda düzelir gibi geliyor bana. Daha önce kullandığın bir adrese yeniden komut yazdığın
için uyarı veriyor... Acaba P16F84A etiketini default olarak ""0X00"" olarak mı algılıyor..Bu
durumda birsonraki komut olan GOTO START komutunu 0x00 adresine yazıyor ama sen onu
daha önce kullanmışlsın bu sebeble hata oluşuyor bence...Eğer böyleyse 3 nolu hatayı
düzeltirsen sorun ortadan kalkar...

Senden bi ricam var daha iyi incelemem için salt ASSEMBLY kodlarını buraya yazar mısın? Bu
bana cok karışık geliyor ikisine bir den bakmak sorunun çözümüne daha çabuk götürür.ASSEMBLY kodları daha bir bütünlük oluşturduğu için takip etmek daha kolay bence...Hem hataları üstünde düzeltip derleyip direkt cevabı verebilirim yapabilirsem tabi

Kolaylıklar ve iyi bayramlar diliyorum...



< Bu mesaj bu kişi tarafından değiştirildi serkanmj -- 10 Ocak 2006 12:19:47 >


_____________________________

keşke daha çok şey öğrenebilecek kadar uzun yaşayabilseydim...


 
557 Mesaj
10 Ocak 2006; 23:59:09 

Yardım larınız için çok teşekkürler.Kodların açık hali aşağıda.Saygılarımla.

processor 16F84A
#include <P16F84A.INC>
__config _CP_OFF & _PWRTE_OFF & _WDT_ON & _RC_OSC ; 0x3FFF
; __idlocs 0xFF, 0xFF, 0xFF, 0xFF
; ---------------------------------------------------
; ------- OTO ALARM Ver. 1 -----------------
;----------------------------------------------------
; Electronic word
;mr fisher

; ----- BIT TANIMLAMALAR
;====== PORT B
SIREN EQU 0 ; 1= CAL
MK_AC EQU 1 ; MERKEZI KILIT 1=CEK
SINYAL EQU 2 ; 1=YAN
MK_KAPA EQU 3 ; MERKEZI KILIT 1=CALIS
UK1 EQU 4 ; UZ KUM OTO ARAMA 1=CALIS
UK2 EQU 5 ; UZ KUM KILIT 1=CALIS
JINP1 EQU 6
JINP2 EQU 7



;====== PORT A
LED EQU 0 ;JAMPER INP
KAPI EQU 1 ; KAPI GIRIS 0=ACIK


;======= BITFLAGS
TOGGLE EQU 0 ;1 SN FLAG
SINYALBUF EQU 1
FLAS EQU 2
SIRENBUF1 EQU 3 ;ACMA KAPAMA SIREN UYARISI ENABLE
SIRENBUF2 EQU 4 ;ALARM SIREN ENABLE


;======= FLAGS2
KILITKUR EQU 0 ;ALARM KURMA ISLEMI BASLA
ALFLAG EQU 1 ;ALARM VERILDI

ZONE EQU 4 ;ALARM ALINAN ZONE 0=KAPI 1=GOZ,DARBE
PANIK EQU 5

; ---- BYTE TANIMLAMALAR
BITFLAGS EQU H'07' ;BIT REGISTER
FLAGS2 EQU H'08' ;BIT REGISTER
TIMBUF EQU H'09' ;TIMER BUFFER
GERISAY EQU H'0A' ;KILIT ACILINCA TEKRAR KILITLEME SURESI
ROLSURE EQU H'0B' ;ROLE CEKILI KALMA SURESI
SINYALSAY EQU H'0C' ;SINYAL FLASH SAYISI
SIRENSAY EQU H'0D' ;SIREN CALMA SURESI
KURSAY EQU H'0E' ;KAPI ACIKKEN KURMADA UYARI SURESI
UKDISSAY EQU H'0F' ;UZAKTAN KUMANDA DISABLE SURESI
KURDELAY EQU H'10' ;KAPIYI KAPATTIKTAN SONRA KILITLEME GECIKMESI
DURUM EQU H'11'
; EQU H'12'
; EQU H'13'
; EQU H'14'
BUTBAS EQU H'15' ;BUTON OKUMA SAYISI
; EQU H'1F'

include "P16F84A.INC"
; ***************************** INSTAL
;---------------------------------------------------------
START MOVLW H'02'
OPTION
MOVLW B'11110000' ;0=CIKIS
TRIS PORTB
MOVLW B'11111110' ;0=CIKIS
TRIS PORTA


BCF PORTB,MK_KAPA
BCF PORTB,MK_AC
BCF PORTB,SINYAL
BCF BITFLAGS,SINYALBUF
BCF FLAGS2,KILITKUR
BCF BITFLAGS,FLAS
BCF FLAGS2,ALFLAG
BCF BITFLAGS,SIRENBUF1
BCF FLAGS2,PANIK
CLRF UKDISSAY
CLRF ROLSURE
CLRF SINYALSAY
CLRF GERISAY
CLRF KURSAY
CLRF KURDELAY
;========================================================================
MAIN MOVF RTCC,0
BTFSS STATUS,Z
GOTO MAIN

MOVLW .6
MOVWF RTCC
CLRWDT
MOVLW B'00001111' ;0=CIKIS
TRIS PORTB

MOVLW B'11111100'
TRIS PORTA


CALL SIRENKONT
INCF TIMBUF,1
BTFSC STATUS,Z
GOTO SANIYEOK ; MSN DE BIR GIT
SANOK_DON
;KAPI ACILINCA GERI SAYMAYI SIFIRLA
BTFSS PORTA,KAPI
CLRF GERISAY

CLRWDT
CALL SENSKONT
CALL KURKONT
CALL ZONEGOSTER
GOTO UKOKU
;========================================================================
ZONEGOSTER ;E470
MOVF DURUM,0 ;ALARM DEVRE DISIMI
BTFSS STATUS,Z
RETLW .0
;ALARM DEVRE DISI
BTFSS PORTA,KAPI ;KAPI KAPALIMI
GOTO ZONGOS_1
BCF PORTA,LED
RETLW .0
ZONGOS_1
BSF PORTA,LED
RETLW .0
;========================================================================
SIRENKONT ;E470
CLRWDT
BTFSC BITFLAGS,SIRENBUF1
GOTO SIRK_2 ;SIRENBUF1 =1 SIRK_2 YE ATLA
SIRK_3
BTFSC BITFLAGS,SIRENBUF2
GOTO SIRK_1
BCF PORTB,SIREN ;SIREN CALMA
RETLW .0
SIRK_1 ;SIREN CAL
BSF PORTB,SIREN
RETLW .0
SIRK_2
BTFSS PORTB,JINP1
GOTO SIRK_1
GOTO SIRK_3
;--------------------------------------------------
KURKONT ;ALARM KURULURKEN KAPININ KAPANMASINI KONTROL EDER
;E470
BTFSS FLAGS2,KILITKUR ;KURMA ISLEMI BASLAMISMI
RETLW .0
CLRWDT
BTFSS PORTA,KAPI ;KAPI KAPALIMI
GOTO KURK_1

MOVF KURDELAY,0 ;KAPATTIKTAN SONRAKI KILITLEME SURESI
BTFSC STATUS,Z
GOTO KURK_2
DECF KURDELAY,1
RETLW .0
KURK_2 MOVLW .2
MOVWF DURUM ;KURMA ISLEMI BASLA

MOVLW .9 ;UK OKUMA DISABLE SURESI
MOVWF UKDISSAY
BSF PORTB,MK_KAPA ;KILIT KAPAMA ROLESI CEK
CLRF KURSAY
BCF FLAGS2,KILITKUR
MOVLW .8
MOVWF ROLSURE
KURK_CIK RETLW .0
KURK_1
MOVLW .250
MOVWF KURDELAY
RETLW .0

;--------------------------------------------------
SENSKONT ;ALARM KURULUYKEN SENSORLERI KONTROL EDER
;E470
MOVLW .2
SUBWF DURUM,0
BTFSS STATUS,Z
RETLW .0
CLRWDT
BTFSC PORTA,KAPI ;KAPI KONTROL
RETLW .0
BCF FLAGS2,ZONE
SENSK_1 MOVLW .120
MOVWF SIRENSAY
MOVLW .120
MOVWF SINYALSAY
BSF FLAGS2,ALFLAG
BSF BITFLAGS,SIRENBUF2
MOVLW .3
MOVWF DURUM
SENSK_C RETLW .0
;--------------------------------------------------
SANIYEOK ;E470
CLRWDT
MOVLW .131 ;TIMBUF I 250 MSN YE AYARLA
MOVWF TIMBUF
BTFSS BITFLAGS,TOGGLE ;TOGGLE BITI CEVIR
GOTO SANOK_1
BCF BITFLAGS,TOGGLE
GOTO SANOK_2
SANOK_1 BSF BITFLAGS,TOGGLE
;------------------
SANOK_2 MOVF DURUM,0 ;ALARM KURULUYSA LED FLAS YAP
BTFSS STATUS,Z
GOTO SANOK_12

BTFSC FLAGS2,KILITKUR
GOTO SANOK_12
GOTO SANOK_3
SANOK_12 BSF PORTA,LED ;KILITLI
BTFSC FLAGS2,ALFLAG ;ALARM VERILDIYSE LED DIREK YAN
GOTO SANOK_4
MOVLW .1 ;DURUM 1 DE LED DIREK YAN
SUBWF DURUM,0
BTFSC STATUS,Z
GOTO SANOK_4
BTFSS BITFLAGS,TOGGLE
BCF PORTA,LED
GOTO SANOK_4
SANOK_3 BCF PORTA,LED ;KILITLI DEGIL
SANOK_4 ;----------------------ROLE BIRAKMA KONTROLU
MOVF ROLSURE,0
BTFSC STATUS,Z
GOTO SANOK_5
DECFSZ ROLSURE,1
GOTO SANOK_5
BCF PORTB,MK_AC
BCF PORTB,MK_KAPA
SANOK_5 ;---------------------SINYAL FLAS
MOVF SINYALSAY,0
BTFSC STATUS,Z
GOTO SANOK_6
BTFSC BITFLAGS,FLAS
GOTO SANOK_7
BSF BITFLAGS,SINYALBUF
BSF BITFLAGS,FLAS
BSF BITFLAGS,SIRENBUF1
BSF PORTB,SINYAL
GOTO SANOK_6
SANOK_7 BTFSS BITFLAGS,SINYALBUF
GOTO SANOK_8
BCF PORTB,SINYAL
BCF BITFLAGS,SIRENBUF1
BCF BITFLAGS,SINYALBUF
GOTO SANOK_6
SANOK_8 DECF SINYALSAY,1
BCF BITFLAGS,FLAS
SANOK_6 ;---------------------------------------------------
MOVF GERISAY,0 ;TEKRAR KILITLEME KONTROLU
BTFSC STATUS,Z
GOTO SANOK_9
DECFSZ GERISAY,1
GOTO SANOK_9
BSF PORTB,MK_KAPA
MOVLW .2 ;KURMA SURESI OLMAKSIZIN GERI KILITLE
MOVWF DURUM
MOVLW .1
MOVWF SINYALSAY
MOVLW .8
MOVWF ROLSURE
SANOK_9 ;------------------------------------------
MOVF SIRENSAY,0 ;SIREN CALMA SURESI DUSUR
BTFSC STATUS,Z
GOTO SANOK_10
DECFSZ SIRENSAY,1
GOTO SANOK_10
MOVLW .1
MOVWF SINYALSAY
BCF BITFLAGS,SIRENBUF1 ;SIREN SUSTUR
BCF BITFLAGS,SIRENBUF2 ;SIREN SUSTUR

BTFSC FLAGS2,PANIK
GOTO SANOK_16
MOVLW .2
MOVWF DURUM
BTFSS FLAGS2,ZONE
BSF FLAGS2,KILITKUR ;KAPI KILITLE
SANOK_16 BCF FLAGS2,PANIK
SANOK_10 ;--------------------------------------------
MOVF KURSAY,0 ;KAPI ACIKKEN KURMADA UYARI BEKLEME
BTFSC STATUS,Z
GOTO SANOK_11
DECFSZ KURSAY,1
GOTO SANOK_11
MOVLW .80 ;SIREN CAL
MOVWF SIRENSAY
BSF BITFLAGS,SIRENBUF2
SANOK_11 ;-----------------------------
MOVF UKDISSAY,0 ;UZAKTAN KUMANDA DISABLE SURESI
BTFSC STATUS,Z
GOTO SANOK_14
DECF UKDISSAY,1
SANOK_14 ;------------------------------
GOTO SANOK_DON
;========================================================================
UKOKU CLRWDT
MOVF UKDISSAY,0 ;UK DISABLE MI
BTFSS STATUS,Z
GOTO MAIN

MOVF BUTBAS,0
BTFSS STATUS,Z
GOTO UKOKU_5
BTFSC PORTB,UK1 ;BASILI BUTON VARMI
GOTO UKOKU_C1
BTFSC PORTB,UK2
GOTO UKOKU_C1
UKOKU_C CLRF BUTBAS
GOTO MAIN
UKOKU_C1 INCF BUTBAS,1
GOTO MAIN
UKOKU_5 MOVLW .1
SUBWF BUTBAS,0
BTFSS STATUS,Z
GOTO UKOKU_11
BTFSC PORTB,UK1 ;1. BUTON BASILIMI
GOTO UKOKU_2
BTFSC PORTB,UK2 ;2.BUTON BASILIMI
GOTO UKOKU_1
GOTO UKOKU_C
UKOKU_11
BTFSC PORTB,UK1 ;BASILI BUTON VARMI
GOTO MAIN
BTFSC PORTB,UK2
GOTO MAIN
CLRF BUTBAS
GOTO MAIN

;============ 2.BUTON BASILDI
UKOKU_1 INCF BUTBAS,1
;---------
MOVLW .8 ;UK OKUMA DISABLE SURESI
MOVWF UKDISSAY

MOVLW .3 ;alarm durumundami
SUBWF DURUM,0
BTFSC STATUS,Z
GOTO UKOKU_10
BTFSC FLAGS2,PANIK
GOTO UKOKU_12

MOVLW .5
MOVWF SINYALSAY
MOVLW .9 ;UK OKUMA DISABLE SURESI
MOVWF UKDISSAY
GOTO MAIN
UKOKU_10
MOVLW .2 ;HAZIR DURUMA AL
MOVWF DURUM
UKOKU_12 MOVLW .1 ;SINYAL SONDUR
MOVWF SINYALSAY
CLRF SIRENSAY ;SIREN SURESI SIFIRLA
BCF BITFLAGS,SIRENBUF1 ;SIREN SUSTUR
BCF BITFLAGS,SIRENBUF2 ;SIREN SUSTUR
BCF FLAGS2,ALFLAG ;ALARM VERILDI ISARETINI SIL
BCF FLAGS2,PANIK
GOTO MAIN

;---------
UKOKU_2 BTFSS PORTB,UK2 ;1. BASILI 2.BASILIMI
GOTO UKOKU_3
;============ 3.BUTON BASILDI
INCF BUTBAS,1
;-----------
MOVLW .8 ;UK OKUMA DISABLE SURESI
MOVWF UKDISSAY

MOVLW .3 ;alarm durumundami
SUBWF DURUM,0
BTFSC STATUS,Z
GOTO UKOKU_9

MOVLW .40
MOVWF SIRENSAY
MOVLW .40
MOVWF SINYALSAY
BSF BITFLAGS,SIRENBUF2
BSF FLAGS2,PANIK
GOTO MAIN
UKOKU_9
MOVLW .1 ;SINYAL SONDUR
MOVWF SINYALSAY
CLRF SIRENSAY ;SIREN SURESI SIFIRLA
BCF BITFLAGS,SIRENBUF2 ;SIREN SUSTUR
BCF BITFLAGS,SIRENBUF1 ;SIREN SUSTUR
MOVLW .2 ;HAZIR DURUMA AL
MOVWF DURUM
BCF FLAGS2,ALFLAG ;ALARM VERILDI ISARETINI SIL
BCF FLAGS2,PANIK
GOTO MAIN
;----------------
UKOKU_3 ;============ 1.BUTON BASILDI
INCF BUTBAS,1
MOVLW .8 ;UK OKUMA DISABLE SURESI
MOVWF UKDISSAY

MOVF DURUM,0 ;ALARM DEVRE DISIMI
BTFSC STATUS,Z
GOTO UKOKU_4
;========ALARM DEVRE DISI=====
BCF FLAGS2,ALFLAG ;ALARM VERILDI ISARETINI SIL
BSF PORTB,MK_AC ;KILIT AC ROLESI CEK
MOVLW .4 ;KILIT CEKME SURESI SET ET
MOVWF ROLSURE
MOVLW .120 ;GERI KILITLEME SURESI SET
MOVWF GERISAY
UKOKU_6 CLRF DURUM ;DURUMU SIFIRLA
BCF BITFLAGS,SIRENBUF2 ;SIREN SUSTUR
BCF FLAGS2,PANIK
CLRF SIRENSAY ;SIREN SURESI SIFIRLA
CLRF KURSAY
BCF FLAGS2,KILITKUR
MOVLW .2
MOVWF SINYALSAY ;2 KERE SINYAL VER
GOTO MAIN
;-------------------------
UKOKU_4 BTFSC FLAGS2,KILITKUR
GOTO UKOKU_6 ;TEKRAR KILIT ACMAYA DON
BSF FLAGS2,KILITKUR
BCF BITFLAGS,SIRENBUF2 ;SIREN SUSTUR
MOVLW .1 ;1 KERE SINYAL VER
MOVWF SINYALSAY
CLRF SIRENSAY ;SIREN SURESI SIFIRLA
BCF FLAGS2,PANIK
MOVLW .80
MOVWF KURSAY
CLRF GERISAY
GOTO MAIN
;-------------------------
ORG P16F84A
GOTO START

END


_____________________________



270 Mesaj
11 Ocak 2006; 21:28:21 

Dostum tekrar merhaba ben programı mantık hatalarından kurtaracak şekilde iki değişiklik yaptım. Ama devreyi uygulamayı ve algoritmayı bilmediğim için çalışmasını garanti edemem sadece derlemede hata vermediğinin garantisini veriyorum.

Neyse sana kolaylıklar ve hayırlı bayramlar diliyorum.


Ekteki dosya (1)


_____________________________

keşke daha çok şey öğrenebilecek kadar uzun yaşayabilseydim...
Sayfa:   [1]
Tüm forumlar » [Donanım / Hardware] » Elektronik » PIC16C54'den çeviri 16f84'de
Sayfa: [1]
Foruma Git
Bölümde Ara
Başa Dön


 
Reklamlar


DH VİDEO

 



Forum Software powered by ASP Playground Advanced Edition 2.3
Copyright © 2000 - 2006 ASPPlayground.NET

Bu sayfanın mobil sürümü / tablet sürümü / mini sürümü.



0.879