problemas al copilar asm de pic 16f84

a todos lo de la comunidad con el repeto que se merecen si alguien me pude ayudar con el siguinente programa

; Cada vez que presiona el pulsador conectado a la línea RB0/INT conmutará el estado
; de un LED conectado a la línea RB1.
;
; ZONA DE DATOS **********************************************************************

__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
LIST P=16F84A
INCLUDE <P16F84A.INC>

CBLOCK 0x0C
ENDC

#DEFINE Pulsador PORTB,0 ; Línea donde se conecta el pulsador.
#DEFINE LED PORTB,1 ; Línea donde se conecta el LED.

; ZONA DE CÓDIGOS ********************************************************************

ORG 0
goto Inicio
ORG 4 ; Vector de interrupción
goto ServicioInterrupcion
Inicio
bsf STATUS,RP0 ; Acceso al Banco 1.
bsf Pulsador ; La línea RB0/INT se configura como entrada.
bcf LED ; Se configura como salida.
bcf OPTION_REG,NOT_RBPU ; Activa las resistencias de Pull-Up del Puerto B.
bcf OPTION_REG,INTEDG ; Interrupción INT se activa por flanco de bajada.
bcf STATUS,RP0 ; Acceso al Banco 0.
movlw b'10010000' ; Habilita la interrupción INT y la general.
movwf INTCON
Principal
sleep ; Pasa a modo bajo consumo y espera interrupciones.
goto Principal

; Subrutina "ServicioInterrupcion" ------------------------------------------------------
;
; Subrutina de atención a la interrupción. Conmuta el estado del LED.
;
ServicioInterrupcion
call Retardo_20ms
btfsc Pulsador
goto FinInterrupcion ; Era un rebote y por tanto sale.
btfsc LED ; Testea el último estado del LED.
goto EstabaEncendido
EstabaApagado
bsf LED ; Estaba apagado y lo enciende.
goto FinInterrupcion
EstabaEncendido
bcf LED ; Estaba encendido y lo apaga.
FinInterrupcion
bcf INTCON,INTF ; Limpia flag de reconocimiento de la interrupción.
retfie ; Retorna y rehabilita las interrupciones.

INCLUDE <RETARDOS.INC>
END

ya que el error que sale es este y no lo he podido copilar

Executing: "C:\Archivos de programa\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84A "rama interrupciones4.asm" /l"rama interrupciones4.lst" /e"rama interrupciones4.err" /d__DEBUG=1
Message[302] C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM 34 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM 35 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[113] C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM 48 : Symbol not previously defined (Retardo_20ms)
Error[105] C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM 62 : Cannot open file (Include File "RETARDOS.INC" not found)
Error[173] C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM 64 : Source file path exceeds 62 characters (C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM)
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\proyectos pic\practicas con milab ide\rama interrupciones 4.mcp' failed.
Preprocessor symbol `__DEBUG' is defined.
Sat Sep 18 11:25:47 2010
----------------------------------------------------------------------
BUILD FAILED

:rolleyes:
 
Ahí dice que la dirección entre tu archivo (ASM) y el compilador (MPASMWIN.exe) son muy largas (exceeds 62 characters), debes poner nombres más cortos.

Un saludo.
 
Error[105] C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM 62 : Cannot open file (Include File "RETARDOS.INC" not found)
esta claro no encuentra la libreria parece tambien que la direccion donde guardas este programa en tu computador es muy larga a mi me pasaba eso seguido

saludos
 
a todos lo de la comunidad con el repeto que se merecen si alguien me pude ayudar con el siguinente programa

; Cada vez que presiona el pulsador conectado a la línea RB0/INT conmutará el estado
; de un LED conectado a la línea RB1.
;
; ZONA DE DATOS **********************************************************************

__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
LIST P=16F84A
INCLUDE <P16F84A.INC>

CBLOCK 0x0C
ENDC

#DEFINE Pulsador PORTB,0 ; Línea donde se conecta el pulsador.
#DEFINE LED PORTB,1 ; Línea donde se conecta el LED.

; ZONA DE CÓDIGOS ********************************************************************

ORG 0
goto Inicio
ORG 4 ; Vector de interrupción
goto ServicioInterrupcion
Inicio
bsf STATUS,RP0 ; Acceso al Banco 1.
bsf Pulsador ; La línea RB0/INT se configura como entrada.
bcf LED ; Se configura como salida.
bcf OPTION_REG,NOT_RBPU ; Activa las resistencias de Pull-Up del Puerto B.
bcf OPTION_REG,INTEDG ; Interrupción INT se activa por flanco de bajada.
bcf STATUS,RP0 ; Acceso al Banco 0.
movlw b'10010000' ; Habilita la interrupción INT y la general.
movwf INTCON
Principal
sleep ; Pasa a modo bajo consumo y espera interrupciones.
goto Principal

; Subrutina "ServicioInterrupcion" ------------------------------------------------------
;
; Subrutina de atención a la interrupción. Conmuta el estado del LED.
;
ServicioInterrupcion
call Retardo_20ms
btfsc Pulsador
goto FinInterrupcion ; Era un rebote y por tanto sale.
btfsc LED ; Testea el último estado del LED.
goto EstabaEncendido
EstabaApagado
bsf LED ; Estaba apagado y lo enciende.
goto FinInterrupcion
EstabaEncendido
bcf LED ; Estaba encendido y lo apaga.
FinInterrupcion
bcf INTCON,INTF ; Limpia flag de reconocimiento de la interrupción.
retfie ; Retorna y rehabilita las interrupciones.

INCLUDE <RETARDOS.INC>
END

ya que el error que sale es este y no lo he podido copilar

Executing: "C:\Archivos de programa\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84A "rama interrupciones4.asm" /l"rama interrupciones4.lst" /e"rama interrupciones4.err" /d__DEBUG=1
Message[302] C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM 34 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM 35 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[113] C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM 48 : Symbol not previously defined (Retardo_20ms)
Error[105] C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM 62 : Cannot open file (Include File "RETARDOS.INC" not found)
Error[173] C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM 64 : Source file path exceeds 62 characters (C:\PROYECTOS PIC\PRACTICAS CON MILAB IDE\RAMA INTERRUPCIONES4.ASM)
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\proyectos pic\practicas con milab ide\rama interrupciones 4.mcp' failed.
Preprocessor symbol `__DEBUG' is defined.
Sat Sep 18 11:25:47 2010
----------------------------------------------------------------------
BUILD FAILED

:rolleyes:



:unsure: A ojo de buen cubero te digo lo siguiente:

1.- haces el llamado a una subrutina de retardo llamada Retardo_20ms la cual das por hecho que esta en RETARDOS.INC.

2.- el archivo RETARDOS.INC no contiene dicho retardo o no tienes dicho archivo que pones en tu programa.

3.- el nombre del programa que compilaste esta demasiado largo escoge uno mas corto
y guardalo directamente en una carpeta que este en C: (disco duro)


Sugerencias has el retardo hay mismo en el programa sin tener que usar el archivo RETARDOS.INC, reduce el nombre de tu programa a compilar, ordena en columnas las etiquetas, las instrucciones, los registros y los comentarios.

El tener una buena estructura del programa te ayudara a mejorar no solo su redaccion sino su comprencion ademas de que los errores seran mas faciles de localizar!!!!!!!!!:cool:


https://www.forosdeelectronica.com/f24/curso-tutorial-pic16f877-12890/ (y)


SALUDOS!!!
 
Atrás
Arriba