Autor Tema: Ayuda PIC 16f877 error RETURN CALL codigo  (Leído 1685 veces)

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

Desconectado NicolasVilla

  • PIC10
  • *
  • Mensajes: 2
Ayuda PIC 16f877 error RETURN CALL codigo
« en: 09 de Agosto de 2013, 13:23:04 »
Hola, mi codigo al compilarlo me tira todo bien, lo pongo en el pic en proteus, simulo y me tira mensajes de error sobre la instruccion RETURN y CALL
Código: [Seleccionar]
Define LCD_DREG PORTC
define LCD_DBIT 4
define LCD_RSREG PORTC
define LCD_RSBIT 3
define LCD_EREG PORTC
Define LCD_EBIT 2
DEFINE OSC 4
ledgreen var portb.3
ledred var portb.4
portb.3=1
portb.4=1
x var byte

CONTROL var PortB.0 'Pin 0
INCREMENTAR var PortB.1'Pin 1
DISMINUIR var PortB.2'Pin 2

PORTB=%00000110
PORTB.0=0

LCDOUT $FE, 1 'Limpiar LCD
lcdout $FE, 1, "Bienvenidos al"'Primer linea
lcdout $FE, $c0, "proyecto" 'Segunda linea
pause 1000
Lcdout $FE, 1 'Limpiar LCD
lcdout $FE, 1, "Hecho en basic"
lcdout $FE, $c0, "Por"
pause 1000
lcdout $FE, 1 'Limpiar LCD
lcdout $FE, 1, "Lucas Giovannoni"
lcdOUT $FE, $c0,"y Nicolas Villa"
pause 500

INICIO:
pulsout control, x
Pause 500
lcdout $FE, 1, "Impulso hacia"
lcdout $FE, $C0, DEC x
gosub timer
gosub inicio

TIMER:
if incrementar=0 then gosub MAS
if disminuir=0 then gosub menos
return

MAS:
high ledgreen
x=x+1
if x>250 then x=250
return

MENOS:
high ledred
x=x-1
if x<50 then x=50
return
END