Cos'è ElectroYou | Login Iscriviti

ElectroYou - la comunità dei professionisti del mondo elettrico

error parameter and

Tipologie, strumenti di sviluppo, hardware e progetti

Moderatore: Foto UtentePaolino

0
voti

[1] error parameter and

Messaggioda Foto Utenteabsolutevalue » 16 mar 2010, 17:33

Salve a tutti o creato tramite notepad il seguente file .asm:

PROCESSOR 16F84
RADIX DEC
INCLUDE "P16F84.INC"
__CONFIG 3FF3H
ORG 0CH
Count RES 2
Direz RES 1
ORG 00H
bsf STATUS,RP0
movlw 00000000B
movwf TRISA
movlw 00000000B
movwf TRISB
bcf STATUS,RP0
movlw 00000001B
movwf PORTB
clrf PORTA
clrf Direz
clrf Count
clrf Count+1
bcf STATUS,C
MainLoop
call Delay
btfss Direz,0
goto Sali
Scendi
rrf PORTA,F
rrf PORTB,F
btfsc PORTB,0
bcf Direz,0
goto MainLoop
Sali
rlf PORTB,F
rlf PORTA,F
btfsc PORTA,3
bsf Direz,0
goto MainLoop
Delay
movlw 40
movwf Count+1
DelayLoop
decfsz Count,F
goto DelayLoop
decfsz Count+1,F
goto DelayLoop
return
END

Esso dovrebbe essere una serie di 12 led che fa l'effetto supercar.
Ma il mio problema sta quando lo vado a convertire in HEX con MPasm perche mi da i seguenti errori:
-error in parameter "and"
-error in parameter "Setting\...\Desktop\prova.asm
-unrecognized error: 32.

Grazie a tutti quelli che mi aiuteranno!!!!!!!!!!!!!!!!!!!!!
Avatar utente
Foto Utenteabsolutevalue
0 2
 
Messaggi: 5
Iscritto il: 22 gen 2010, 11:30

0
voti

[2] Re: error parameter and

Messaggioda Foto Utentebobina » 16 mar 2010, 21:38

A me sembra un problema di spazi nel path, prova a spostare il tuo file .asm in un percorso senza spazi ad esempio C:\test\ e prova a ricompilare.

PS
Metti il tuo codice nei tag code
Codice: Seleziona tutto
Esempio Sorgente
si riesce a leggere meglio il sorgente
Avatar utente
Foto Utentebobina
212 6
Frequentatore
Frequentatore
 
Messaggi: 177
Iscritto il: 27 dic 2009, 14:22

0
voti

[3] Re: error parameter and

Messaggioda Foto UtenteDonJ » 16 mar 2010, 22:29

Il codice d'errore che hai riportato l'hai copiato dal compilatore?

Comunque un minimo di indentazione nel sorgente non farebbe male :mrgreen:

edit:
comunque, perché non lo provi con MPLAB che è decisamente più comodo?
"Computers, operating systems, networks are a hot mess. They're barely manageable, even if you know a decent amount about what you're doing. Nine out of ten software engineers agree: it's a miracle anything works at all."
@fasterthanlime
Avatar utente
Foto UtenteDonJ
4.611 6 10 13
Master EY
Master EY
 
Messaggi: 2559
Iscritto il: 19 lug 2009, 22:13
Località: Croccamauria

0
voti

[4] Re: error parameter and

Messaggioda Foto Utenteabsolutevalue » 17 mar 2010, 15:49

Per bobina o fatto come mi hai detto di spostare il file in c:\test e non mi da piu nessuno degli errori precedenti, ma se vado nella cartella il file HEX non c'è e sta il file errore che a creato e cioe il seguente:

