Illegal opcode sorunu

Başlatan NecmiGurbuz, 10 Ocak 2015, 02:05:15

NecmiGurbuz

TRISA =11111100
TRISC =11111111
TRISE =11100000
TRISD =0 
TRISB =0
DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 3
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 2
DEFINE LCD_RWREG PORTB
DEFINE LCD_RWBIT 5
DEFINE LCD_LINES 2
DEFINE LCD_BITS 8
PAUSE 500 : PORTB.5 =0
DEFINE ADC_BITS 8
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
OKUNAN VAR BYTE 
ADCON1=%00000000
BASLA:
LCDOUT $FE, $80, " ADC "
LCDOUT $FE, $C0, "UYGULAMA "
   IF PORTC.0 = 0 THEN LM35
   IF PORTC.1 = 0 THEN POT1
   IF PORTC.2 = 0 THEN LDR
   IF PORTC.3 = 0 THEN POT2
   IF PORTC.4 = 0 THEN POT3
   IF PORTC.5 = 0 THEN NTC
   GOTO BASLA
LM35:
WHILE PORTC.0 = 0 : WEND
ADCIN 0, OKUNAN
LCDOUT $FE, 1
LCDOUT $FE, $C0, "LM35= ", DEC OKUNAN
PAUSE 1000
GOTO BASLA
POT1:
WHILE PORTC.1 = 0 : WEND
ADCIN 1, OKUNAN
LCDOUT $FE, 1
LCDOUT $FE, $C0, "1.POT= " , DEC OKUNAN
PAUSE 1000
GOTO BASLA   
LDR:
WHILE PORTC.2 = 0 : WEND
ADCIN 2, OKUNAN
LCDOUT $FE, 1
LCDOUT $FE , $C0, "LDR= ", DEC OKUNAN
PAUSE 1000
GOTO BASLA
POT2:
WHILE PORTC.3 = 0 : WEND
ADCIN 3, OKUNAN
LCDOUT $FE, 1
LCDOUT $FE, $C0, "2. POT= ", DEC OKUNAN
PAUSE 1000
GOTO BASLA
POT3:
WHILE PORTC.4 = 0 : WEND
ADCIN 5, OKUNAN
LCDOUT $FE, 1
LCDOUT $FE, $C0, "3. POT= ", DEC OKUNAN
PAUSE 1000
GOTO BASLA
NTC:
WHILE PORTC.5 = 0 : WEND
ADCIN 6, OKUNAN
LCDOUT $FE, 1
LCDOUT $FE, $C0, "NTC= ", DEC OKUNAN
PAUSE 1000
GOTO BASLA
END
--------
Error[122]   C:\USERS\U15.ASM 18 : Illegal opcode (LCD_DREG)
Error[122]   C:\USERS\\U15.ASM 19 : Illegal opcode (LCD_DBIT)
Error[122]   C:\USERS\\U15.ASM 20 : Illegal opcode (LCD_RSREG)
Error[122]   C:\USERS\\U15.ASM 21 : Illegal opcode (LCD_RSBIT)
Error[122]   C:\USERS\U15.ASM 22 : Illegal opcode (LCD_EREG)
Error[122]   C:\USERS\U15.ASM 23 : Illegal opcode (LCD_EBIT)
Error[122]   C:\USERS\\U15.ASM 24 : Illegal opcode (LCD_RWREG)
Error[122]   C:\USERS\\U15.ASM 25 : Illegal opcode (LCD_RWBIT)
Error[122]   C:\USERS\\U15.ASM 26 : Illegal opcode (LCD_LINES)
Error[122]   C:\USERS\U15.ASM 27 : Illegal opcode (LCD_BITS)
Error[108]   C:\USERS\U15.ASM 28 : Illegal character (5)
Error[122]   C:\USERS\U15.ASM 29 : Illegal opcode (ADC_BITS)
Error[122]   C:\USERS\U15.ASM 30 : Illegal opcode (ADC_CLOCK)
Error[122]   C:\USERS\U15.ASM 31 : Illegal opcode (ADC_SAMPLEUS)
Error[122]   C:\USERS\U15.ASM 32 : Illegal opcode (VAR)
Error[128]   C:\USERS\\U15.ASM 33 : Missing argument(s)
Error[108]   C:\USERS\\U15.ASM 36 : Illegal character ($)
Error[108]   C:\USERS\\U15.ASM 37 : Illegal character ($)
Error[113]   C:\USERS\U15.ASM 38 : Symbol not previously defined (PORTC.0)
Error[108]   C:\USERS\\U15.ASM 38 : Illegal character (=)
Warning[212] C:\USERS\U15.ASM 92 : Expected (ENDIF)
----
Tris lerden sonraki İllegal opcode sorunu çözemedim. Açıkcası pekte anlamıyorum bu işlerden :S.
Yardım ederseniz memnun olurum.
MPLAB IDE v 8.15a
Pbp3
Teşekkürler.

ete

Bu hatalar bana derlemeden önce seçmiş olduğun işlemcinin bu kodlara uymadığını gösteriyor.
İşlemci seçimini doğru yap.

Ete

NecmiGurbuz

Cevap için teşekkür ederim.
İşlemci 16F877 yazmayı unutmuşum.

DEFINE LCD_DREG PORTD  yerine başlarına # işareti koyunca düzeldi.

Error[108]   CU15.ASM 34 : Illegal character (5)
Error[122]   C:SAMPLES\U15.ASM 39 : Illegal opcode (VAR)
Error[108]   C:\ 43 : Illegal character ($)
Error[108]   C:\ 44 : Illegal character ($)
Error[113]   C:\ 45 : Symbol not previously defined (PORTC.0)
Error[108]   C:\ : Illegal character (=)
Warning[212] C:\99 : Expected (ENDIF)

En son bu hale getirebildik.

Powered by EzPortal