Autor Tema: soy principiante y tengo problemas al ensamblar  (Leído 11643 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado mauriciofica

  • PIC10
  • *
  • Mensajes: 4
soy principiante y tengo problemas al ensamblar
« en: 18 de Octubre de 2012, 00:11:55 »
Hola a todos,
Estoy aquí por que creo que me pueden ayudar a solucionar un problema. Estoy tratando de crear un archivo *.hex desde un *.asm, en el mplab ide v8.86 es un programa de un cruce de semaforos para pic16f84 que encontré en internet pero cuando lo trato de convertir a hex me salen muchos errores y mensajes, he revisado en codigo y creo que anda bien, voy a dejar el programa y los errores que me aparecen cuando trato de compilarlo. OJALA ALGUIEN ME PUEDA DAR UNA AYUDA POR FAVOR.

===EL PROGRAMA COMIENZA AQUI======
list P=16f84A
r=dec
include P16F84A.inc
__CONFIG _CP_OFF & _PWRTE_OFF & _WDT_ON & _XT_OSC

; ZONA DE CÓDIGOS ****
org 0
goto principal
org 4
goto irq
cuenta equ 16
rp2 equ 7
rp1 equ 6
vp2 equ 1
vp1 equ 0
contador equ 0x10
retardo equ 0x11
principal:
   movlw b'10000111'
   bsf status, rp0
   movwf option_reg
   bcf status, rp0
   bsf status, rp0
   clrf trisb
   clrf trisa
   bcf status, rp0
   clr contador
   movlw b'10011110'
   movwf portb
   bcf porta, vp2
   bsf porta, vp1
   movlw cuenta
   movwf tmr0
   movlw b'10100000'
   movwf intcon
espera:
   clrwdt
goto espera
irq:
      movlw cuenta
      movwf tmr0
      incf retardo
      movlw 5
      subwf retardo, w
      btfss status, z
      goto finswitch
      clrf retardo
      incf contador, f
caso 20:
   movlw 40
   subwf contador, w
   btfsc status, c
   goto fincaso20
   movlw b'10011110'
   movlw portb
   bcf porta, vp2
   bsf porta, vp1
   goto finswitch
fincaso20:
caso25:
   movlw 50
   subwf contador, w
   btfsc status, c
   goto fincaso25
   movlw b'10011110'
   movwf portb
   btfsc contador, 0
   goto finswitch
   movlw b'10'
   xorwf porta, f
   goto finswitch
fincaso25:
caso30:
   movlw 60
   subwf contador, w
   btfsc status, c
   goto fincaso 30
   movlw b'00000010'
   xorwf portb, f
   bsf portb, 0
   btfsc contador, 0
   goto finswitch
   movlw b'10'
   xorwf porta, f
   goto finswitch
fincaso30:
caso50:
   movlw 100
   subwf contador, w
   btfsc status, c
   goto fincaso50
   movlw b'01110011'
   movwf portb
   bsf porta, vp2
   bcf porta, vp1
   goto finswitch
fincaso50:
caso55:
   movlw 110
   subwf contador, w
   btfsc status, c
   goto fincaso55
   movlw b'01110011'
   movwf portb
   btfss contador, 0
   goto finswitch
   movlw b'01'
   xorwf porta, f
   goto finswitch
fincaso55:
caso60:
   movlw 120
   subwf contador, w
   btfsc status, c
   goto fincaso60
   movlw b'00010000'
   btfss contador, 0
   bsf w, vp1
   xorwf portb, f
   bsf portb, 3
   btfsc contador, 0
   goto finswitch
   movlw b'01'
   xorwf porta, f
   goto finswitch
fincaso60:
otherwise:
   movlw b'10011110'
   movwf portb
   bcf porta, vp2
   bsf porta, vp1
   clrf contador
finswitch:
movlw b'10100000'
movwf intcon
retfie
end


=====LUEGO CUANDO TRATO DE COMPILAR ME SALE ESTO =====

----------------------------------------------------------------------
Debug build of project `C:\pic\en_asm\semaforo7.mcp' started.
Language tool versions: MPASMWIN.exe v5.46, mplink.exe v4.44, mplib.exe v4.44
Preprocessor symbol `__DEBUG' is defined.
Wed Oct 17 23:57:19 2012
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\pic\en_asm\semaforo7.mcs".
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84A "semaforo_plis.asm" /l"semaforo_plis.lst" /e"semaforo_plis.err" /o"semaforo_plis.o" /d__DEBUG=1
Warning[205] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 1 : Found directive in column 1. (list)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 2 : Symbol not previously defined (dec)
Warning[205] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 3 : Found directive in column 1. (include)
Warning[205] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 4 : Found directive in column 1. (__CONFIG)
Warning[205] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 7 : Found directive in column 1. (org)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 8 : Found opcode in column 1. (goto)
Warning[205] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 9 : Found directive in column 1. (org)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 10 : Found opcode in column 1. (goto)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 20 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 20 : Symbol not previously defined (rp0)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 21 : Symbol not previously defined (option_reg)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 22 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 22 : Symbol not previously defined (rp0)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 23 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 23 : Symbol not previously defined (rp0)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 24 : Symbol not previously defined (trisb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 25 : Symbol not previously defined (trisa)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 26 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 26 : Symbol not previously defined (rp0)
Warning[207] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 27 : Found label after column 1. (clr)
Error[122]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 27 : Illegal opcode (contador)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 29 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 30 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 31 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 33 : Symbol not previously defined (tmr0)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 35 : Symbol not previously defined (intcon)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 38 : Found opcode in column 1. (goto)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 41 : Symbol not previously defined (tmr0)
Message[305] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 42 : Using default destination of 1 (file).
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 45 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 45 : Symbol not previously defined (z)
Error[108]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 49 : Illegal character (2)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 52 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 52 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 55 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 56 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 57 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 63 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 63 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 66 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 70 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 76 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 76 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 77 : Symbol not previously defined (fincaso)
Error[112]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 77 : Missing operator
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 79 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 80 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 84 : Symbol not previously defined (porta)
Warning[202] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 88 : Argument out of range.  Least significant bits used.
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 90 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 90 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 93 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 94 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 95 : Symbol not previously defined (porta)
Warning[202] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 99 : Argument out of range.  Least significant bits used.
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 101 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 101 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 104 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 108 : Symbol not previously defined (porta)
Warning[202] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 112 : Argument out of range.  Least significant bits used.
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 114 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 114 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 118 : Symbol not previously defined (w)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 119 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 120 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 124 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 129 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 130 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 131 : Symbol not previously defined (porta)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 134 : Found opcode in column 1. (movlw)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 135 : Found opcode in column 1. (movwf)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 135 : Symbol not previously defined (intcon)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 136 : Found opcode in column 1. (retfie)
Warning[205] C:\PIC\EN_ASM\SEMAFORO_PLIS.ASM 137 : Found directive in column 1. (end)
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\pic\en_asm\semaforo7.mcp' failed.
Language tool versions: MPASMWIN.exe v5.46, mplink.exe v4.44, mplib.exe v4.44
Preprocessor symbol `__DEBUG' is defined.
Wed Oct 17 23:57:25 2012
----------------------------------------------------------------------
BUILD FAILED



POR FAVOR QUE ALGUIEN ME AYUDE PLIS!!!

Desconectado Fer_TACA

  • Moderadores
  • DsPIC33
  • *****
  • Mensajes: 4154
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #1 en: 18 de Octubre de 2012, 01:58:13 »
Creo que no te esta cogiendo la sentencia de incluir la definicion de los registros.
Ahora no me acuerdo bien del asm pero en:

- include pic16f84a.in que tienes colocado no le falta el signo   "#"
- y creo que le pasa lo mismo a la directiva "list"
- Por otra parte, si vas a utilizar algun registro de forma particular tambien tienes que declararlo inicialmente y colocar si direcion; como puede ser el registro "dec".

pero vaya creo que el problema está en la configuracion inicial antes de donde pones la "Zona de codigo"
Una forma mas correcta de colocarlo seria :


LIST   P=16F84A,            ; usar PIC 16F84A11.
#include <p16f84A.inc>



F.
« Última modificación: 18 de Octubre de 2012, 02:07:20 por Fer_TACA »
Todos los días se aprende algo nuevo.

Desconectado diguito_69

  • PIC16
  • ***
  • Mensajes: 136
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #2 en: 18 de Octubre de 2012, 02:13:18 »
Prueba con esto

Código: ASM
  1. INCLUDE      <P16F84A.INC>

Saludos.
"Carezco de un don especial. Sólo soy apacionadamente curioso". Albert Einstein.

Desconectado mauriciofica

  • PIC10
  • *
  • Mensajes: 4
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #3 en: 18 de Octubre de 2012, 09:12:03 »
Creo que no te esta cogiendo la sentencia de incluir la definicion de los registros.
Ahora no me acuerdo bien del asm pero en:

- include pic16f84a.in que tienes colocado no le falta el signo   "#"
- y creo que le pasa lo mismo a la directiva "list"
- Por otra parte, si vas a utilizar algun registro de forma particular tambien tienes que declararlo inicialmente y colocar si direcion; como puede ser el registro "dec".

pero vaya creo que el problema está en la configuracion inicial antes de donde pones la "Zona de codigo"
Una forma mas correcta de colocarlo seria :


LIST   P=16F84A,            ; usar PIC 16F84A11.
#include <p16f84A.inc>



F.


Hola Gracias, por responder:
He realizado lo que me indicas, pero aún sigo sin resultados positivos.

Desconectado AngelGris

  • Colaborador
  • PIC24H
  • *****
  • Mensajes: 2480
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #4 en: 18 de Octubre de 2012, 09:36:50 »
  Por lo que dice el error tiene la directiva "include" en la columna 1 y eso está mal. Prueba dejando un espacio, yo solía usar el "TAB". Lo mismo ocurre con la directiva "list"
De vez en cuando la vida
nos besa en la boca
y a colores se despliega
como un atlas

Desconectado mauriciofica

  • PIC10
  • *
  • Mensajes: 4
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #5 en: 18 de Octubre de 2012, 10:01:06 »
Hola, Gracias por responder:

He estado realizando las modificaciones que me han recomendado todos, pero aún sigo con errores (113), aunque menos que antes:

Debug build of project `C:\pic\en_asm\semaforo10.mcp' started.
Language tool versions: MPASMWIN.exe v5.46, mplink.exe v4.44, mplib.exe v4.44
Preprocessor symbol `__DEBUG' is defined.
Thu Oct 18 09:56:32 2012
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84A "semaforo_ok.asm" /l"semaforo_ok.lst" /e"semaforo_ok.err" /o"semaforo_ok.o" /d__DEBUG=1
Warning[205] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 7 : Found directive in column 1. (ORG)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 8 : Found opcode in column 1. (GOTO)
Warning[205] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 9 : Found directive in column 1. (ORG)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 10 : Found opcode in column 1. (GOTO)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 20 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 20 : Symbol not previously defined (rp0)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 21 : Symbol not previously defined (option_reg)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 22 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 22 : Symbol not previously defined (rp0)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 23 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 23 : Symbol not previously defined (rp0)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 24 : Symbol not previously defined (trisb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 25 : Symbol not previously defined (trisa)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 26 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 26 : Symbol not previously defined (rp0)
Warning[207] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 27 : Found label after column 1. (clr)
Error[122]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 27 : Illegal opcode (contador)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 29 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 30 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 31 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 33 : Symbol not previously defined (tmr0)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 35 : Symbol not previously defined (intcon)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 38 : Found opcode in column 1. (goto)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 41 : Symbol not previously defined (tmr0)
Message[305] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 42 : Using default destination of 1 (file).
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 45 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 45 : Symbol not previously defined (z)
Error[108]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 49 : Illegal character (2)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 52 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 52 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 55 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 56 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 57 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 63 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 63 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 66 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 70 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 76 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 76 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 77 : Symbol not previously defined (fincaso)
Error[112]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 77 : Missing operator
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 79 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 80 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 84 : Symbol not previously defined (porta)
Warning[202] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 88 : Argument out of range.  Least significant bits used.
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 90 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 90 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 93 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 94 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 95 : Symbol not previously defined (porta)
Warning[202] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 99 : Argument out of range.  Least significant bits used.
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 101 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 101 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 104 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 108 : Symbol not previously defined (porta)
Warning[202] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 112 : Argument out of range.  Least significant bits used.
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 114 : Symbol not previously defined (status)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 114 : Symbol not previously defined (c)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 118 : Symbol not previously defined (w)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 119 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 120 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 124 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 129 : Symbol not previously defined (portb)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 130 : Symbol not previously defined (porta)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 131 : Symbol not previously defined (porta)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 134 : Found opcode in column 1. (movlw)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 135 : Found opcode in column 1. (movwf)
Error[113]   C:\PIC\EN_ASM\SEMAFORO_OK.ASM 135 : Symbol not previously defined (intcon)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 136 : Found opcode in column 1. (retfie)
Warning[205] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 137 : Found directive in column 1. (end)
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\pic\en_asm\semaforo10.mcp' failed.
Language tool versions: MPASMWIN.exe v5.46, mplink.exe v4.44, mplib.exe v4.44
Preprocessor symbol `__DEBUG' is defined.
Thu Oct 18 09:56:36 2012
----------------------------------------------------------------------
BUILD FAILED


El programa modificado es este:

   LIST P=16f84A

   #INCLUDE <P16F84A.INC>
   __CONFIG _CP_OFF & _PWRTE_OFF & _WDT_ON & _XT_OSC

; ZONA DE CÓDIGOS ****
ORG 0
GOTO principal
ORG 4
GOTO irq
cuenta equ 16
rp2 equ 7
rp1 equ 6
vp2 equ 1
vp1 equ 0
contador equ 0x10
retardo equ 0x11
principal:
   movlw b'10000111'
   bsf status, rp0
   movwf option_reg
   bcf status, rp0
   bsf status, rp0
   clrf trisb
   clrf trisa
   bcf status, rp0
   clr contador
   movlw b'10011110'
   movwf portb
   bcf porta, vp2
   bsf porta, vp1
   movlw cuenta
   movwf tmr0
   movlw b'10100000'
   movwf intcon
espera:
   clrwdt
goto espera
irq:
      movlw cuenta
      movwf tmr0
      incf retardo
      movlw 5
      subwf retardo, w
      btfss status, z
      goto finswitch
      clrf retardo
      incf contador, f
caso 20:
   movlw 40
   subwf contador, w
   btfsc status, c
   goto fincaso20
   movlw b'10011110'
   movlw portb
   bcf porta, vp2
   bsf porta, vp1
   goto finswitch
fincaso20:
caso25:
   movlw 50
   subwf contador, w
   btfsc status, c
   goto fincaso25
   movlw b'10011110'
   movwf portb
   btfsc contador, 0
   goto finswitch
   movlw b'10'
   xorwf porta, f
   goto finswitch
fincaso25:
caso30:
   movlw 60
   subwf contador, w
   btfsc status, c
   goto fincaso 30
   movlw b'00000010'
   xorwf portb, f
   bsf portb, 0
   btfsc contador, 0
   goto finswitch
   movlw b'10'
   xorwf porta, f
   goto finswitch
fincaso30:
caso50:
   movlw 100
   subwf contador, w
   btfsc status, c
   goto fincaso50
   movlw b'01110011'
   movwf portb
   bsf porta, vp2
   bcf porta, vp1
   goto finswitch
fincaso50:
caso55:
   movlw 110
   subwf contador, w
   btfsc status, c
   goto fincaso55
   movlw b'01110011'
   movwf portb
   btfss contador, 0
   goto finswitch
   movlw b'01'
   xorwf porta, f
   goto finswitch
fincaso55:
caso60:
   movlw 120
   subwf contador, w
   btfsc status, c
   goto fincaso60
   movlw b'00010000'
   btfss contador, 0
   bsf w, vp1
   xorwf portb, f
   bsf portb, 3
   btfsc contador, 0
   goto finswitch
   movlw b'01'
   xorwf porta, f
   goto finswitch
fincaso60:
otherwise:
   movlw b'10011110'
   movwf portb
   bcf porta, vp2
   bsf porta, vp1
   clrf contador
finswitch:
movlw b'10100000'
movwf intcon
retfie
end


Espero que puedan seguir ayudandome.. GRACIAS !!!

Desconectado Fer_TACA

  • Moderadores
  • DsPIC33
  • *****
  • Mensajes: 4154
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #6 en: 18 de Octubre de 2012, 10:03:08 »
Prueba con esto

Código: ASM
  1. INCLUDE      <P16F84A.INC>

Saludos.

¿Has probado esto?
Todos los días se aprende algo nuevo.

Desconectado Fer_TACA

  • Moderadores
  • DsPIC33
  • *****
  • Mensajes: 4154
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #7 en: 18 de Octubre de 2012, 10:04:24 »
Prueba con esto

Código: ASM
  1. INCLUDE      <P16F84A.INC>

Saludos.

¿Has probado esto, sin el simbolo "#"?
Todos los días se aprende algo nuevo.

Desconectado AngelGris

  • Colaborador
  • PIC24H
  • *****
  • Mensajes: 2480
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #8 en: 18 de Octubre de 2012, 11:13:49 »
  No quiero parecer grosero y de antemano pido disculpas si mi comentario resulta ofensivo.

  Hay muchos warning que son de fácil resolución con simplemente tener a mano un diccionario de ingles-español.

  Ellos son todos los que indican "found cirective in column 1" "found opcode in column 1" "found label after column 1"

  Con respecto a los símbolos no definidos previamente... ¿No será que tienen que estar escritos en mayúsculas?
De vez en cuando la vida
nos besa en la boca
y a colores se despliega
como un atlas

Desconectado diguito_69

  • PIC16
  • ***
  • Mensajes: 136
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #9 en: 18 de Octubre de 2012, 11:49:48 »
Como dice AngelGris, esos símbolos tienen que estar en mayusculas.

Ademas tenes que sacarle el # a include y tenes algunas etiquetas mal escritas.

Saludos.

"Carezco de un don especial. Sólo soy apacionadamente curioso". Albert Einstein.

Desconectado Fer_TACA

  • Moderadores
  • DsPIC33
  • *****
  • Mensajes: 4154
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #10 en: 18 de Octubre de 2012, 13:22:27 »
Pienso que como en su programa no tiene declarados de forma manual esos registros, si estuviera bien escrita la sentencia "include <P16F84A.inc>y el compilador lozalizase el fichero "*.inc", no haria falta que escribiese el nombre de los registros en mayusculas.

¿Tienes el fichero: P16F84A.INC?

Otra cosa adicional que puede ser necesaria es el escribir la linea de los "CONFICG" antes de las instrucciones : LIST e INCLUDE.



Fermin
Todos los días se aprende algo nuevo.

Desconectado diguito_69

  • PIC16
  • ***
  • Mensajes: 136
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #11 en: 18 de Octubre de 2012, 14:58:45 »
El problema esta en que seguramente tenes activada la opción "Case Sensitive", por eso no reconoce los símbolos, ya que en el archivo *.inc están con mayúsculas.

Desactiva esta opción o escribí esos símbolos en mayúsculas.

Revisa bien tu programa ya que el problema no es solo lo de las mayúsculas, sino que también tenes algunas etiquetas mal escritas por ejemplo.

Así es un ejemplo de como te tendría que quedar las primeras lineas:

Código: ASM
  1. LIST P=16f84A
  2.     radix dec
  3.     INCLUDE <P16F84A.INC>
  4.              
  5.     __CONFIG _CP_OFF & _PWRTE_OFF & _WDT_ON & _XT_OSC
  6.  
  7. cuenta equ 16
  8. rp2 equ 7
  9. rp1 equ 6
  10. vp2 equ 1
  11. vp1 equ 0
  12. contador equ 0x10
  13. retardo equ 0x11
  14.  
  15. ; ZONA DE CÓDIGOS ****
  16.   ORG 0
  17.   GOTO principal
  18.   ORG 4
  19.   GOTO irq
  20.  
  21. principal:
  22.    movlw b'10000111'
  23.    bsf STATUS, RP0
  24.    movwf OPTION_REG
  25.    bcf STATUS, RP0
  26.  ....etc
  27.    end

Saludos.
"Carezco de un don especial. Sólo soy apacionadamente curioso". Albert Einstein.

Desconectado mauriciofica

  • PIC10
  • *
  • Mensajes: 4
Re: soy principiante y tengo problemas al ensamblar
« Respuesta #12 en: 18 de Octubre de 2012, 23:19:14 »
Estimados Amigos!!! les agradezco toda la ayuda facilitada, por fín gracias a la ayuda que me dieron todos Uds, pude comprender mis errores...  ((:-))

Ahora solo tengo mensajes de advertencia y no errores y el archivo se pudo compilar, este mensaje obtengo (al compilar):

----------------------------------------------------------------------
Debug build of project `C:\pic\en_asm\vamos.mcp' started.
Language tool versions: MPASMWIN.exe v5.46, mplink.exe v4.44, mplib.exe v4.44
Preprocessor symbol `__DEBUG' is defined.
Thu Oct 18 23:06:16 2012
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84A "semaforo_ok.asm" /l"semaforo_ok.lst" /e"semaforo_ok.err" /o"semaforo_ok.o" /d__DEBUG=1
Message[302] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 23 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 26 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 27 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Warning[203] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 40 : Found opcode in column 1. (GOTO)
Message[305] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 44 : Using default destination of 1 (file).
Warning[203] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 136 : Found opcode in column 1. (MOVLW)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 137 : Found opcode in column 1. (MOVWF)
Warning[203] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 138 : Found opcode in column 1. (RETFIE)
Warning[205] C:\PIC\EN_ASM\SEMAFORO_OK.ASM 139 : Found directive in column 1. (END)
Executing: "C:\Program Files\Microchip\MPASM Suite\mplink.exe" /p16F84A "semaforo_ok.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"vamos.cof" /M"vamos.map" /W
MPLINK 4.43, Linker
Device Database Version 1.9
Copyright (c) 1998-2011 Microchip Technology Inc.
Errors    : 0

MP2HEX 4.43, COFF to HEX File Converter
Copyright (c) 1998-2011 Microchip Technology Inc.
Errors    : 0

Loaded C:\pic\en_asm\vamos.cof.
----------------------------------------------------------------------
Debug build of project `C:\pic\en_asm\vamos.mcp' succeeded.
Language tool versions: MPASMWIN.exe v5.46, mplink.exe v4.44, mplib.exe v4.44
Preprocessor symbol `__DEBUG' is defined.
Thu Oct 18 23:06:22 2012
----------------------------------------------------------------------
BUILD SUCCEEDED

Este es el programa que me ayudaron, ahora arreglado por si alguno quiere utilizarlo algún día, solo decir que quedan algunos mensages de advertencia, pero creo que igual debe funcionar al implementarlo en el circuito electrónico:

LIST P=PIC16f84A
   RADIX DEC
   INCLUDE <P16F84A.INC>
   __CONFIG _CP_OFF & _PWRTE_OFF & _WDT_ON & _XT_OSC

; ZONA DE CÓDIGOS ****

cuenta equ 16
rp2 equ 7
rp1 equ 6
vp2 equ 1
vp1 equ 0
contador equ 0x10
retardo equ 0x11
   ORG 0
   GOTO principal
   ORG 4
   GOTO irq

principal:
   MOVLW b'10000111'
   BSF STATUS, RP0
   MOVWF OPTION_REG
   BCF STATUS, RP0
   BSF STATUS, RP0
   CLRF TRISB
   CLRF TRISA
   BCF STATUS, RP0
   CLRF contador
   MOVLW b'10011110'
   MOVWF PORTB
   BCF PORTA, vp2
   BSF PORTA, vp1
   MOVLW cuenta
   MOVWF TMR0
   MOVLW b'10100000'
   MOVWF INTCON
espera:
   CLRWDT
GOTO espera
irq:
      MOVLW cuenta
      MOVWF TMR0
      INCF retardo
      MOVLW 5
      SUBWF retardo, w
      BTFSS STATUS, Z
      GOTO finswitch
      CLRF retardo
      INCF contador, f
caso20:
   MOVLW 40
   SUBWF contador, w
   BTFSC STATUS, C
   GOTO fincaso20
   MOVLW b'10011110'
   MOVLW PORTB
   BCF PORTA, vp2
   BSF PORTA, vp1
   GOTO finswitch
fincaso20:
caso25:
   MOVLW 50
   SUBWF contador, w
   BTFSC STATUS, C
   GOTO fincaso25
   MOVLW b'10011110'
   MOVWF PORTB
   BTFSC contador, 0
   GOTO finswitch
   MOVLW b'10'
   XORWF PORTA, f
   GOTO finswitch
fincaso25:
caso30:
   MOVLW 60
   SUBWF contador, w
   BTFSC STATUS, C
   GOTO fincaso30
   MOVLW b'00000010'
   XORWF PORTB, f
   BSF PORTB, 0
   BTFSC contador, 0
   GOTO finswitch
   MOVLW b'10'
   XORWF PORTA, f
   GOTO finswitch
fincaso30:
caso50:
   MOVLW 100
   SUBWF contador, w
   BTFSC STATUS, C
   GOTO fincaso50
   MOVLW b'01110011'
   MOVWF PORTB
   BSF PORTA, vp2
   BCF PORTA, vp1
   GOTO finswitch
fincaso50:
caso55:
   MOVLW 110
   SUBWF contador, w
   BTFSC STATUS, C
   GOTO fincaso55
   MOVLW b'01110011'
   MOVWF PORTB
   BTFSS contador, 0
   GOTO finswitch
   MOVLW b'01'
   XORWF PORTA, f
   GOTO finswitch
fincaso55:
caso60:
   MOVLW 120
   SUBWF contador, w
   BTFSC STATUS, C
   GOTO fincaso60
   MOVLW b'00010000'
   BTFSS contador, 0
   BSF W, vp1
   XORWF PORTB, f
   BSF PORTB, 3
   BTFSC contador, 0
   GOTO finswitch
   MOVLW b'01'
   XORWF PORTA, f
   GOTO finswitch
fincaso60:
otherwise:
   MOVLW b'10011110'
   MOVWF PORTB
   BCF PORTA, vp2
   BSF PORTA, vp1
   CLRF contador
finswitch:
MOVLW b'10100000'
MOVWF INTCON
RETFIE
END

LO OTRO QUE ES SUPER IMPORTANTE ES MENCIONAR QUE EN ARCHIVO *.INC LA DIRECTIVA SALE DECLARADA ASÍ "LIST P=PIC16F84A" Y NO "LIST P=P16F84A".

NUEVAMENTE AGRADECER A LOS AMIGOS QUE ME AYUDARON  ((:-))