Codice: Seleziona tutto
Warning[205] C:\TEST\PROVA.ASM 1 : Found directive in column 1. (PROCESSOR)
Warning[205] C:\TEST\PROVA.ASM 2 : Found directive in column 1. (RADIX)
Warning[216] C:\TEST\PROVA.ASM 2 : Radix superseded by command line.
Warning[205] C:\TEST\PROVA.ASM 3 : Found directive in column 1. (INCLUDE)
Warning[205] C:\TEST\PROVA.ASM 4 : Found directive in column 1. (__CONFIG)
Warning[205] C:\TEST\PROVA.ASM 5 : Found directive in column 1. (ORG)
Warning[205] C:\TEST\PROVA.ASM 8 : Found directive in column 1. (ORG)
Warning[203] C:\TEST\PROVA.ASM 9 : Found opcode in column 1. (bsf)
Warning[203] C:\TEST\PROVA.ASM 10 : Found opcode in column 1. (movlw)
Warning[203] C:\TEST\PROVA.ASM 11 : Found opcode in column 1. (movwf)
Message[302] C:\TEST\PROVA.ASM 11 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Warning[203] C:\TEST\PROVA.ASM 12 : Found opcode in column 1. (movlw)
Warning[203] C:\TEST\PROVA.ASM 13 : Found opcode in column 1. (movwf)
Message[302] C:\TEST\PROVA.ASM 13 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Warning[203] C:\TEST\PROVA.ASM 14 : Found opcode in column 1. (bcf)
Warning[203] C:\TEST\PROVA.ASM 15 : Found opcode in column 1. (movlw)
Warning[203] C:\TEST\PROVA.ASM 16 : Found opcode in column 1. (movwf)
Warning[203] C:\TEST\PROVA.ASM 17 : Found opcode in column 1. (clrf)
Warning[203] C:\TEST\PROVA.ASM 18 : Found opcode in column 1. (clrf)
Warning[203] C:\TEST\PROVA.ASM 19 : Found opcode in column 1. (clrf)
Warning[203] C:\TEST\PROVA.ASM 20 : Found opcode in column 1. (clrf)
Warning[203] C:\TEST\PROVA.ASM 21 : Found opcode in column 1. (bcf)
Error[118]   C:\TEST\PROVA.ASM 21 : Overwriting previous address contents (000C)
Error[118]   C:\TEST\PROVA.ASM 21 : Overwriting previous address contents (000C)
Error[118]   C:\TEST\PROVA.ASM 23 : Overwriting previous address contents (000D)
Error[118]   C:\TEST\PROVA.ASM 23 : Overwriting previous address contents (000D)
Error[118]   C:\TEST\PROVA.ASM 24 : Overwriting previous address contents (000E)
Error[118]   C:\TEST\PROVA.ASM 24 : Overwriting previous address contents (000E)
Warning[205] C:\TEST\PROVA.ASM 47 : Found directive in column 1. (END)
Avatar utente
Foto Utenteabsolutevalue
0 2
 
Messaggi: 5
Iscritto il: 22 gen 2010, 11:30

0
voti

[5] Re: error parameter and

Messaggioda Foto UtenteDonJ » 17 mar 2010, 16:27

Ti prego di usare la punteggiatura.

Ad ogni modo, l'errore del tuo programma sta nella dichiarazione delle variabili:
non così

Codice: Seleziona tutto
ORG 0CH
Count RES 2
Direz RES 1


ma

Codice: Seleziona tutto
Count EQU 0x0C
Direz EQU 0x0E
"Computers, operating systems, networks are a hot mess. They're barely manageable, even if you know a decent amount about what you're doing. Nine out of ten software engineers agree: it's a miracle anything works at all."
@fasterthanlime
Avatar utente
Foto UtenteDonJ
4.611 6 10 13
Master EY
Master EY
 
Messaggi: 2559
Iscritto il: 19 lug 2009, 22:13
Località: Croccamauria

0
voti

[6] Re: error parameter and

Messaggioda Foto Utenteabsolutevalue » 17 mar 2010, 16:40

Ok grazie per l'informazione DonJ adesso mi ha creato il file HEX.
Comunque un grazie anche a tutti quelli che mi hanno aiutato bye bye
Avatar utente
Foto Utenteabsolutevalue
0 2
 
Messaggi: 5
Iscritto il: 22 gen 2010, 11:30


Torna a Realizzazioni, interfacciamento e nozioni generali.

Chi c’è in linea

Visitano il forum: Nessuno e 14 ospiti