Aqui copio el programa tal cual pero NO funciona.No logro que salte de 10 en 10 y tampoco de 100 en 100.
Funciona si saco las lineas que uso para pasar de a 10 y 100.Es decir si suma 1 anda bien.
Otro problema es que en la linea PAUSE T1 si da 1000 (1000 MS = 1 segundo ) es un tiempo mayor a casi el doble o mas.....
Agradeceria alguna ayuda .
define LCD_BITS 4
define LCD_LINES 2
digit var word
M VAR BYTE ' Used to count and specify the case
W0 var byte
M1 var word
T3 var byte
T var word
B1 var byte
T1 var word
P var word
;portb.6 = modo y sube.
;portb.5 = baja.
;portb.7 = enter.
;portb.2 =
PAUSE 50
lcdout $fe,1,"Melectro" , $fe,$c0 ," 08"
PAUSE 1500
M1 = 0
modo1: lcdout $fe,1,"Modo1 ",#M1," MS"
PAUSE 150
pause 50
if portb.5 = 0 then call sube
t = t+1
if portb.5 = 0 and T>10 then call suberap
if portb.5 = 0 and T>100 then call suberap2
if portb.6 = 0 then call baja
if portb.6 = 0 and T>10 then call bajarap
if portb.6 = 0 and T>100 then call bajarap2
if portb.7 = 0 then call start
goto modo1
return
sube: M1 = M1 + 1
pause 50
if M1 > 9999 then M1 = 0
return
baja: M1 = M1 - 1
pause 100
if M1 > 9999 then M1 = 0
return
suberap: M1 = M1 + 10
pause 100
return
suberap2: M1 = M1 + 100
pause 100
return
bajarap: M1 = M1 - 10
pause 100
return
bajarap2: M1 = M1 - 100
pause 100
return
start:
lcdout $fe,1,"Tiempo = ",#M1," MS "
pause 100
Pulsin portb.2,0,B1
If B1 <> 0 Then disparo1
goto start
disparo1: low portb.4
lcdout $fe,1,#M1," MS"," INICIADOS"
T1 = (M1)*1000
pause T1
call dispa
dispa:
high portb.4:high portb.1 ;salida a led y a beeper
pause 1000
low portb.4 :low portb.1
goto modo1
end