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!!!!!!!!!!!!!!!!!!!!!
error parameter and
Moderatore:
Paolino
6 messaggi
• Pagina 1 di 1
0
voti
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
PS
Metti il tuo codice nei tag code
- Codice: Seleziona tutto
Esempio Sorgente
0
voti
Il codice d'errore che hai riportato l'hai copiato dal compilatore?
Comunque un minimo di indentazione nel sorgente non farebbe male
edit:
comunque, perché non lo provi con MPLAB che è decisamente più comodo?
Comunque un minimo di indentazione nel sorgente non farebbe male
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
@fasterthanlime
0
voti
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)
-

absolutevalue
0 2 - Messaggi: 5
- Iscritto il: 22 gen 2010, 11:30
0
voti
Ti prego di usare la punteggiatura.
Ad ogni modo, l'errore del tuo programma sta nella dichiarazione delle variabili:
non così
ma
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
@fasterthanlime
0
voti
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
Comunque un grazie anche a tutti quelli che mi hanno aiutato bye bye
-

absolutevalue
0 2 - Messaggi: 5
- Iscritto il: 22 gen 2010, 11:30
6 messaggi
• Pagina 1 di 1
Torna a Realizzazioni, interfacciamento e nozioni generali.
Chi c’è in linea
Visitano il forum: Nessuno e 14 ospiti

Elettrotecnica e non solo (admin)
Un gatto tra gli elettroni (IsidoroKZ)
Esperienza e simulazioni (g.schgor)
Moleskine di un idraulico (RenzoDF)
Il Blog di ElectroYou (webmaster)
Idee microcontrollate (TardoFreak)
PICcoli grandi PICMicro (Paolino)
Il blog elettrico di carloc (carloc)
DirtEYblooog (dirtydeeds)
Di tutto... un po' (jordan20)
AK47 (lillo)
Esperienze elettroniche (marco438)
Telecomunicazioni musicali (clavicordo)
Automazione ed Elettronica (gustavo)
Direttive per la sicurezza (ErnestoCappelletti)
EYnfo dall'Alaska (mir)
Apriamo il quadro! (attilio)
H7-25 (asdf)
Passione Elettrica (massimob)
Elettroni a spasso (guidob)
Bloguerra (guerra)


