Tengo el siguiente programa para un 16f84, pero no resetea al intentarlo, creo que se hace añadiendo las primeras lineas del programa, pero no me funciona, esta correctamente añadida???
Gracias de antemano.
Asm
ORG 0X00
GOTO INICIO
Endasm
DEFINE OSC 4
TRISA=1
TRISB=0
T VAR WORD
poten var byte
contador var byte
contado var byte
tiempo var word
LOOP:
TRISB=0
pot porta.2,255,poten
if poten < 10 then contado = 0
if poten > 20 and poten < 50 then contado = 1
if poten > 65 and poten < 95 then contado = 2
if poten > 110 and poten < 140 then contado = 3
if poten > 155 and poten < 185 then contado = 4
if poten > 200 then contado = 5
if contado <> contador then t = 0
contador = contado
TIEMPO = CONTADOR * 49
CODIGO1:
LOOKUP CONTADOR,[%11101110,%10000010,%11011100,%11011010,%10110010,_
%01111010],PORTB
if t < tiempo and contador > 0 then
low porta.1
low porta.3
high porta.0
pause 199
t = t + 1
endif
if t >= tiempo and t < 343 then
high porta.1
high porta.3
low porta.0
pause 199
t = t + 1
endif
if t >= 343 then t = 0
goto loop
CODIGO:
PAUSE 20
GOTO CODIGO1