¿Qué error tiene este programa que mi PIC16F628a no imprime las variables en el LCD?

Buenas Noches a todos.

Soy Nuevo en la programacion de PIC´s y quisiera que me ayudaran con un Problem.

Tengo un codigo que hice se trata de un PIC16F628a y un LCD con programacion Mickro Basic Pro.

Lo que trato de hacer es en un LCD 16*2 Poner CADA 00:00 H/M (donde 00 son las horas : y 00 son los minutos)y que con un swich aumente los minutos y con otro las horas, despues otro swich (play) empieza a desender las hrs y los min que le haya programado y cuando llege a 00:00 me active un relevador. ok

El codigo que hice es este:

Código:
program dispensador

';variables de pines conctados al pic 16f628A

 symbol bot_suma = porta.0
 symbol bot_sum = porta.1
 symbol start_button = portb.6
 symbol clear_button = portb.7
 symbol rele = porta.4
 symbol ir   = porta.5
 

'textos imprimibles en el lcd

 dim txt1 as char [16]
     txt2 as char [9]
     txt3 as char [16]

'variables de almacenamiento  de datos

 dim hrs as byte
     min as byte

' conexion del LCD

dim LCD_RS as sbit at RB4_bit
    LCD_EN as sbit at RB5_bit
    LCD_D7 as sbit at RB3_bit
    LCD_D6 as sbit at RB2_bit
    LCD_D5 as sbit at RB1_bit
    LCD_D4 as sbit at RB0_bit

    LCD_RS_Direction as sbit at TRISB4_bit
    LCD_EN_Direction as sbit at TRISB5_bit
    LCD_D7_Direction as sbit at TRISB3_bit
    LCD_D6_Direction as sbit at TRISB2_bit
    LCD_D5_Direction as sbit at TRISB1_bit
    LCD_D4_Direction as sbit at TRISB0_bit
    
 ' termina la conexion del LCD


 sub procedure resta
      min:
        Min = Min -1
          If Min > 0 then
              goto min
          else
              Min = 0
          end if
 end sub
 

  main:
     CMCON = 7
     TRISA = %00111111
     TRISB = %11000000
     PORTA = 0
     PORTB = 0

  LCD_Init()


txt1 = "DISPENSADOR 2010"
txt2 = "STARK IND"
txt3 = "FALTA DE COMIDA"


  Lcd_Cmd(_LCD_CLEAR)               ' Limpia el LCD
  Lcd_Cmd(_LCD_CURSOR_OFF)          ' Apaga el cursor
  Lcd_Out(1,4,txt2)                 ' Coloca el txt2 en la primera linea
  Lcd_Out(2,1,txt1)                  ' Coloca el txt1 en la segunda linea
  Delay_ms(2000)                    ' Aparecen durante 2 seg.

'limpieza de variables creadas

Lcd_cmd(_LCD_CLEAR)

LCD_out(1,1,txt1)
LCD_out(2,1,"CADA")
LCD_chr(2,6,hrs)
LCD_out(2,9,":")
LCD_chr(2,14,min)


Hrs= 0
Min= 0

LOOP:

 if bot_sum = 0 then
    bot_sum = 1

  Min = Min + bot_sum

  if min = 60 then
     Min = 0
  end if
 end if
  
  if bot_suma = 0 then
     bot_suma = 1

  Hrs = Hrs + bot_sum

  if Hrs = 24 then
     Hrs = 0
  end if
  
  end if


  IF CLEAR_button = 0 THEN

    Hrs = 0
    Min = 0

    goto loop

  end if

  IF START_button = 0 THEN
      goto start
  end if
  
   start:
    Min = Min -1
    
    if Min > 0 then
       goto start
    else
       Hrs = Hrs-1
       Min = 59
    end if
    
    if Hrs > 0 then
         goto start
    else
      if Hrs = 0 then
       if Min > 0 then
         resta
       end if
      end if
    end if

   if Hrs = 0 then
        if Min = 0 then
             goto comida
   end if

  end if


comida:

      rele = 1
      Delay_ms(5)
      rele = 0
      Delay_ms(5000)
      goto loop
      
falta:

     if ir = 1 then
     
     Lcd_Cmd(_LCD_CLEAR)
     Lcd_Cmd(_LCD_CURSOR_OFF)
     Lcd_Out(1,1,txt1)
     Lcd_Out(2,1,txt3)
     
     end if

     if ir = 0 then
     
      goto loop
      
     else
     
       goto falta
       
     end if

end.

El programa no me mostro Error al COPILAR, pero cuando lo pongo en el PROTEUS no me aparecen las variables 00:00, que puede ser es el CODIGO?

Me pueden ayudar a resolver mi error porfavor :cry:

Muchas Gracias por su ayuda!! por adelantado :apreton:
 
Atrás
Arriba