Ir ao conteúdo
  • Cadastre-se
Entre para seguir isso  
LEOPUENA

[Resolvido] Memoria do PIC16F877

Recommended Posts

Oi pessoal, estou com um problema que na verdade já resolvi mas fiquei intrigado. Eu programo em assembly e uso o MPLAB 8.3

Fiz um controlador de cargas por telefone, ele liga e desliga até 4 cargas (mas podem ser mais), e envia sms para o usuario a confirmar a carga ligada, o programa ficou muito extenso e quando eu fiz os ultimos acrescimos ele deu um erro que achei "estranho", o compilador não informou qual era o erro, só dizia que havia um erro.

Daí eu primeiro apaguei algumas linhas do programa e ele compilou, como se o problema fosse o espaço na memoria. Então simplifiquei o programa criando subrotinas e ele compilou e está a trabalhar normalmente.

Eu não sei bem o que se passou e não acho que atingi o limite da memoria. vou mostrar o codigo pra vocês analizarem.

;--------------------------------------------------------------

;Este projecto é um controlador de cargas por telefone

;com aviso por sms -

;criado por LeoPUENA aos 06.01.2011 -

;------------------------------------------------------------

list p=16f877

Include <p16f877.inc>

__Config _xt_osc & _wdt_off & _Cp_off & _pwrte_on

;********************************************************************

Digital equ b'00000110'

CBLOCK 20H

ATRASO

FLAG

FLAG2

FLAG3

TEST

CONTADOR

ENDC

#DEFINE TEL_MOD PORTA,0

#DEFINE TEL_CAG PORTA,1

#DEFINE AD PORTA,2

#DEFINE BD PORTA,3

#DEFINE CD PORTD,7

#DEFINE DD PORTA,5

#DEFINE ED PORTE,0

#DEFINE FD PORTE,1

#DEFINE GD PORTE,2

#DEFINE CH_SMS PORTA,4

#DEFINE LED1 PORTB,5

#DEFINE LED2 PORTB,6

#DEFINE LED3 PORTB,7

#DEFINE LED4 PORTD,5

#DEFINE CARGA1 PORTB,0

#DEFINE CARGA2 PORTB,1

#DEFINE CARGA3 PORTB,2

#DEFINE CARGA4 PORTB,3

#DEFINE CH1 PORTC,0

#DEFINE CH2 PORTC,1

#DEFINE CH3 PORTC,2

#DEFINE CH4 PORTC,3

#DEFINE CH5 PORTC,4

#DEFINE CHT PORTC,5

#DEFINE DISPLAY1 PORTC,6

#DEFINE DISPLAY2 PORTC,7

#DEFINE OFF PORTD,0

#DEFINE OK PORTD,1

#DEFINE LEFT PORTD,2

#DEFINE MOD1 FLAG,0

#DEFINE MOD2 FLAG,1

#DEFINE MOD3 FLAG,2

#DEFINE MOD4 FLAG,3

#DEFINE MOD5 FLAG,4

#DEFINE SMS_FLAG FLAG,5

#DEFINE BIP1 FLAG2,0

#DEFINE BIP2 FLAG2,1

#DEFINE BIP3 FLAG2,2

#DEFINE BIP4 FLAG2,3

#DEFINE BIP5 FLAG2,4

#DEFINE CG1 FLAG3,0

#DEFINE CG2 FLAG3,1

#DEFINE CG3 FLAG3,2

#DEFINE CG4 FLAG3,3

#DEFINE CGT FLAG3,5

;PROGRAMA AS PORTAS

ORG 0x000 ;INICIO DA COMPILACAO

BSF STATUS,RP0 ;SELECIONA BANK 1

movlw Digital

movwf ADCON1

MOVLW 0X13 ;PROGRAMA TODOS OS BITS PARA OUT (00)

MOVWF TRISA ;NA PORTA A (0X00)

MOVLW 0X00 ;PROGRAMA TODOS OS BITS PARA OUT (0)

MOVWF TRISB ;NA PORTA B (00)

MOVLW 0X3F

MOVWF TRISC

CLRF TRISE

CLRF TRISD

movlw b'10000111'

movwf Option_reg

BCF STATUS,RP0 ;VOLTA AO BANK 0

;FIM DA configuração ENTRA NO LOOP PRINCIPAL

clrf intcon

INICIO

CLRF PORTA

CLRF PORTC

CLRF PORTD

CLRF PORTB

CLRF PORTE

CLRF FLAG

CLRF FLAG2

CLRF FLAG3

CLRF TEST

BSF MOD1

;------------------------------------------------------------------------------------

MAIN

BSF LED2

BCF LED1

BCF LED3

BTFSC TEL_MOD

GOTO ESC_MOD

BTFSC TEL_CAG

GOTO ESC_CAG

BTFSC CH1

GOTO M1BIP1

BTFSC CH2

GOTO M1BIP2

BTFSC CH3

GOTO M1BIP3

BTFSC CH4

GOTO M1BIP4

BTFSC CHT

GOTO M5BIP1

BTFSC CH_SMS

GOTO ACTI_SMS

GOTO DISP1

LOOP2M

BTFSC TEL_MOD

GOTO ESC_MOD

BTFSC TEL_CAG

GOTO ESC_CAG

BTFSC CH1

GOTO M1BIP1

BTFSC CH2

GOTO M1BIP2

BTFSC CH3

GOTO M1BIP3

BTFSC CH4

GOTO M1BIP4

BTFSC CHT

GOTO M5BIP1

BTFSC CH_SMS

GOTO ACTI_SMS

GOTO DISP2

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

ESC_MOD

BTFSC TEL_MOD

GOTO $-1

CALL CONTA_MOD

BSF LED3

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

CONTA_MOD

BCF LED2

CALL DELAY

CALL DELAY

BSF LED3

MOVLW D'1'

BTFSC CH1

GOTO LOOP1

BTFSC CH2

GOTO LOOP2

BTFSC CH3

GOTO LOOP3

BTFSC CH4

GOTO LOOP4

BTFSC CH5

GOTO LOOP5

BSF LED2

CALL DELAY

CALL DELAY

BSF LED3

MOVLW D'1'

BTFSC CH1

GOTO LOOP1

BTFSC CH2

GOTO LOOP2

BTFSC CH3

GOTO LOOP3

BTFSC CH4

GOTO LOOP4

BTFSC CH5

GOTO LOOP5

GOTO CONTA_MOD

LOOP1

BTFSC CH1

GOTO $-1

CALL DELAY

BSF MOD1

BCF MOD2

BCF MOD3

BCF MOD4

BCF MOD5

RETURN

LOOP2

BTFSC CH2

GOTO $-1

CALL DELAY

BCF MOD1

BSF MOD2

BCF MOD3

BCF MOD4

BCF MOD5

RETURN

LOOP3

BTFSC CH3

GOTO $-1

CALL DELAY

BCF MOD1

BCF MOD2

BSF MOD3

BCF MOD4

BCF MOD5

RETURN

LOOP4

BTFSC CH4

GOTO $-1

CALL DELAY

BCF MOD1

BCF MOD2

BCF MOD3

BSF MOD4

BCF MOD5

RETURN

LOOP5

BTFSC CH5

GOTO $-1

CALL DELAY

BCF MOD1

BCF MOD2

BCF MOD3

BCF MOD4

BSF MOD5

RETURN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

ESC_CAG

BCF LED2

GOTO PAUSA1_1

GOTO MAIN

;-------------------------------------------------------

;-------------------------------------------------------

BIP_1;##################################################

BTFSC MOD1

GOTO M1BIP1 ;ACTIVAR CARGA 1 NO MODO 1

BTFSC MOD2

GOTO M1BIP1 ;ACTIVAR CARGA 1 NO MODO 2

BTFSC MOD3

GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 3

BTFSC MOD4

GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 4

BTFSC MOD5

GOTO M5BIP1

GOTO MAIN

;_________________________________________________

M1BIP1 ;ACTIVAR CARGA 1 NO MODO 1

BTFSC CH1

GOTO $-1

CALL DELAY

BTFSS CG1

GOTO AC11

GOTO AP11

AC11

BSF CARGA1

BSF CG1

GOTO SMS

AP11

BCF CARGA1

BCF CG1

GOTO MAIN

;_________________________________________________

M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 3

BTFSS CG1

GOTO AC31

GOTO AP31

AC31

BSF CARGA1

BSF CG1

GOTO M3B1_2

AP31

BCF CARGA1

BCF CG1

GOTO M3B1_2

M3B1_2

BTFSS CG2

GOTO AC32

GOTO AP32

AC32

BSF CARGA2

BSF CG2

GOTO SMS

AP32

BCF CARGA2

BCF CG2

GOTO MAIN

;_______________________________________

M5BIP1 ;ACTIVAR TODAS CARGAS

BTFSC CHT

GOTO $-1

CALL DELAY

BTFSS CGT

GOTO AC51

GOTO AP51

AC51

BSF CARGA1

CALL PAUSA_5

BSF CARGA2

CALL PAUSA_5

BSF CARGA3

CALL PAUSA_5

BSF CARGA4

BSF CGT

BSF CG1

BSF CG2

BSF CG3

BSF CG4

GOTO SMS

AP51

BCF CARGA1

CALL PAUSA_5

BCF CARGA2

CALL PAUSA_5

BCF CARGA3

CALL PAUSA_5

BCF CARGA4

BCF CGT

BCF CG1

BCF CG2

BCF CG3

BCF CG4

GOTO MAIN

;_______________________________________

;-------------------------------------------------------

;-------------------------------------------------------

BIP_2;##################################################

BTFSC MOD1

GOTO M1BIP2 ;ACTIVAR CARGA 2 NO MODO 1

BTFSC MOD2

GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 2

BTFSC MOD3

GOTO M3BIP2 ;ACTIVAR CARGA 3 E 4 NO MODO 3

BTFSC MOD4

GOTO M5BIP1

GOTO MAIN

;_______________________________________

M1BIP2 ;ACTIVAR CARGA 2 NO MODO 1

BTFSC CH2

GOTO $-1

CALL DELAY

BTFSS CG2

GOTO AC12

GOTO AP12

AC12

BSF CARGA2

BSF CG2

GOTO SMS

AP12

BCF CARGA2

BCF CG2

GOTO MAIN

;_______________________________________

M3BIP2 ;ACTIVAR CARGA 3 E 4 NO MODO 3

BTFSS CG3

GOTO AC33

GOTO AP33

AC33

BSF CARGA3

BSF CG3

GOTO M3B2_2

AP33

BCF CARGA3

BCF CG3

CALL DELAY

CALL DELAY

GOTO M3B2_2

M3B2_2

BTFSS CG4

GOTO AC34

GOTO AP34

AC34

BSF CARGA4

BSF CG4

GOTO SMS

AP34

BCF CARGA4

BCF CG4

GOTO MAIN

;-------------------------------------------------------

;-------------------------------------------------------

BIP_3;##################################################

BTFSC MOD1

GOTO M1BIP3 ;ACTIVAR CARGA 3 NO MODO1

BTFSC MOD2

GOTO M2BIP3 ;ACTIVAR CARGA 1, 2 E 3 NO MODO 2

BTFSC MOD4

GOTO M5BIP1 ;ACTIVAR TODAS CARGAS

GOTO MAIN

;_______________________________________

M1BIP3 ;ACTIVAR CARGA 3 NO MODO1

BTFSC CH3

GOTO $-1

CALL DELAY

BTFSS CG3

GOTO AC13

GOTO AP13

AC13

BSF CARGA3

BSF CG3

GOTO SMS

AP13

BCF CARGA3

BCF CG3

GOTO MAIN

;_______________________________________

M2BIP3 ;ACTIVAR CARGA 1, 2 E 3 NO MODO 2

BTFSS CG1

GOTO AC21__

GOTO AP21__

AC21__

BSF CARGA1

BSF CG1

GOTO M2B3_1

AP21__

BCF CARGA1

BCF CG1

CALL DELAY

CALL DELAY

GOTO M2B3_1

M2B3_1

BTFSS CG2

GOTO AC22

GOTO AP22

AC22

BSF CARGA2

BSF CG2

GOTO M2B3_2

AP22

BCF CARGA2

BCF CG2

CALL DELAY

CALL DELAY

GOTO M2B3_2

M2B3_2

BTFSS CG3

GOTO AC23

GOTO AP23

AC23

BSF CARGA3

BSF CG3

GOTO SMS

AP23

BCF CARGA3

BCF CG3

GOTO MAIN

;_______________________________________

;-------------------------------------------------------

;-------------------------------------------------------

BIP_4;##################################################

BTFSC MOD1

GOTO M1BIP4

BTFSC MOD2

GOTO M5BIP1

GOTO MAIN

;__________________________________________

M1BIP4 ;ACTIVAR CARGA 4 NO MODO 1

BTFSC CH4

GOTO $-1

CALL DELAY

BTFSS CG4

GOTO AC14

GOTO AP14

AC14

BSF CARGA4

BSF CG4

GOTO SMS

AP14

BCF CARGA4

BCF CG4

GOTO MAIN

;_______________________________________

;-------------------------------------------------------

;-------------------------------------------------------

BIP_5;##################################################5

BTFSC MOD2

GOTO M5BIP1

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

;«««««««««««««««««««««««««««««««««««««««««««««««««««

DISP1

BTFSC MOD1

GOTO DISP1_M1

BTFSC MOD2

GOTO DISP1_M2

BTFSC MOD3

GOTO DISP1_M3

BTFSC MOD4

GOTO DISP1_M4

BTFSC MOD5

GOTO DISP1_M5

GOTO LOOP2M

;________________

DISP1_M1

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF BD

BSF CD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M2

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BCF CD

BSF AD

BSF BD

BSF DD

BSF ED

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M3

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF AD

BSF BD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M4

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF FD

BSF BD

BSF CD

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M5

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF AD

BSF FD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;----------------------

DISP2

MOVF FLAG3,W

ANDLW B'00001111'

MOVWF CONTADOR

MOVLW D'15'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C4

MOVLW D'0'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C0

MOVLW D'1'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'2'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'3'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'4'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'5'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'6'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'7'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

MOVLW D'8'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'9'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'10'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'11'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

MOVLW D'12'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'13'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

MOVLW D'14'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

;________________

DISP2_C0

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF BD

BSF CD

BSF AD

BSF DD

BSF FD

BSF ED

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C1

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF BD

BSF CD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C2

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BCF CD

BSF AD

BSF BD

BSF DD

BSF ED

BSF GD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C3

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF AD

BSF BD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C4

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF FD

BSF BD

BSF CD

BSF GD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C5

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF AD

BSF FD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

ACTI_SMS

BTFSC CH_SMS

GOTO $-1

BTFSS SMS_FLAG

GOTO ACTI

GOTO DESACTI

ACTI

BSF SMS_FLAG

BSF LED4

GOTO MAIN

DESACTI

BCF SMS_FLAG

BCF LED4

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

SMS

BTFSS SMS_FLAG

GOTO MAIN

MOVF FLAG3,W

ANDLW B'00001111'

MOVWF CONTADOR

MOVLW D'0'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO MAIN

MOVLW B'00000001'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1

MOVLW B'00000010'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2

MOVLW B'00000100'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS3

MOVLW B'00001000'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS4

MOVLW B'00000011'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_2

MOVLW D'5'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_3

MOVLW D'9'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_4

MOVLW D'6'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2_3

MOVLW D'10'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2_4

MOVLW D'12'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS3_4

MOVLW D'7'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_2_3

MOVLW B'000001011'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_2_4

MOVLW B'000001101'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_3_4

MOVLW D'14'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2_3_4

MOVLW D'15'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2

;####################################################################

SMS4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 1ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 2ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 3ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 4ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_2

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 5ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 6ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 7ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2_3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 8ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 9ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS3_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 10ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_2_3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 11ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_2_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 12ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_3_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 13ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2_3_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 14ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

GOTO MAIN

;####################################################################

;##############ROTINAS DE PAUSAS#############

PAUSA

MOVLW D'100'

MOVWF ATRASO

PAUS_1

CALL DELAY

DECFSZ ATRASO

GOTO PAUS_1

RETURN

PAUSA_5

MOVLW D'30'

MOVWF ATRASO

PAUS15

CALL DELAY

DECFSZ ATRASO

GOTO PAUS15

RETURN

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA1_1

BSF LED1

CALL PAUSA

CALL PAUSA_5

MOVLW D'255'

MOVWF ATRASO

PAUSA11_1

BTFSC TEL_CAG

GOTO $-1

PAUSA11_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA2_1

DECFSZ ATRASO

GOTO PAUSA11_11

GOTO BIP_1

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA2_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA12_1

BCF LED2

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA12_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA3_1

DECFSZ ATRASO

GOTO PAUSA12_11

GOTO BIP_2

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA3_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA13_1

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA13_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA4_1

DECFSZ ATRASO

GOTO PAUSA13_11

GOTO BIP_3

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA4_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA14_1

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA14_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA5_1

DECFSZ ATRASO

GOTO PAUSA14_11

GOTO BIP_4

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA5_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA15_1

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA15_11

CALL DELAY

DECFSZ ATRASO

GOTO PAUSA15_11

GOTO BIP_5

;««««««««««««««««««««««««««

;---------------------------------DELAY de 10ms------------------------------

DELAY

movlw d'217'

movwf Tmr0

bcf intcon,T0if

btfss intcon,t0if

goto $-1

return

END ;FIM DA COMPILACAO

essa é a mensagem de erro que deu no compilador

----------------------------------------------------------------------

Debug build of project `D:\CONTROLADOR D CARGA\C DE CARGA.mcp' started.

Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01

Preprocessor symbol `__DEBUG' is defined.

Wed Mar 16 19:37:07 2011

----------------------------------------------------------------------

Clean: Deleting intermediary and output files.

Clean: Done.

Executing: "E:\Arquivos de programas\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F877 "C DE CARGAS.ASM" /l"C DE CARGAS.lst" /e"C DE CARGAS.err" /o"C DE CARGAS.o" /d__DEBUG=1 /c- /w1

Warning[205] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 12 : Found directive in column 1. (CBLOCK)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 234 : Found label after column 1. (LOOP1)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 245 : Found label after column 1. (LOOP2)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 256 : Found label after column 1. (LOOP3)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 267 : Found label after column 1. (LOOP4)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 278 : Found label after column 1. (LOOP5)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 341 : Found label after column 1. (AC31)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 345 : Found label after column 1. (AP31)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 355 : Found label after column 1. (AC32)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 359 : Found label after column 1. (AP32)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 446 : Found label after column 1. (AC33)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 450 : Found label after column 1. (AP33)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 461 : Found label after column 1. (AC34)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 465 : Found label after column 1. (AP34)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 510 : Found label after column 1. (AC21__)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 514 : Found label after column 1. (AP21__)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 525 : Found label after column 1. (AC22)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 529 : Found label after column 1. (AP22)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 540 : Found label after column 1. (AC23)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 544 : Found label after column 1. (AP23)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 570 : Found label after column 1. (AC14)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 575 : Found label after column 1. (AP14)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 614 : Found label after column 1. (DISP1_M1)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 626 : Found label after column 1. (DISP1_M2)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 642 : Found label after column 1. (DISP1_M3)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 657 : Found label after column 1. (DISP1_M4)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 671 : Found label after column 1. (DISP1_M5)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 779 : Found label after column 1. (DISP2_C0)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 795 : Found label after column 1. (DISP2_C1)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 807 : Found label after column 1. (DISP2_C2)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 823 : Found label after column 1. (DISP2_C3)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 838 : Found label after column 1. (DISP2_C4)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 852 : Found label after column 1. (DISP2_C5)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 879 : Found label after column 1. (ACTI)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 883 : Found label after column 1. (DESACTI)

Warning[205] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 3405 : Found directive in column 1. (END)

Executing: "E:\Arquivos de programas\Microchip\MPASM Suite\mplink.exe" /p16F877 "C DE CARGAS.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"C DE CARGA.cof" /M"C DE CARGA.map" /W

MPLINK 4.30.01, Linker

Copyright © 2009 Microchip Technology Inc.

Error - section '.org_0' can not fit the absolute section. Section '.org_0' start=0x00000000, length=0x000011f6

Errors : 1

Link step failed.

----------------------------------------------------------------------

Debug build of project `D:\CONTROLADOR D CARGA\C DE CARGA.mcp' failed.

Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01

Preprocessor symbol `__DEBUG' is defined.

Wed Mar 16 19:37:11 2011

----------------------------------------------------------------------

BUILD FAILED

e aqui está o codigo simplificado

;--------------------------------------------------------------

;Este projecto é uma fechadura codificada com dupla segurança -

; -

;criado por LeoPUENA aos 06.01.2011 -

;------------------------------------------------------------

list p=16f877

Include <p16f877.inc>

__Config _xt_osc & _wdt_off & _Cp_off & _pwrte_on

;********************************************************************

Digital equ b'00000110'

CBLOCK 20H

ATRASO

FLAG

FLAG2

FLAG3

TEST

CONTADOR

ENDC

#DEFINE TEL_MOD PORTA,0

#DEFINE TEL_CAG PORTA,1

#DEFINE AD PORTA,2

#DEFINE BD PORTA,3

#DEFINE CD PORTD,7

#DEFINE DD PORTA,5

#DEFINE ED PORTE,0

#DEFINE FD PORTE,1

#DEFINE GD PORTE,2

#DEFINE CH_SMS PORTA,4

#DEFINE LED1 PORTB,5

#DEFINE LED2 PORTB,6

#DEFINE LED3 PORTB,7

#DEFINE LED4 PORTD,5

#DEFINE CARGA1 PORTB,0

#DEFINE CARGA2 PORTB,1

#DEFINE CARGA3 PORTB,2

#DEFINE CARGA4 PORTB,3

#DEFINE CH1 PORTC,0

#DEFINE CH2 PORTC,1

#DEFINE CH3 PORTC,2

#DEFINE CH4 PORTC,3

#DEFINE CH5 PORTC,4

#DEFINE CHT PORTC,5

#DEFINE DISPLAY1 PORTC,6

#DEFINE DISPLAY2 PORTC,7

#DEFINE OFF PORTD,0

#DEFINE OK PORTD,1

#DEFINE LEFT PORTD,2

#DEFINE MOD1 FLAG,0

#DEFINE MOD2 FLAG,1

#DEFINE MOD3 FLAG,2

#DEFINE MOD4 FLAG,3

#DEFINE MOD5 FLAG,4

#DEFINE SMS_FLAG FLAG,5

#DEFINE BIP1 FLAG2,0

#DEFINE BIP2 FLAG2,1

#DEFINE BIP3 FLAG2,2

#DEFINE BIP4 FLAG2,3

#DEFINE BIP5 FLAG2,4

#DEFINE CG1 FLAG3,0

#DEFINE CG2 FLAG3,1

#DEFINE CG3 FLAG3,2

#DEFINE CG4 FLAG3,3

#DEFINE CGT FLAG3,5

;PROGRAMA AS PORTAS

ORG 0x000 ;INICIO DA COMPILACAO

BSF STATUS,RP0 ;SELECIONA BANK 1

movlw Digital

movwf ADCON1

MOVLW 0X13 ;PROGRAMA TODOS OS BITS PARA OUT (00)

MOVWF TRISA ;NA PORTA A (0X00)

MOVLW 0X00 ;PROGRAMA TODOS OS BITS PARA OUT (0)

MOVWF TRISB ;NA PORTA B (00)

MOVLW 0X3F

MOVWF TRISC

CLRF TRISE

CLRF TRISD

movlw b'10000111'

movwf Option_reg

BCF STATUS,RP0 ;VOLTA AO BANK 0

;FIM DA configuração ENTRA NO LOOP PRINCIPAL

clrf intcon

INICIO

CLRF PORTA

CLRF PORTC

CLRF PORTD

CLRF PORTB

CLRF PORTE

CLRF FLAG

CLRF FLAG2

CLRF FLAG3

CLRF TEST

BSF MOD1

;------------------------------------------------------------------------------------

MAIN

BSF LED2

BCF LED1

BCF LED3

BTFSC TEL_MOD

GOTO ESC_MOD

BTFSC TEL_CAG

GOTO ESC_CAG

BTFSC CH1

GOTO M1BIP1

BTFSC CH2

GOTO M1BIP2

BTFSC CH3

GOTO M1BIP3

BTFSC CH4

GOTO M1BIP4

BTFSC CHT

GOTO M5BIP1

BTFSC CH_SMS

GOTO ACTI_SMS

GOTO DISP1

LOOP2M

BTFSC TEL_MOD

GOTO ESC_MOD

BTFSC TEL_CAG

GOTO ESC_CAG

BTFSC CH1

GOTO M1BIP1

BTFSC CH2

GOTO M1BIP2

BTFSC CH3

GOTO M1BIP3

BTFSC CH4

GOTO M1BIP4

BTFSC CHT

GOTO M5BIP1

BTFSC CH_SMS

GOTO ACTI_SMS

GOTO DISP2

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

ESC_MOD

BTFSC TEL_MOD

GOTO $-1

CALL CONTA_MOD

BSF LED3

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

CONTA_MOD

BCF LED2

CALL DELAY

CALL DELAY

BSF LED3

MOVLW D'1'

BTFSC CH1

GOTO LOOP1

BTFSC CH2

GOTO LOOP2

BTFSC CH3

GOTO LOOP3

BTFSC CH4

GOTO LOOP4

BTFSC CH5

GOTO LOOP5

BSF LED2

CALL DELAY

CALL DELAY

BSF LED3

MOVLW D'1'

BTFSC CH1

GOTO LOOP1

BTFSC CH2

GOTO LOOP2

BTFSC CH3

GOTO LOOP3

BTFSC CH4

GOTO LOOP4

BTFSC CH5

GOTO LOOP5

GOTO CONTA_MOD

LOOP1

BTFSC CH1

GOTO $-1

CALL DELAY

BSF MOD1

BCF MOD2

BCF MOD3

BCF MOD4

BCF MOD5

RETURN

LOOP2

BTFSC CH2

GOTO $-1

CALL DELAY

BCF MOD1

BSF MOD2

BCF MOD3

BCF MOD4

BCF MOD5

RETURN

LOOP3

BTFSC CH3

GOTO $-1

CALL DELAY

BCF MOD1

BCF MOD2

BSF MOD3

BCF MOD4

BCF MOD5

RETURN

LOOP4

BTFSC CH4

GOTO $-1

CALL DELAY

BCF MOD1

BCF MOD2

BCF MOD3

BSF MOD4

BCF MOD5

RETURN

LOOP5

BTFSC CH5

GOTO $-1

CALL DELAY

BCF MOD1

BCF MOD2

BCF MOD3

BCF MOD4

BSF MOD5

RETURN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

ESC_CAG

BCF LED2

GOTO PAUSA1_1

GOTO MAIN

;-------------------------------------------------------

;-------------------------------------------------------

BIP_1;##################################################

BTFSC MOD1

GOTO M1BIP1 ;ACTIVAR CARGA 1 NO MODO 1

BTFSC MOD2

GOTO M1BIP1 ;ACTIVAR CARGA 1 NO MODO 2

BTFSC MOD3

GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 3

BTFSC MOD4

GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 4

BTFSC MOD5

GOTO M5BIP1

GOTO MAIN

;_________________________________________________

M1BIP1 ;ACTIVAR CARGA 1 NO MODO 1

BTFSC CH1

GOTO $-1

CALL DELAY

BTFSS CG1

GOTO AC11

GOTO AP11

AC11

BSF CARGA1

BSF CG1

GOTO SMS

AP11

BCF CARGA1

BCF CG1

GOTO MAIN

;_________________________________________________

M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 3

BTFSS CG1

GOTO AC31

GOTO AP31

AC31

BSF CARGA1

BSF CG1

GOTO M3B1_2

AP31

BCF CARGA1

BCF CG1

GOTO M3B1_2

M3B1_2

BTFSS CG2

GOTO AC32

GOTO AP32

AC32

BSF CARGA2

BSF CG2

GOTO SMS

AP32

BCF CARGA2

BCF CG2

GOTO MAIN

;_______________________________________

M5BIP1 ;ACTIVAR TODAS CARGAS

BTFSC CHT

GOTO $-1

CALL DELAY

BTFSS CGT

GOTO AC51

GOTO AP51

AC51

BSF CARGA1

CALL PAUSA_5

BSF CARGA2

CALL PAUSA_5

BSF CARGA3

CALL PAUSA_5

BSF CARGA4

BSF CGT

BSF CG1

BSF CG2

BSF CG3

BSF CG4

GOTO SMS

AP51

BCF CARGA1

CALL PAUSA_5

BCF CARGA2

CALL PAUSA_5

BCF CARGA3

CALL PAUSA_5

BCF CARGA4

BCF CGT

BCF CG1

BCF CG2

BCF CG3

BCF CG4

GOTO MAIN

;_______________________________________

;-------------------------------------------------------

;-------------------------------------------------------

BIP_2;##################################################

BTFSC MOD1

GOTO M1BIP2 ;ACTIVAR CARGA 2 NO MODO 1

BTFSC MOD2

GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 2

BTFSC MOD3

GOTO M3BIP2 ;ACTIVAR CARGA 3 E 4 NO MODO 3

BTFSC MOD4

GOTO M5BIP1

GOTO MAIN

;_______________________________________

M1BIP2 ;ACTIVAR CARGA 2 NO MODO 1

BTFSC CH2

GOTO $-1

CALL DELAY

BTFSS CG2

GOTO AC12

GOTO AP12

AC12

BSF CARGA2

BSF CG2

GOTO SMS

AP12

BCF CARGA2

BCF CG2

GOTO MAIN

;_______________________________________

M3BIP2 ;ACTIVAR CARGA 3 E 4 NO MODO 3

BTFSS CG3

GOTO AC33

GOTO AP33

AC33

BSF CARGA3

BSF CG3

GOTO M3B2_2

AP33

BCF CARGA3

BCF CG3

CALL DELAY

CALL DELAY

GOTO M3B2_2

M3B2_2

BTFSS CG4

GOTO AC34

GOTO AP34

AC34

BSF CARGA4

BSF CG4

GOTO SMS

AP34

BCF CARGA4

BCF CG4

GOTO MAIN

;-------------------------------------------------------

;-------------------------------------------------------

BIP_3;##################################################

BTFSC MOD1

GOTO M1BIP3 ;ACTIVAR CARGA 3 NO MODO1

BTFSC MOD2

GOTO M2BIP3 ;ACTIVAR CARGA 1, 2 E 3 NO MODO 2

BTFSC MOD4

GOTO M5BIP1 ;ACTIVAR TODAS CARGAS

GOTO MAIN

;_______________________________________

M1BIP3 ;ACTIVAR CARGA 3 NO MODO1

BTFSC CH3

GOTO $-1

CALL DELAY

BTFSS CG3

GOTO AC13

GOTO AP13

AC13

BSF CARGA3

BSF CG3

GOTO SMS

AP13

BCF CARGA3

BCF CG3

GOTO MAIN

;_______________________________________

M2BIP3 ;ACTIVAR CARGA 1, 2 E 3 NO MODO 2

BTFSS CG1

GOTO AC21__

GOTO AP21__

AC21__

BSF CARGA1

BSF CG1

GOTO M2B3_1

AP21__

BCF CARGA1

BCF CG1

CALL DELAY

CALL DELAY

GOTO M2B3_1

M2B3_1

BTFSS CG2

GOTO AC22

GOTO AP22

AC22

BSF CARGA2

BSF CG2

GOTO M2B3_2

AP22

BCF CARGA2

BCF CG2

CALL DELAY

CALL DELAY

GOTO M2B3_2

M2B3_2

BTFSS CG3

GOTO AC23

GOTO AP23

AC23

BSF CARGA3

BSF CG3

GOTO SMS

AP23

BCF CARGA3

BCF CG3

GOTO MAIN

;_______________________________________

;-------------------------------------------------------

;-------------------------------------------------------

BIP_4;##################################################

BTFSC MOD1

GOTO M1BIP4

BTFSC MOD2

GOTO M5BIP1

GOTO MAIN

;__________________________________________

M1BIP4 ;ACTIVAR CARGA 4 NO MODO 1

BTFSC CH4

GOTO $-1

CALL DELAY

BTFSS CG4

GOTO AC14

GOTO AP14

AC14

BSF CARGA4

BSF CG4

GOTO SMS

AP14

BCF CARGA4

BCF CG4

GOTO MAIN

;_______________________________________

;-------------------------------------------------------

;-------------------------------------------------------

BIP_5;##################################################5

BTFSC MOD2

GOTO M5BIP1

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

;«««««««««««««««««««««««««««««««««««««««««««««««««««

DISP1

BTFSC MOD1

GOTO DISP1_M1

BTFSC MOD2

GOTO DISP1_M2

BTFSC MOD3

GOTO DISP1_M3

BTFSC MOD4

GOTO DISP1_M4

BTFSC MOD5

GOTO DISP1_M5

GOTO LOOP2M

;________________

DISP1_M1

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF BD

BSF CD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M2

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BCF CD

BSF AD

BSF BD

BSF DD

BSF ED

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M3

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF AD

BSF BD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M4

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF FD

BSF BD

BSF CD

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M5

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF AD

BSF FD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;----------------------

DISP2

MOVF FLAG3,W

ANDLW B'00001111'

MOVWF CONTADOR

MOVLW D'15'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C4

MOVLW D'0'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C0

MOVLW D'1'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'2'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'3'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'4'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'5'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'6'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'7'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

MOVLW D'8'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'9'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'10'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'11'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

MOVLW D'12'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'13'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

MOVLW D'14'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

;________________

DISP2_C0

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF BD

BSF CD

BSF AD

BSF DD

BSF FD

BSF ED

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C1

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF BD

BSF CD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C2

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BCF CD

BSF AD

BSF BD

BSF DD

BSF ED

BSF GD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C3

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF AD

BSF BD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C4

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF FD

BSF BD

BSF CD

BSF GD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C5

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF AD

BSF FD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

ACTI_SMS

BTFSC CH_SMS

GOTO $-1

BTFSS SMS_FLAG

GOTO ACTI

GOTO DESACTI

ACTI

BSF SMS_FLAG

BSF LED4

GOTO MAIN

DESACTI

BCF SMS_FLAG

BCF LED4

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

SMS

BTFSS SMS_FLAG

GOTO MAIN

MOVF FLAG3,W

ANDLW B'00001111'

MOVWF CONTADOR

MOVLW D'0'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO MAIN

MOVLW B'00000001'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1

MOVLW B'00000010'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2

MOVLW B'00000100'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS3

MOVLW B'00001000'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS4

MOVLW B'00000011'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_2

MOVLW D'5'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_3

MOVLW D'9'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_4

MOVLW D'6'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2_3

MOVLW D'10'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2_4

MOVLW D'12'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS3_4

MOVLW D'7'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_2_3

MOVLW B'000001011'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_2_4

MOVLW B'000001101'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_3_4

MOVLW D'14'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2_3_4

MOVLW D'15'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMST

;####################################################################

SMS4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 1ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 2ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 3ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 4ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_2

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 5ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 6ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 7ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2_3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

CALL LEFT3

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 8ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

CALL LEFT3

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 9ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS3_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

CALL LEFT3

CALL LEFT3

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 10ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_2_3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

CALL LEFT3

CALL LEFT3

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 11ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_2_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

CALL LEFT3

CALL LEFT3

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 12ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_3_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

CALL LEFT3

CALL LEFT3

CALL LEFT3

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 13ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2_3_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

CALL LEFT3

CALL LEFT3

CALL LEFT3

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 14ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMST

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 15ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

CALL LEFT3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

;####################################################################

LEFT_R

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

RETURN

LEFT3

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

RETURN

;##############ROTINAS DE PAUSAS#############

PAUSA

MOVLW D'100'

MOVWF ATRASO

PAUS_1

CALL DELAY

DECFSZ ATRASO

GOTO PAUS_1

RETURN

PAUSA_5

MOVLW D'30'

MOVWF ATRASO

PAUS15

CALL DELAY

DECFSZ ATRASO

GOTO PAUS15

RETURN

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA1_1

BSF LED1

CALL PAUSA

CALL PAUSA_5

MOVLW D'255'

MOVWF ATRASO

PAUSA11_1

BTFSC TEL_CAG

GOTO $-1

PAUSA11_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA2_1

DECFSZ ATRASO

GOTO PAUSA11_11

GOTO BIP_1

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA2_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA12_1

BCF LED2

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA12_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA3_1

DECFSZ ATRASO

GOTO PAUSA12_11

GOTO BIP_2

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA3_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA13_1

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA13_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA4_1

DECFSZ ATRASO

GOTO PAUSA13_11

GOTO BIP_3

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA4_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA14_1

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA14_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA5_1

DECFSZ ATRASO

GOTO PAUSA14_11

GOTO BIP_4

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA5_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA15_1

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA15_11

CALL DELAY

DECFSZ ATRASO

GOTO PAUSA15_11

GOTO BIP_5

;««««««««««««««««««««««««««

;---------------------------------DELAY de 10ms------------------------------

DELAY

movlw d'217'

movwf Tmr0

bcf intcon,T0if

btfss intcon,t0if

goto $-1

return

END ;FIM DA COMPILACAO

e a mensagem do compilador

Debug build of project `D:\CONTROLADOR D CARGA\C DE CARGA.mcp' started.

Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01

Preprocessor symbol `__DEBUG' is defined.

Wed Mar 16 15:20:14 2011

----------------------------------------------------------------------

Clean: Deleting intermediary and output files.

Clean: Deleted file "D:\CONTROLADOR D CARGA\C DE CARGAS.o".

Clean: Deleted file "D:\CONTROLADOR D CARGA\C DE CARGAS.err".

Clean: Deleted file "D:\CONTROLADOR D CARGA\C DE CARGAS.lst".

Clean: Deleted file "D:\CONTROLADOR D CARGA\C DE CARGA.cof".

Clean: Deleted file "D:\CONTROLADOR D CARGA\C DE CARGA.hex".

Clean: Done.

Executing: "E:\Arquivos de programas\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F877 "C DE CARGAS.ASM" /l"C DE CARGAS.lst" /e"C DE CARGAS.err" /o"C DE CARGAS.o" /d__DEBUG=1 /c- /w1

Warning[205] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 13 : Found directive in column 1. (CBLOCK)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 235 : Found label after column 1. (LOOP1)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 246 : Found label after column 1. (LOOP2)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 257 : Found label after column 1. (LOOP3)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 268 : Found label after column 1. (LOOP4)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 279 : Found label after column 1. (LOOP5)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 342 : Found label after column 1. (AC31)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 346 : Found label after column 1. (AP31)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 356 : Found label after column 1. (AC32)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 360 : Found label after column 1. (AP32)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 447 : Found label after column 1. (AC33)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 451 : Found label after column 1. (AP33)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 462 : Found label after column 1. (AC34)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 466 : Found label after column 1. (AP34)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 511 : Found label after column 1. (AC21__)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 515 : Found label after column 1. (AP21__)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 526 : Found label after column 1. (AC22)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 530 : Found label after column 1. (AP22)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 541 : Found label after column 1. (AC23)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 545 : Found label after column 1. (AP23)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 571 : Found label after column 1. (AC14)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 576 : Found label after column 1. (AP14)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 615 : Found label after column 1. (DISP1_M1)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 627 : Found label after column 1. (DISP1_M2)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 643 : Found label after column 1. (DISP1_M3)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 658 : Found label after column 1. (DISP1_M4)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 672 : Found label after column 1. (DISP1_M5)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 780 : Found label after column 1. (DISP2_C0)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 796 : Found label after column 1. (DISP2_C1)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 808 : Found label after column 1. (DISP2_C2)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 824 : Found label after column 1. (DISP2_C3)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 839 : Found label after column 1. (DISP2_C4)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 853 : Found label after column 1. (DISP2_C5)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 880 : Found label after column 1. (ACTI)

Warning[207] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 884 : Found label after column 1. (DESACTI)

Warning[205] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 2489 : Found directive in column 1. (END)

Executing: "E:\Arquivos de programas\Microchip\MPASM Suite\mplink.exe" /p16F877 "C DE CARGAS.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"C DE CARGA.cof" /M"C DE CARGA.map" /W

MPLINK 4.30.01, Linker

Copyright © 2009 Microchip Technology Inc.

Errors : 0

MP2HEX 4.30.01, COFF to HEX File Converter

Copyright © 2009 Microchip Technology Inc.

Errors : 0

Loaded D:\CONTROLADOR D CARGA\C DE CARGA.cof.

----------------------------------------------------------------------

Debug build of project `D:\CONTROLADOR D CARGA\C DE CARGA.mcp' succeeded.

Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01

Preprocessor symbol `__DEBUG' is defined.

Wed Mar 16 15:20:16 2011----------------------------------------------------------------------

BUILD SUCCEEDED

Agradecia a vossa ajuda, pois estou fazendo um outro projecto que será maior que esse.

Compartilhar este post


Link para o post
Compartilhar em outros sites
...Found directive in column 1. (CBLOCK)

Esse são Warnings (avisos) e não erros.

Para se livrar deles,voce deve padronizar sua digitação.

Nunca inicie o código sem antes dar pelo menos um 'espaço' nas instruções,tipo;

ORG 0X000 ;INICIO DA COMPILACAO
BSF STATUS,RP0 ;SELECIONA BANK 1
MOVLW DIGITAL
MOVWF ADCON1
MOVLW 0X13 ;PROGRAMA TODOS OS BITS PARA OUT (00)

Use;

 ORG 0X000 ;USE UM ESPAÇO
BSF STATUS,RP0 ;USE 'TAB"
MOVLW DIGITAL ;USE 'TAB"
MOVWF ADCON1 ;USE 'TAB"
MOVLW 0X13 ;USE 'TAB"

Seu programa não compilou pois teve um Erro real(Error[150] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 1 : Labels must be defined in a code or data section when making an object file)

Se voce der dois clikes nesta linha de erro,o compilador te jogará no trecho que ele interpretou como erro fatal

Compartilhar este post


Link para o post
Compartilhar em outros sites

Seu programa não compilou pois teve um Erro real(Error[150] D:\CONTROLADOR D CARGA\C DE CARGAS.ASM 1 : Labels must be defined in a code or data section when making an object file)

Se voce der dois clikes nesta linha de erro,o compilador te jogará no trecho que ele interpretou como erro fatal

Não é bem assim, na verdade errei ao fazer o post introduzindo uma letra sem querer e só reparei agora.

verifica de novo o post e verás que o compilador indica um erro mas não mostra onde se encontra.

Quanto ao espaço eu sempre dou um "tab" antes de cada codigo, só que no post não aparece.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Se voce der 2 clikes no trecho com erro,no log do Mplab,ele te joga na linha com erro.

...Found directive in column 1. (CBLOCK)

Esse warning indica que a diretiva CBLOCK está na coluna 1,isto é,não achou um espaço antes da palavra.

Compartilhar este post


Link para o post
Compartilhar em outros sites
Se voce der 2 clikes no trecho com erro,no log do Mplab,ele te joga na linha com erro.

Esse warning indica que a diretiva CBLOCK está na coluna 1,isto é,não achou um espaço antes da palavra.

Acho que não entendi muito bem isso. Podias explicar melhor?

Mas repara que no programa que funcionou ele tambem dá esse aviso.

ok, Testei agora um 'tab' no CBLOCK e o aviso desapareceu. Porém o erro continua.

Compartilhar este post


Link para o post
Compartilhar em outros sites
ok, Testei agora um 'tab' no CBLOCK e o aviso desapareceu. Porém o erro continua.

Um 'espaço' antes de uma diretiva e o 'TAB' antes de uma instrução(no código todo).

Sobre clikar no erro,é o seguinte.

Quando voce compila,abre uma janela mostrando os erros.

se voce clikar(2 clikes) na linha onde indica o erro,ela muda para a janela do código e a linha do código com erro fica com uma marca.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Quando voce compila,abre uma janela mostrando os erros.

se voce clikar(2 clikes) na linha onde indica o erro,ela muda para a janela do código e a linha do código com erro fica com uma marca.

A duvida não era essa, mas já entendi.

Um 'espaço' antes de uma diretiva e o 'TAB' antes de uma instrução(no código todo).

Sobre clikar no erro,é o seguinte..

Voltei a compilar seguindo essa dica e realmente funcionou, consegui eliminar todos avisos, mas o erro tá teimoso.

----------------------------------------------------------------------

Debug build of project `D:\CONTROLADOR D CARGA\C DE CARGA.mcp' started.

Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01

Preprocessor symbol `__DEBUG' is defined.

Wed Mar 16 20:10:10 2011

----------------------------------------------------------------------

Clean: Deleting intermediary and output files.

Clean: Deleted file "D:\CONTROLADOR D CARGA\C DE CARGAS.o".

Clean: Deleted file "D:\CONTROLADOR D CARGA\C DE CARGAS.err".

Clean: Deleted file "D:\CONTROLADOR D CARGA\C DE CARGAS.lst".

Clean: Done.

Executing: "E:\Arquivos de programas\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F877 "C DE CARGAS.ASM" /l"C DE CARGAS.lst" /e"C DE CARGAS.err" /o"C DE CARGAS.o" /d__DEBUG=1 /c- /w1

Executing: "E:\Arquivos de programas\Microchip\MPASM Suite\mplink.exe" /p16F877 "C DE CARGAS.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"C DE CARGA.cof" /M"C DE CARGA.map" /W

MPLINK 4.30.01, Linker

Copyright © 2009 Microchip Technology Inc.

Error - section '.org_0' can not fit the absolute section. Section '.org_0' start=0x00000000, length=0x000011f6

Errors : 1

Link step failed.

----------------------------------------------------------------------

Debug build of project `D:\CONTROLADOR D CARGA\C DE CARGA.mcp' failed.

Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01

Preprocessor symbol `__DEBUG' is defined.

Wed Mar 16 20:10:12 2011

----------------------------------------------------------------------

BUILD FAILED

Compartilhar este post


Link para o post
Compartilhar em outros sites

você está tentando programar de forma absoluta.

retire todos os arquivos .lkr (linker) e irá compilar normalmente.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Mude esta parte do código e tente compilar;

ORG 0x000 ;INICIO DA COMPILACAO
BSF STATUS,RP0 ;SELECIONA BANK 1
movlw Digital

Mude para ;

 ORG 0x000 ;INICIO DA COMPILACAO
GOTO INICIO
ORG 0X0004
GOTO INICIO ;CASO NÃO USE INTERRUPÇÕES
;;;;;;;;;;;;;;;;;;;;
INICIO
BSF STATUS,RP0 ;SELECIONA BANK 1
movlw Digital
BSF STATUS,RP0 ;SELECIONA BANK 1
movlw Digital
... (CONTINUE SEU CÓDIGO)

Compartilhar este post


Link para o post
Compartilhar em outros sites
você está tentando programar de forma absoluta.

retire todos os arquivos .lkr (linker) e irá compilar normalmente.

Não foi gerado nenhum ficheiro .lkr

Mude esta parte do código e tente compilar.

tambem não resultou

;--------------------------------------------------------------

;Este projecto é um Controlador de cargas por telefone -

; -

;criado por LeoPUENA aos 06.01.2011 -

;------------------------------------------------------------

list p=16f877

Include <p16f877.inc>

__Config _xt_osc & _wdt_off & _Cp_off & _pwrte_on

;********************************************************************

Digital equ b'00000110'

CBLOCK 20H

ATRASO

FLAG

FLAG2

FLAG3

TEST

CONTADOR

ENDC

#DEFINE TEL_MOD PORTA,0

#DEFINE TEL_CAG PORTA,1

#DEFINE AD PORTA,2

#DEFINE BD PORTA,3

#DEFINE CD PORTD,7

#DEFINE DD PORTA,5

#DEFINE ED PORTE,0

#DEFINE FD PORTE,1

#DEFINE GD PORTE,2

#DEFINE CH_SMS PORTA,4

#DEFINE LED1 PORTB,5

#DEFINE LED2 PORTB,6

#DEFINE LED3 PORTB,7

#DEFINE LED4 PORTD,5

#DEFINE CARGA1 PORTB,0

#DEFINE CARGA2 PORTB,1

#DEFINE CARGA3 PORTB,2

#DEFINE CARGA4 PORTB,3

#DEFINE CH1 PORTC,0

#DEFINE CH2 PORTC,1

#DEFINE CH3 PORTC,2

#DEFINE CH4 PORTC,3

#DEFINE CH5 PORTC,4

#DEFINE CHT PORTC,5

#DEFINE DISPLAY1 PORTC,6

#DEFINE DISPLAY2 PORTC,7

#DEFINE OFF PORTD,0

#DEFINE OK PORTD,1

#DEFINE LEFT PORTD,2

#DEFINE MOD1 FLAG,0

#DEFINE MOD2 FLAG,1

#DEFINE MOD3 FLAG,2

#DEFINE MOD4 FLAG,3

#DEFINE MOD5 FLAG,4

#DEFINE SMS_FLAG FLAG,5

#DEFINE BIP1 FLAG2,0

#DEFINE BIP2 FLAG2,1

#DEFINE BIP3 FLAG2,2

#DEFINE BIP4 FLAG2,3

#DEFINE BIP5 FLAG2,4

#DEFINE CG1 FLAG3,0

#DEFINE CG2 FLAG3,1

#DEFINE CG3 FLAG3,2

#DEFINE CG4 FLAG3,3

#DEFINE CGT FLAG3,5

ORG 0x000 ;INICIO DA COMPILACAO

GOTO INICIO

ORG 0X0004

GOTO INICIO ;CASO NÃO USE INTERRUPÇÕES

INICIO

;PROGRAMA AS PORTAS

BSF STATUS,RP0 ;SELECIONA BANK 1

movlw Digital

movwf ADCON1

MOVLW 0X13 ;PROGRAMA TODOS OS BITS PARA OUT (00)

MOVWF TRISA ;NA PORTA A (0X00)

MOVLW 0X00 ;PROGRAMA TODOS OS BITS PARA OUT (0)

MOVWF TRISB ;NA PORTA B (00)

MOVLW 0X3F

MOVWF TRISC

CLRF TRISE

CLRF TRISD

movlw b'10000111'

movwf Option_reg

BCF STATUS,RP0 ;VOLTA AO BANK 0

;FIM DA configuração ENTRA NO LOOP PRINCIPAL

clrf intcon

CLRF PORTA

CLRF PORTC

CLRF PORTD

CLRF PORTB

CLRF PORTE

CLRF FLAG

CLRF FLAG2

CLRF FLAG3

CLRF TEST

BSF MOD1

;------------------------------------------------------------------------------------

MAIN

BSF LED2

BCF LED1

BCF LED3

BTFSC TEL_MOD

GOTO ESC_MOD

BTFSC TEL_CAG

GOTO ESC_CAG

BTFSC CH1

GOTO M1BIP1

BTFSC CH2

GOTO M1BIP2

BTFSC CH3

GOTO M1BIP3

BTFSC CH4

GOTO M1BIP4

BTFSC CHT

GOTO M5BIP1

BTFSC CH_SMS

GOTO ACTI_SMS

GOTO DISP1

LOOP2M

BTFSC TEL_MOD

GOTO ESC_MOD

BTFSC TEL_CAG

GOTO ESC_CAG

BTFSC CH1

GOTO M1BIP1

BTFSC CH2

GOTO M1BIP2

BTFSC CH3

GOTO M1BIP3

BTFSC CH4

GOTO M1BIP4

BTFSC CHT

GOTO M5BIP1

BTFSC CH_SMS

GOTO ACTI_SMS

GOTO DISP2

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

ESC_MOD

BTFSC TEL_MOD

GOTO $-1

CALL CONTA_MOD

BSF LED3

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

CONTA_MOD

BCF LED2

CALL DELAY

CALL DELAY

BSF LED3

MOVLW D'1'

BTFSC CH1

GOTO LOOP1

BTFSC CH2

GOTO LOOP2

BTFSC CH3

GOTO LOOP3

BTFSC CH4

GOTO LOOP4

BTFSC CH5

GOTO LOOP5

BSF LED2

CALL DELAY

CALL DELAY

BSF LED3

MOVLW D'1'

BTFSC CH1

GOTO LOOP1

BTFSC CH2

GOTO LOOP2

BTFSC CH3

GOTO LOOP3

BTFSC CH4

GOTO LOOP4

BTFSC CH5

GOTO LOOP5

GOTO CONTA_MOD

LOOP1

BTFSC CH1

GOTO $-1

CALL DELAY

BSF MOD1

BCF MOD2

BCF MOD3

BCF MOD4

BCF MOD5

RETURN

LOOP2

BTFSC CH2

GOTO $-1

CALL DELAY

BCF MOD1

BSF MOD2

BCF MOD3

BCF MOD4

BCF MOD5

RETURN

LOOP3

BTFSC CH3

GOTO $-1

CALL DELAY

BCF MOD1

BCF MOD2

BSF MOD3

BCF MOD4

BCF MOD5

RETURN

LOOP4

BTFSC CH4

GOTO $-1

CALL DELAY

BCF MOD1

BCF MOD2

BCF MOD3

BSF MOD4

BCF MOD5

RETURN

LOOP5

BTFSC CH5

GOTO $-1

CALL DELAY

BCF MOD1

BCF MOD2

BCF MOD3

BCF MOD4

BSF MOD5

RETURN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

ESC_CAG

BCF LED2

GOTO PAUSA1_1

GOTO MAIN

;-------------------------------------------------------

;-------------------------------------------------------

BIP_1;##################################################

BTFSC MOD1

GOTO M1BIP1 ;ACTIVAR CARGA 1 NO MODO 1

BTFSC MOD2

GOTO M1BIP1 ;ACTIVAR CARGA 1 NO MODO 2

BTFSC MOD3

GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 3

BTFSC MOD4

GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 4

BTFSC MOD5

GOTO M5BIP1

GOTO MAIN

;_________________________________________________

M1BIP1 ;ACTIVAR CARGA 1 NO MODO 1

BTFSC CH1

GOTO $-1

CALL DELAY

BTFSS CG1

GOTO AC11

GOTO AP11

AC11

BSF CARGA1

BSF CG1

GOTO SMS

AP11

BCF CARGA1

BCF CG1

GOTO MAIN

;_________________________________________________

M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 3

BTFSS CG1

GOTO AC31

GOTO AP31

AC31

BSF CARGA1

BSF CG1

GOTO M3B1_2

AP31

BCF CARGA1

BCF CG1

GOTO M3B1_2

M3B1_2

BTFSS CG2

GOTO AC32

GOTO AP32

AC32

BSF CARGA2

BSF CG2

GOTO SMS

AP32

BCF CARGA2

BCF CG2

GOTO MAIN

;_______________________________________

M5BIP1 ;ACTIVAR TODAS CARGAS

BTFSC CHT

GOTO $-1

CALL DELAY

BTFSS CGT

GOTO AC51

GOTO AP51

AC51

BSF CARGA1

CALL PAUSA_5

BSF CARGA2

CALL PAUSA_5

BSF CARGA3

CALL PAUSA_5

BSF CARGA4

BSF CGT

BSF CG1

BSF CG2

BSF CG3

BSF CG4

GOTO SMS

AP51

BCF CARGA1

CALL PAUSA_5

BCF CARGA2

CALL PAUSA_5

BCF CARGA3

CALL PAUSA_5

BCF CARGA4

BCF CGT

BCF CG1

BCF CG2

BCF CG3

BCF CG4

GOTO MAIN

;_______________________________________

;-------------------------------------------------------

;-------------------------------------------------------

BIP_2;##################################################

BTFSC MOD1

GOTO M1BIP2 ;ACTIVAR CARGA 2 NO MODO 1

BTFSC MOD2

GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 2

BTFSC MOD3

GOTO M3BIP2 ;ACTIVAR CARGA 3 E 4 NO MODO 3

BTFSC MOD4

GOTO M5BIP1

GOTO MAIN

;_______________________________________

M1BIP2 ;ACTIVAR CARGA 2 NO MODO 1

BTFSC CH2

GOTO $-1

CALL DELAY

BTFSS CG2

GOTO AC12

GOTO AP12

AC12

BSF CARGA2

BSF CG2

GOTO SMS

AP12

BCF CARGA2

BCF CG2

GOTO MAIN

;_______________________________________

M3BIP2 ;ACTIVAR CARGA 3 E 4 NO MODO 3

BTFSS CG3

GOTO AC33

GOTO AP33

AC33

BSF CARGA3

BSF CG3

GOTO M3B2_2

AP33

BCF CARGA3

BCF CG3

CALL DELAY

CALL DELAY

GOTO M3B2_2

M3B2_2

BTFSS CG4

GOTO AC34

GOTO AP34

AC34

BSF CARGA4

BSF CG4

GOTO SMS

AP34

BCF CARGA4

BCF CG4

GOTO MAIN

;-------------------------------------------------------

;-------------------------------------------------------

BIP_3;##################################################

BTFSC MOD1

GOTO M1BIP3 ;ACTIVAR CARGA 3 NO MODO1

BTFSC MOD2

GOTO M2BIP3 ;ACTIVAR CARGA 1, 2 E 3 NO MODO 2

BTFSC MOD4

GOTO M5BIP1 ;ACTIVAR TODAS CARGAS

GOTO MAIN

;_______________________________________

M1BIP3 ;ACTIVAR CARGA 3 NO MODO1

BTFSC CH3

GOTO $-1

CALL DELAY

BTFSS CG3

GOTO AC13

GOTO AP13

AC13

BSF CARGA3

BSF CG3

GOTO SMS

AP13

BCF CARGA3

BCF CG3

GOTO MAIN

;_______________________________________

M2BIP3 ;ACTIVAR CARGA 1, 2 E 3 NO MODO 2

BTFSS CG1

GOTO AC21__

GOTO AP21__

AC21__

BSF CARGA1

BSF CG1

GOTO M2B3_1

AP21__

BCF CARGA1

BCF CG1

CALL DELAY

CALL DELAY

GOTO M2B3_1

M2B3_1

BTFSS CG2

GOTO AC22

GOTO AP22

AC22

BSF CARGA2

BSF CG2

GOTO M2B3_2

AP22

BCF CARGA2

BCF CG2

CALL DELAY

CALL DELAY

GOTO M2B3_2

M2B3_2

BTFSS CG3

GOTO AC23

GOTO AP23

AC23

BSF CARGA3

BSF CG3

GOTO SMS

AP23

BCF CARGA3

BCF CG3

GOTO MAIN

;_______________________________________

;-------------------------------------------------------

;-------------------------------------------------------

BIP_4;##################################################

BTFSC MOD1

GOTO M1BIP4

BTFSC MOD2

GOTO M5BIP1

GOTO MAIN

;__________________________________________

M1BIP4 ;ACTIVAR CARGA 4 NO MODO 1

BTFSC CH4

GOTO $-1

CALL DELAY

BTFSS CG4

GOTO AC14

GOTO AP14

AC14

BSF CARGA4

BSF CG4

GOTO SMS

AP14

BCF CARGA4

BCF CG4

GOTO MAIN

;_______________________________________

;-------------------------------------------------------

;-------------------------------------------------------

BIP_5;##################################################5

BTFSC MOD2

GOTO M5BIP1

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

;«««««««««««««««««««««««««««««««««««««««««««««««««««

DISP1

BTFSC MOD1

GOTO DISP1_M1

BTFSC MOD2

GOTO DISP1_M2

BTFSC MOD3

GOTO DISP1_M3

BTFSC MOD4

GOTO DISP1_M4

BTFSC MOD5

GOTO DISP1_M5

GOTO LOOP2M

;________________

DISP1_M1

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF BD

BSF CD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M2

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BCF CD

BSF AD

BSF BD

BSF DD

BSF ED

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M3

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF AD

BSF BD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M4

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF FD

BSF BD

BSF CD

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;________________

DISP1_M5

CLRF PORTA

CLRF PORTE

BSF DISPLAY1

BCF DISPLAY2

BSF AD

BSF FD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO LOOP2M

;----------------------

DISP2

MOVF FLAG3,W

ANDLW B'00001111'

MOVWF CONTADOR

MOVLW D'15'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C4

MOVLW D'0'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C0

MOVLW D'1'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'2'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'3'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'4'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'5'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'6'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'7'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

MOVLW D'8'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C1

MOVLW D'9'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'10'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'11'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

MOVLW D'12'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C2

MOVLW D'13'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

MOVLW D'14'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO DISP2_C3

;________________

DISP2_C0

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF BD

BSF CD

BSF AD

BSF DD

BSF FD

BSF ED

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C1

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF BD

BSF CD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C2

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BCF CD

BSF AD

BSF BD

BSF DD

BSF ED

BSF GD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C3

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF AD

BSF BD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C4

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF FD

BSF BD

BSF CD

BSF GD

NOP

NOP

NOP

GOTO MAIN

;________________

DISP2_C5

CLRF PORTA

CLRF PORTE

BCF DISPLAY1

BSF DISPLAY2

BSF AD

BSF FD

BSF CD

BSF DD

BSF GD

NOP

NOP

NOP

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

ACTI_SMS

BTFSC CH_SMS

GOTO $-1

BTFSS SMS_FLAG

GOTO ACTI

GOTO DESACTI

ACTI

BSF SMS_FLAG

BSF LED4

GOTO MAIN

DESACTI

BCF SMS_FLAG

BCF LED4

GOTO MAIN

;«««««««««««««««««««««««««««««««««««««««««««««««««««

SMS

BTFSS SMS_FLAG

GOTO MAIN

MOVF FLAG3,W

ANDLW B'00001111'

MOVWF CONTADOR

MOVLW D'0'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO MAIN

MOVLW B'00000001'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1

MOVLW B'00000010'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2

MOVLW B'00000100'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS3

MOVLW B'00001000'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS4

MOVLW B'00000011'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_2

MOVLW D'5'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_3

MOVLW D'9'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_4

MOVLW D'6'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2_3

MOVLW D'10'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2_4

MOVLW D'12'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS3_4

MOVLW D'7'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_2_3

MOVLW B'000001011'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_2_4

MOVLW B'000001101'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS1_3_4

MOVLW D'14'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2_3_4

MOVLW D'15'

XORWF CONTADOR,W

BTFSC STATUS,Z

GOTO SMS2

;####################################################################

SMS4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 1ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 2ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 3ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 4ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_2

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 5ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5

;----------------------------------------------------

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 6ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 7ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2_3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 8ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 9ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS3_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 10ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_2_3

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 11ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_2_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 12ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS1_3_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 13ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

SMS2_3_4

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NA 14ª MSG

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;1

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;2

CALL PAUSA_5

BSF LEFT

CALL DELAY

CALL DELAY

BCF LEFT ;3

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK

CALL DELAY

CALL DELAY

BCF OK ;ENVIAR SMS

CALL PAUSA_5

CALL PAUSA

BSF OFF

CALL DELAY

CALL DELAY

BCF OFF ;REINICIAR

GOTO MAIN

;####################################################################

GOTO MAIN

;####################################################################

;##############ROTINAS DE PAUSAS#############

PAUSA

MOVLW D'100'

MOVWF ATRASO

PAUS_1

CALL DELAY

DECFSZ ATRASO

GOTO PAUS_1

RETURN

PAUSA_5

MOVLW D'30'

MOVWF ATRASO

PAUS15

CALL DELAY

DECFSZ ATRASO

GOTO PAUS15

RETURN

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA1_1

BSF LED1

CALL PAUSA

CALL PAUSA_5

MOVLW D'255'

MOVWF ATRASO

PAUSA11_1

BTFSC TEL_CAG

GOTO $-1

PAUSA11_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA2_1

DECFSZ ATRASO

GOTO PAUSA11_11

GOTO BIP_1

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA2_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA12_1

BCF LED2

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA12_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA3_1

DECFSZ ATRASO

GOTO PAUSA12_11

GOTO BIP_2

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA3_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA13_1

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA13_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA4_1

DECFSZ ATRASO

GOTO PAUSA13_11

GOTO BIP_3

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA4_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA14_1

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA14_11

CALL DELAY

BTFSC TEL_CAG

GOTO PAUSA5_1

DECFSZ ATRASO

GOTO PAUSA14_11

GOTO BIP_4

;««««««««««««««««««««««««««

;««««««««««««««««««««««««««

PAUSA5_1

BSF LED2

CALL PAUSA

MOVLW D'255'

MOVWF ATRASO

PAUSA15_1

BCF LED2

BTFSC TEL_CAG

GOTO $-1

PAUSA15_11

CALL DELAY

DECFSZ ATRASO

GOTO PAUSA15_11

GOTO BIP_5

;««««««««««««««««««««««««««

;---------------------------------DELAY de 10ms------------------------------

DELAY

movlw d'217'

movwf Tmr0

bcf intcon,T0if

btfss intcon,t0if

goto $-1

return

END ;FIM DA COMPILACAO

e a mensagem...

----------------------------------------------------------------------

Debug build of project `D:\CONTROLADOR D CARGA\C DE CARGA.mcp' started.

Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01

Preprocessor symbol `__DEBUG' is defined.

Thu Mar 17 11:01:06 2011

----------------------------------------------------------------------

Clean: Deleting intermediary and output files.

Clean: Deleted file "D:\CONTROLADOR D CARGA\C DE CARGAS.o".

Clean: Deleted file "D:\CONTROLADOR D CARGA\C DE CARGAS.err".

Clean: Deleted file "D:\CONTROLADOR D CARGA\C DE CARGAS.lst".

Clean: Done.

Executing: "E:\Arquivos de programas\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F877 "C DE CARGAS.ASM" /l"C DE CARGAS.lst" /e"C DE CARGAS.err" /o"C DE CARGAS.o" /d__DEBUG=1 /c- /w1

Executing: "E:\Arquivos de programas\Microchip\MPASM Suite\mplink.exe" /p16F877 "C DE CARGAS.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"C DE CARGA.cof" /M"C DE CARGA.map" /W

MPLINK 4.30.01, Linker

Copyright © 2009 Microchip Technology Inc.

Error - section '.org_1' can not fit the absolute section. Section '.org_1' start=0x00000004, length=0x000011f8

Errors : 1

Link step failed.

----------------------------------------------------------------------

Debug build of project `D:\CONTROLADOR D CARGA\C DE CARGA.mcp' failed.

Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01

Preprocessor symbol `__DEBUG' is defined.

Thu Mar 17 11:01:08 2011

----------------------------------------------------------------------

BUILD FAILED

Compartilhar este post


Link para o post
Compartilhar em outros sites

Tente trocar;

 ORG 0X0004
GOTO INICIO ;CASO NÃO USE INTERRUPÇÕES

por;

 ORG 0X0004
NOP ;CASO NÃO USE INTERRUPÇÕES
GOTO INICIO

Compartilhar este post


Link para o post
Compartilhar em outros sites
Tente trocar;

 ORG 0X0004
GOTO INICIO ;CASO NÃO USE INTERRUPÇÕES

por;

 ORG 0X0004
NOP ;CASO NÃO USE INTERRUPÇÕES
GOTO INICIO

nem com isso.

tá complicado...

Compartilhar este post


Link para o post
Compartilhar em outros sites

Segundo o que pesquisei,a solução é complicada a menos que diminua o código tera que alterar algo nos arquivos do Mplab.

Compartilhar este post


Link para o post
Compartilhar em outros sites
Segundo o que pesquisei,a solução é complicada a menos que diminua o código tera que alterar algo nos arquivos do Mplab.

Eu já consegui resolver este problema simplificando o programa atraves de sub-rotinas, tal como tinha dito. Mas estou com um projecto (uma fechadura electronica) que será maior que esse.

Então eu preciso dar uma solução nisso. Se puderes dizer quais alterações fazer seria bom.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Seu programa aqui montou normal.

Só deu erros devido ao nome dos bits de configuração e de alguns registradores estarem em letra minúscula, que depois de mudado, não deu mais nenhum erro.

Uso a versão 8.63.00.00 do Mplab.

Experimente reinstalar o Mplab.

Eu já me deparei com esta mensagem de erro, mas, no meu caso é que havia uma rotina de interrupção, a qual, deve ser escrita a partir do endereço 0X04 e eu havia me esquecido de desviar o início do código para depois do fim da rotina de interrupção.

Então, o código não coube, obviamente entre o endereço 0x00 e o 0x04 e o Assembler mostrou a mesma mensagem de erro que você está tendo.

No seu caso não é isto.

E também não tem a ver com a quantidade de memória.

O seu programa está ocupando 2300 posições de memória de um total de 8192 disponíveis.

O seu problema é de configuração do Mplab.

Por isto, sugiro que você desinstale ele e reinstale novamente.

Compartilhar este post


Link para o post
Compartilhar em outros sites
Seu programa aqui montou normal.

Só deu erros devido ao nome dos bits de configuração e de alguns registradores estarem em letra minúscula, que depois de mudado, não deu mais nenhum erro.

Uso a versão 8.63.00.00 do Mplab.

Experimente reinstalar o Mplab.

Vou ver se reinstalo ou actualizo.

Compartilhar este post


Link para o post
Compartilhar em outros sites

O que percebi é o seguinte:

O PIC16f877a tem 4 paginas de memória de programa nível usuário.

São elas:

CODEPAGE NAME=page0 START=0x0000 END=0x07FF <- Nível usuário

CODEPAGE NAME=page1 START=0x0800 END=0x0FFF <- Nível usuário

CODEPAGE NAME=page2 START=0x1000 END=0x17FF <- Nível usuário

CODEPAGE NAME=page3 START=0x1800 END=0x1EFF <- Nível usuário

Bem, cada página suporta no máximo 2047 ou 0x07FF instruções com exceção da página 4 (0x6FF), a partir daí terá que mudar a página de memória de programa.

Como fazemos isso?:

Através do comando "ORG 0x????"

ex.

exemplocomandoorg.png

O seu programa está usando 2305 ou 0x0901 instruções, portanto deverá dividir em 2 páginas.

Não necessariamente a instrução "ORG", deverá vir após a instrução 0x07FF, poderá ser antes, depende do gosto do programador.

Quando é necessário acessar uma parte do programa que está em outra página, antes de escrever os comandos “CALL” ou “GOTO”, você precisa dizer em que página essa parte do programa está. Essa indicação é feita pelo registrador “PCLATH”. O mesmo acontece quando você quer retornar à página em que foi chamado pelo “CALL”. Primeiro indica a página, e em seguida escreve “RETURN”.

Para acessar a página 0 --> BCF PCLATH,3 / BCF PCLATH,4

Para acessar a página 1 --> BSF PCLATH,3

Para acessar a página 2 --> BSF PCLATH,4

Para acessar a página 3 --> BSF PCLATH,3 / BSF PCLATH,4

Código Compilado:


Include <p16f877.inc>
__Config _XT_OSC & _WDT_OFF & _CP_OFF & _PWRTE_ON
;************************************************* *******************
Digital equ b'00000110'
CBLOCK 20H
ATRASO
FLAG
FLAG2
FLAG3
TEST
CONTADOR
ENDC

#DEFINE TEL_MOD PORTA,0
#DEFINE TEL_CAG PORTA,1

#DEFINE AD PORTA,2
#DEFINE BD PORTA,3
#DEFINE CD PORTD,7
#DEFINE DD PORTA,5
#DEFINE ED PORTE,0
#DEFINE FD PORTE,1
#DEFINE GD PORTE,2

#DEFINE CH_SMS PORTA,4

#DEFINE LED1 PORTB,5
#DEFINE LED2 PORTB,6
#DEFINE LED3 PORTB,7
#DEFINE LED4 PORTD,5

#DEFINE CARGA1 PORTB,0
#DEFINE CARGA2 PORTB,1
#DEFINE CARGA3 PORTB,2
#DEFINE CARGA4 PORTB,3


#DEFINE CH1 PORTC,0
#DEFINE CH2 PORTC,1
#DEFINE CH3 PORTC,2
#DEFINE CH4 PORTC,3
#DEFINE CH5 PORTC,4
#DEFINE CHT PORTC,5
#DEFINE DISPLAY1 PORTC,6
#DEFINE DISPLAY2 PORTC,7

#DEFINE OFF PORTD,0
#DEFINE OK PORTD,1
#DEFINE LEFT PORTD,2

#DEFINE MOD1 FLAG,0
#DEFINE MOD2 FLAG,1
#DEFINE MOD3 FLAG,2
#DEFINE MOD4 FLAG,3
#DEFINE MOD5 FLAG,4

#DEFINE SMS_FLAG FLAG,5

#DEFINE BIP1 FLAG2,0
#DEFINE BIP2 FLAG2,1
#DEFINE BIP3 FLAG2,2
#DEFINE BIP4 FLAG2,3
#DEFINE BIP5 FLAG2,4

#DEFINE CG1 FLAG3,0
#DEFINE CG2 FLAG3,1
#DEFINE CG3 FLAG3,2
#DEFINE CG4 FLAG3,3
#DEFINE CGT FLAG3,5

;PROGRAMA AS PORTAS
ORG 0x0000 ;INICIO DA COMPILACAO
GOTO INICIO
ORG 0X0004
GOTO INICIO ;CASO NÃO USE INTERRUPÇÕES
;;;;;;;;;;;;;;;;;;;;
INICIO
BSF STATUS,RP0 ;SELECIONA BANK 1
movlw Digital
BSF STATUS,RP0 ;SELECIONA BANK 1
movlw Digital

movwf ADCON1
MOVLW 0X13 ;PROGRAMA TODOS OS BITS PARA OUT (00)
MOVWF TRISA ;NA PORTA A (0X00)
MOVLW 0X00 ;PROGRAMA TODOS OS BITS PARA OUT (0)
MOVWF TRISB ;NA PORTA B (00)
MOVLW 0X3F
MOVWF TRISC
CLRF TRISE
CLRF TRISD
movlw b'10000111'
movwf OPTION_REG
BCF STATUS,RP0 ;VOLTA AO BANK 0
;FIM DA configuração ENTRA NO LOOP PRINCIPAL
clrf INTCON



CLRF PORTA
CLRF PORTC
CLRF PORTD
CLRF PORTB
CLRF PORTE
CLRF FLAG
CLRF FLAG2
CLRF FLAG3
CLRF TEST

BSF MOD1

;------------------------------------------------------------------------------------
MAIN

BSF LED2
BCF LED1
BCF LED3


BTFSC TEL_MOD
GOTO ESC_MOD

BTFSC TEL_CAG
GOTO ESC_CAG

BTFSC CH1
GOTO M1BIP1

BTFSC CH2
GOTO M1BIP2

BTFSC CH3
GOTO M1BIP3

BTFSC CH4
GOTO M1BIP4


BTFSC CHT
GOTO M5BIP1

BTFSC CH_SMS
GOTO ACTI_SMS

GOTO DISP1

LOOP2M
BTFSC TEL_MOD
GOTO ESC_MOD

BTFSC TEL_CAG
GOTO ESC_CAG

BTFSC CH1
GOTO M1BIP1

BTFSC CH2
GOTO M1BIP2

BTFSC CH3
GOTO M1BIP3

BTFSC CH4
GOTO M1BIP4

BTFSC CHT
GOTO M5BIP1

BTFSC CH_SMS
GOTO ACTI_SMS

GOTO DISP2

GOTO MAIN


;««««««««««««««««««««««««««««««««««««««««««««««««« ««
ESC_MOD

BTFSC TEL_MOD
GOTO $-1
CALL CONTA_MOD

BSF LED3
GOTO MAIN

;««««««««««««««««««««««««««««««««««««««««««««««««« ««
CONTA_MOD

BCF LED2
CALL DELAY
CALL DELAY
BSF LED3
MOVLW D'1'

BTFSC CH1
GOTO LOOP1

BTFSC CH2
GOTO LOOP2

BTFSC CH3
GOTO LOOP3

BTFSC CH4
GOTO LOOP4

BTFSC CH5
GOTO LOOP5

BSF LED2
CALL DELAY
CALL DELAY
BSF LED3
MOVLW D'1'

BTFSC CH1
GOTO LOOP1

BTFSC CH2
GOTO LOOP2

BTFSC CH3
GOTO LOOP3

BTFSC CH4
GOTO LOOP4

BTFSC CH5
GOTO LOOP5
GOTO CONTA_MOD


LOOP1
BTFSC CH1
GOTO $-1
CALL DELAY
BSF MOD1
BCF MOD2
BCF MOD3
BCF MOD4
BCF MOD5
RETURN

LOOP2
BTFSC CH2
GOTO $-1
CALL DELAY
BCF MOD1
BSF MOD2
BCF MOD3
BCF MOD4
BCF MOD5
RETURN

LOOP3
BTFSC CH3
GOTO $-1
CALL DELAY
BCF MOD1
BCF MOD2
BSF MOD3
BCF MOD4
BCF MOD5
RETURN

LOOP4
BTFSC CH4
GOTO $-1
CALL DELAY
BCF MOD1
BCF MOD2
BCF MOD3
BSF MOD4
BCF MOD5
RETURN

LOOP5
BTFSC CH5
GOTO $-1
CALL DELAY
BCF MOD1
BCF MOD2
BCF MOD3
BCF MOD4
BSF MOD5
RETURN
;««««««««««««««««««««««««««««««««««««««««««««««««« ««
ESC_CAG

BCF LED2
GOTO PAUSA1_1

GOTO MAIN


;-------------------------------------------------------
;-------------------------------------------------------
BIP_1;############################################ ######

BTFSC MOD1
GOTO M1BIP1 ;ACTIVAR CARGA 1 NO MODO 1

BTFSC MOD2
GOTO M1BIP1 ;ACTIVAR CARGA 1 NO MODO 2

BTFSC MOD3
GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 3

BTFSC MOD4
GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 4

BTFSC MOD5
GOTO M5BIP1
GOTO MAIN
;_________________________________________________
M1BIP1 ;ACTIVAR CARGA 1 NO MODO 1
BTFSC CH1
GOTO $-1
CALL DELAY

BTFSS CG1
GOTO AC11
GOTO AP11

AC11
BSF CARGA1
BSF CG1
GOTO SMS

AP11
BCF CARGA1
BCF CG1
GOTO MAIN
;_________________________________________________
M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 3

BTFSS CG1
GOTO AC31
GOTO AP31
AC31
BSF CARGA1
BSF CG1
GOTO M3B1_2
AP31
BCF CARGA1
BCF CG1
GOTO M3B1_2

M3B1_2
BTFSS CG2
GOTO AC32
GOTO AP32

AC32
BSF CARGA2
BSF CG2
GOTO SMS
AP32
BCF CARGA2
BCF CG2
GOTO MAIN
;_______________________________________
M5BIP1 ;ACTIVAR TODAS CARGAS

BTFSC CHT
GOTO $-1
CALL DELAY

BTFSS CGT
GOTO AC51
GOTO AP51

AC51
BSF CARGA1
CALL PAUSA_5
BSF CARGA2
CALL PAUSA_5
BSF CARGA3
CALL PAUSA_5
BSF CARGA4
BSF CGT
BSF CG1
BSF CG2
BSF CG3
BSF CG4
GOTO SMS

AP51
BCF CARGA1
CALL PAUSA_5
BCF CARGA2
CALL PAUSA_5
BCF CARGA3
CALL PAUSA_5
BCF CARGA4
BCF CGT
BCF CG1
BCF CG2
BCF CG3
BCF CG4
GOTO MAIN
;_______________________________________
;-------------------------------------------------------
;-------------------------------------------------------
BIP_2;############################################ ######

BTFSC MOD1
GOTO M1BIP2 ;ACTIVAR CARGA 2 NO MODO 1

BTFSC MOD2
GOTO M3BIP1 ;ACTIVAR CARGA 1 E 2 NO MODO 2

BTFSC MOD3
GOTO M3BIP2 ;ACTIVAR CARGA 3 E 4 NO MODO 3

BTFSC MOD4
GOTO M5BIP1

GOTO MAIN
;_______________________________________
M1BIP2 ;ACTIVAR CARGA 2 NO MODO 1
BTFSC CH2
GOTO $-1
CALL DELAY

BTFSS CG2
GOTO AC12
GOTO AP12

AC12
BSF CARGA2
BSF CG2
GOTO SMS

AP12
BCF CARGA2
BCF CG2
GOTO MAIN
;_______________________________________
M3BIP2 ;ACTIVAR CARGA 3 E 4 NO MODO 3

BTFSS CG3
GOTO AC33
GOTO AP33
AC33
BSF CARGA3
BSF CG3
GOTO M3B2_2
AP33
BCF CARGA3
BCF CG3
CALL DELAY
CALL DELAY
GOTO M3B2_2

M3B2_2
BTFSS CG4
GOTO AC34
GOTO AP34
AC34
BSF CARGA4
BSF CG4
GOTO SMS
AP34
BCF CARGA4
BCF CG4
GOTO MAIN

;-------------------------------------------------------
;-------------------------------------------------------
BIP_3;############################################ ######

BTFSC MOD1
GOTO M1BIP3 ;ACTIVAR CARGA 3 NO MODO1

BTFSC MOD2
GOTO M2BIP3 ;ACTIVAR CARGA 1, 2 E 3 NO MODO 2

BTFSC MOD4
GOTO M5BIP1 ;ACTIVAR TODAS CARGAS

GOTO MAIN

;_______________________________________
M1BIP3 ;ACTIVAR CARGA 3 NO MODO1
BTFSC CH3
GOTO $-1
CALL DELAY

BTFSS CG3
GOTO AC13
GOTO AP13

AC13
BSF CARGA3
BSF CG3
GOTO SMS

AP13
BCF CARGA3
BCF CG3
GOTO MAIN
;_______________________________________
M2BIP3 ;ACTIVAR CARGA 1, 2 E 3 NO MODO 2

BTFSS CG1
GOTO AC21__
GOTO AP21__
AC21__
BSF CARGA1
BSF CG1
GOTO M2B3_1
AP21__
BCF CARGA1
BCF CG1
CALL DELAY
CALL DELAY
GOTO M2B3_1

M2B3_1
BTFSS CG2
GOTO AC22
GOTO AP22
AC22
BSF CARGA2
BSF CG2
GOTO M2B3_2
AP22
BCF CARGA2
BCF CG2
CALL DELAY
CALL DELAY
GOTO M2B3_2

M2B3_2
BTFSS CG3
GOTO AC23
GOTO AP23
AC23
BSF CARGA3
BSF CG3
GOTO SMS
AP23
BCF CARGA3
BCF CG3
GOTO MAIN
;_______________________________________
;-------------------------------------------------------
;-------------------------------------------------------
BIP_4;############################################ ######

BTFSC MOD1
GOTO M1BIP4

BTFSC MOD2
GOTO M5BIP1

GOTO MAIN
;__________________________________________
M1BIP4 ;ACTIVAR CARGA 4 NO MODO 1
BTFSC CH4
GOTO $-1
CALL DELAY

BTFSS CG4
GOTO AC14
GOTO AP14

AC14
BSF CARGA4
BSF CG4
GOTO SMS

AP14
BCF CARGA4
BCF CG4
GOTO MAIN
;_______________________________________
;-------------------------------------------------------
;-------------------------------------------------------
BIP_5;############################################ ######5


BTFSC MOD2
GOTO M5BIP1

GOTO MAIN

;««««««««««««««««««««««««««««««««««««««««««««««««« ««


;««««««««««««««««««««««««««««««««««««««««««««««««« ««

DISP1


BTFSC MOD1
GOTO DISP1_M1

BTFSC MOD2
GOTO DISP1_M2

BTFSC MOD3
GOTO DISP1_M3

BTFSC MOD4
GOTO DISP1_M4

BTFSC MOD5
GOTO DISP1_M5
GOTO LOOP2M
;________________
DISP1_M1
CLRF PORTA
CLRF PORTE
BSF DISPLAY1
BCF DISPLAY2
BSF BD
BSF CD
NOP
NOP
NOP
GOTO LOOP2M
;________________
DISP1_M2
CLRF PORTA
CLRF PORTE
BSF DISPLAY1
BCF DISPLAY2
BCF CD
BSF AD
BSF BD
BSF DD
BSF ED
BSF GD
NOP
NOP
NOP
GOTO LOOP2M
;________________
DISP1_M3
CLRF PORTA
CLRF PORTE
BSF DISPLAY1
BCF DISPLAY2
BSF AD
BSF BD
BSF CD
BSF DD
BSF GD
NOP
NOP
NOP
GOTO LOOP2M
;________________
DISP1_M4
CLRF PORTA
CLRF PORTE
BSF DISPLAY1
BCF DISPLAY2
BSF FD
BSF BD
BSF CD
BSF GD
NOP
NOP
NOP
GOTO LOOP2M
;________________
DISP1_M5
CLRF PORTA
CLRF PORTE
BSF DISPLAY1
BCF DISPLAY2
BSF AD
BSF FD
BSF CD
BSF DD
BSF GD
NOP
NOP
NOP
GOTO LOOP2M

;----------------------
DISP2



MOVF FLAG3,W
ANDLW B'00001111'
MOVWF CONTADOR

MOVLW D'15'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C4


MOVLW D'0'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C0

MOVLW D'1'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C1

MOVLW D'2'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C1

MOVLW D'3'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C2

MOVLW D'4'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C1

MOVLW D'5'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C2

MOVLW D'6'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C2

MOVLW D'7'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C3

MOVLW D'8'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C1

MOVLW D'9'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C2

MOVLW D'10'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C2

MOVLW D'11'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C3

MOVLW D'12'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C2

MOVLW D'13'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C3

MOVLW D'14'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO DISP2_C3



;________________
DISP2_C0
CLRF PORTA
CLRF PORTE
BCF DISPLAY1
BSF DISPLAY2
BSF BD
BSF CD
BSF AD
BSF DD
BSF FD
BSF ED
NOP
NOP
NOP
GOTO MAIN
;________________
DISP2_C1
CLRF PORTA
CLRF PORTE
BCF DISPLAY1
BSF DISPLAY2
BSF BD
BSF CD
NOP
NOP
NOP
GOTO MAIN
;________________
DISP2_C2
CLRF PORTA
CLRF PORTE
BCF DISPLAY1
BSF DISPLAY2
BCF CD
BSF AD
BSF BD
BSF DD
BSF ED
BSF GD
NOP
NOP
NOP
GOTO MAIN
;________________
DISP2_C3
CLRF PORTA
CLRF PORTE
BCF DISPLAY1
BSF DISPLAY2
BSF AD
BSF BD
BSF CD
BSF DD
BSF GD
NOP
NOP
NOP
GOTO MAIN
;________________
DISP2_C4
CLRF PORTA
CLRF PORTE
BCF DISPLAY1
BSF DISPLAY2
BSF FD
BSF BD
BSF CD
BSF GD
NOP
NOP
NOP
GOTO MAIN
;________________
DISP2_C5
CLRF PORTA
CLRF PORTE
BCF DISPLAY1
BSF DISPLAY2
BSF AD
BSF FD
BSF CD
BSF DD
BSF GD
NOP
NOP
NOP
GOTO MAIN



;««««««««««««««««««««««««««««««««««««««««««««««««« ««
ACTI_SMS

BTFSC CH_SMS
GOTO $-1

BTFSS SMS_FLAG
GOTO ACTI
GOTO DESACTI

ACTI
BSF SMS_FLAG
BSF LED4
GOTO MAIN
DESACTI
BCF SMS_FLAG
BCF LED4
GOTO MAIN
;««««««««««««««««««««««««««««««««««««««««««««««««« ««
SMS

BTFSS SMS_FLAG
GOTO MAIN

MOVF FLAG3,W
ANDLW B'00001111'
MOVWF CONTADOR


MOVLW D'0'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO MAIN

MOVLW B'00000001'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS1

MOVLW B'00000010'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS2

MOVLW B'00000100'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS3

MOVLW B'00001000'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS4

MOVLW B'00000011'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS1_2

MOVLW D'5'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS1_3

MOVLW D'9'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS1_4

MOVLW D'6'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS2_3

MOVLW D'10'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS2_4

MOVLW D'12'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS3_4

MOVLW D'7'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS1_2_3

MOVLW B'000001011'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS1_2_4

MOVLW B'000001101'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS1_3_4

MOVLW D'14'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS2_3_4

MOVLW D'15'
XORWF CONTADOR,W
BTFSC STATUS,Z
GOTO SMS2

;################################################# ###################
SMS4

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5
;----------------------------------------------------
BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 1ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################

SMS1

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5
;----------------------------------------------------
BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 2ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################


SMS2

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5
;----------------------------------------------------
BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 3ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################

SMS3

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5
;----------------------------------------------------
BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 4ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################

SMS1_2


BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5
;----------------------------------------------------
BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 5ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################

SMS1_3


BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

CALL PAUSA_5
;----------------------------------------------------
BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 6ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################
SMS1_4


BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------
CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5
BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 7ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################
SMS2_3


BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS


;----------------------------------------------------
CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 8ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################
SMS2_4


BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------
CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 9ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################
SMS3_4


BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------
CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5
BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 10ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################
SMS1_2_3


BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------
CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 11ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################
SMS1_2_4


BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------
CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 12ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################
SMS1_3_4

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS

;----------------------------------------------------
CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 13ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
ORG 0x800
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################
SMS2_3_4


BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO MENU

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NAS MSG

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NOS RASCUNHOS


;----------------------------------------------------
CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NA 14ª MSG

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENTRAR NO SUBMENU

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;1

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;2

CALL PAUSA_5

BSF LEFT
CALL DELAY
CALL DELAY
BCF LEFT ;3

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;REENCAMINHAR

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;PROCURAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;CONFIRMAR Nº

CALL PAUSA_5

BSF OK
CALL DELAY
CALL DELAY
BCF OK ;ENVIAR SMS

CALL PAUSA_5
CALL PAUSA

BSF OFF
CALL DELAY
CALL DELAY
BCF OFF ;REINICIAR

GOTO MAIN

;################################################# ###################



GOTO MAIN

;################################################# ###################



;##############ROTINAS DE PAUSAS#############
PAUSA
MOVLW D'100'
MOVWF ATRASO

PAUS_1
CALL DELAY
DECFSZ ATRASO
GOTO PAUS_1
RETURN


PAUSA_5
MOVLW D'30'
MOVWF ATRASO

PAUS15
CALL DELAY
DECFSZ ATRASO
GOTO PAUS15
RETURN

;««««««««««««««««««««««««««
;««««««««««««««««««««««««««
;««««««««««««««««««««««««««
;««««««««««««««««««««««««««
PAUSA1_1
BSF LED1
CALL PAUSA
CALL PAUSA_5
MOVLW D'255'
MOVWF ATRASO

PAUSA11_1
BTFSC TEL_CAG
GOTO $-1
PAUSA11_11
CALL DELAY
BTFSC TEL_CAG
GOTO PAUSA2_1
DECFSZ ATRASO
GOTO PAUSA11_11
GOTO BIP_1
;««««««««««««««««««««««««««
;««««««««««««««««««««««««««
PAUSA2_1
BSF LED2
CALL PAUSA
MOVLW D'255'
MOVWF ATRASO

PAUSA12_1
BCF LED2
BCF LED2
BTFSC TEL_CAG
GOTO $-1
PAUSA12_11
CALL DELAY
BTFSC TEL_CAG
GOTO PAUSA3_1
DECFSZ ATRASO
GOTO PAUSA12_11
GOTO BIP_2
;««««««««««««««««««««««««««
;««««««««««««««««««««««««««
PAUSA3_1
BSF LED2
CALL PAUSA
MOVLW D'255'
MOVWF ATRASO

PAUSA13_1
BCF LED2
BTFSC TEL_CAG
GOTO $-1
PAUSA13_11
CALL DELAY
BTFSC TEL_CAG
GOTO PAUSA4_1
DECFSZ ATRASO
GOTO PAUSA13_11
GOTO BIP_3
;««««««««««««««««««««««««««
;««««««««««««««««««««««««««
PAUSA4_1
BSF LED2
CALL PAUSA
MOVLW D'255'
MOVWF ATRASO

PAUSA14_1
BCF LED2
BTFSC TEL_CAG
GOTO $-1
PAUSA14_11
CALL DELAY
BTFSC TEL_CAG
GOTO PAUSA5_1
DECFSZ ATRASO
GOTO PAUSA14_11
GOTO BIP_4

;««««««««««««««««««««««««««
;««««««««««««««««««««««««««
PAUSA5_1
BSF LED2
CALL PAUSA
MOVLW D'255'
MOVWF ATRASO

PAUSA15_1
BCF LED2
BTFSC TEL_CAG
GOTO $-1
PAUSA15_11
CALL DELAY
DECFSZ ATRASO
GOTO PAUSA15_11
GOTO BIP_5
;««««««««««««««««««««««««««

;---------------------------------DELAY de 10ms------------------------------
DELAY

movlw d'217'
movwf TMR0
bcf INTCON,T0IF
btfss INTCON,T0IF
goto $-1
return



END ;FIM DA COMPILACAO

list p=16f877

Relatório de Compilação


Language tool versions: MPASMWIN.exe v5.35, mplink.exe v4.35
Preprocessor symbol `__DEBUG' is defined.
Fri Mar 18 05:25:35 2011
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "F:\Teste Pic\teste.o".
Clean: Deleted file "F:\Teste Pic\teste.err".
Clean: Deleted file "F:\Teste Pic\teste.lst".
Clean: Deleted file "F:\Teste Pic\teste.cof".
Clean: Deleted file "F:\Teste Pic\teste.hex".
Clean: Done.
Executing: "C:\Arquivos de programas\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F877A "teste.asm" /l"teste.lst" /e"teste.err" /o"teste.o" /d__DEBUG=1
Executing: "C:\Arquivos de programas\Microchip\MPASM Suite\mplink.exe" "C:\Arquivos de programas\Microchip\MPASM Suite\LKR\16f877a_g.lkr" "teste.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"teste.cof" /M"teste.map" /W
MPLINK 4.35, Linker
Copyright (c) 2009 Microchip Technology Inc.
Errors : 0

MP2HEX 4.35, COFF to HEX File Converter
Copyright (c) 2009 Microchip Technology Inc.
Errors : 0

Loaded F:\Teste Pic\teste.cof.
----------------------------------------------------------------------
Debug build of project `F:\Teste Pic\teste.mcp' succeeded.
Language tool versions: MPASMWIN.exe v5.35, mplink.exe v4.35
Preprocessor symbol `__DEBUG' is defined.
Fri Mar 18 05:25:50 2011
----------------------------------------------------------------------
BUILD SUCCEEDED
Debug build of project `F:\Teste Pic\teste.mcp' started.

Compartilhar este post


Link para o post
Compartilhar em outros sites

OK, AGORA SIM. O problema era exatamente esse.

----------------------------------------------------------------------

Debug build of project `D:\CONTROLADOR D CARGA\C DE CARGA.mcp' started.

Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01

Preprocessor symbol `__DEBUG' is defined.

Fri Mar 18 18:17:52 2011

----------------------------------------------------------------------

Clean: Deleting intermediary and output files.

Clean: Done.

Executing: "E:\Arquivos de programas\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F877 "C DE CARGAS.ASM" /l"C DE CARGAS.lst" /e"C DE CARGAS.err" /o"C DE CARGAS.o" /d__DEBUG=1 /c- /w2

Executing: "E:\Arquivos de programas\Microchip\MPASM Suite\mplink.exe" /p16F877 "C DE CARGAS.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"C DE CARGA.cof" /M"C DE CARGA.map" /W

MPLINK 4.30.01, Linker

Copyright © 2009 Microchip Technology Inc.

Errors : 0

MP2HEX 4.30.01, COFF to HEX File Converter

Copyright © 2009 Microchip Technology Inc.

Errors : 0

Loaded D:\CONTROLADOR D CARGA\C DE CARGA.cof.

----------------------------------------------------------------------

Debug build of project `D:\CONTROLADOR D CARGA\C DE CARGA.mcp' succeeded.

Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01

Preprocessor symbol `__DEBUG' is defined.

Fri Mar 18 18:17:54 2011

----------------------------------------------------------------------

BUILD SUCCEEDED

Valeu.

...

Bom, instalei o MPLAB 8.63 e testei o novamente o codigo antigo e nada, o problema era realmente nas paginas.

...

Quando é necessário acessar uma parte do programa que está em outra página, antes de escrever os comandos “CALL” ou “GOTO”, você precisa dizer em que página essa parte do programa está. Essa indicação é feita pelo registrador “PCLATH”. O mesmo acontece quando você quer retornar à página em que foi chamado pelo “CALL”. Primeiro indica a página, e em seguida escreve “RETURN”.

Não compreendi bem isso.

por exemplo, as rotinas de pausa ficarão na segunda pagina mas são acessadas normalmente.

Em que caso temos que indicar a pagina?

Compartilhar este post


Link para o post
Compartilhar em outros sites
Quando é necessário acessar uma parte do programa que está em outra página, antes de escrever os comandos “CALL” ou “GOTO”, você precisa dizer em que página essa parte do programa está. Essa indicação é feita pelo registrador “PCLATH”. O mesmo acontece quando você quer retornar à página em que foi chamado pelo “CALL”. Primeiro indica a página, e em seguida escreve “RETURN”.

ex.


ORG 0x0000 ; Pagina 0 da memoria de programa
GOTO START
ORG 0X0004 ; Interrupção
RETFIE
START
MOVLW H'15'
MOVWF TMR0
BSF PCLATH,3 ; Sinalizo que estou indo para a página 1 da memoria de programa (0x0800)
CALL DELAY
.
.
.
.
ORG 0X800
DELAY
MOVLW H'39'
MOVWF TEMP_1
DECFSZ TEMP_1
GOTO $-1
BCF PCLATH,3 ;
BCF PCLATH,4 ; Sinalizo que estou indo para a página 0 da memoria de programa (0x0000)
RETURN
.
.
.
.
END

Portanto, todo código que estiver em pagina diferente, deverá ser avisado ao registrador PCLath.

Ideal que deixe as subrotinas em paginas diferentes do programa principal.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Me esclareçam uma dúvida:

Porque o programa inicial montou normalmente aqui no meu computador?

Lembrando que se trata do primeiro programa postado pelo colega LEOPUENA.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Mulder_Fox,

Você adcionou ao projeto o Vinculador (Linker) 16F877A_G.LKR?

Se não tiver adcionado, ele compila numa boa, porém não gera o arquivo .HEX que seria o principal.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Eu não adicionei e ele gerou o arquivo .hex normalmente.

Segue o mesmo:


:020000040000FA
:10000000831606309F0013308500003086003F3095
:100010008700890188018730810083128B01850167
:100020008701880186018901A101A201A301A40120
:10003000211406178612861305183F288518902864
:1000400007189E288718E52807190C2987193C29C5
:10005000871ABC28051A232A4B2905183F2885181A
:10006000902807189E288718E52807190C29871952
:100070003C29871ABC28051A232A9429192805180F
:100080003F284420861719280613F520F5208617E7
:1000900001300718632887186C28071975288719F5
:1000A0007E28071A87280617F520F52086170130C5
:1000B0000718632887186C280719752887197E2860
:1000C000071A8728442807186328F5202114A1104F
:1000D0002111A1112112080087186C28F520211088
:1000E000A1142111A1112112080007197528F5206A
:1000F0002110A1102115A1112112080087197E28B5
:10010000F5202110A1102111A11521120800071AB4
:100110008728F5202110A1102111A1112116080016
:100120000613B528192821189E28A1189E282119E0
:10013000AA28A119AA28211ABC28192807189E281C
:10014000F520231CA428A728061423142E2A061001
:1001500023101928231CAD28B02806142314B32813
:1001600006102310B328A31CB628B9288614A3149C
:100170002E2A8610A3101928871ABC28F520A31E42
:10018000C228CF280614AF208614AF200615AF2052
:100190008615A3162314A3142315A3152E2A0610BF
:1001A000AF208610AF200611AF208611A3122310B6
:1001B000A3102311A31119282118E528A118AA2892
:1001C0002119F128A119BC2819288718E528F5203C
:1001D000A31CEB28EE288614A3142E2A8610A31045
:1001E0001928231DF428F72806152315FC280611C5
:1001F0002311F520F520FC28A31DFF2802298615D0
:10020000A3152E2A8611A311192821180C29A1182B
:100210001829A119BC28192807190C29F520231D14
:1002200012291529061523152E2A0611231119281E
:10023000231C1B291E29061423142329061023100E
:10024000F520F5202329A31C262929298614A31487
:100250002E298610A310F520F5202E29231D3129E3
:100260003429061523152E2A0611231119282118C1
:100270003C29A118BC28192887193C29F520A31D61
:10028000422945298615A3152E2A8611A31119285E
:10029000A118BC28192821185629A118602921194C
:1002A0006E29A1197B29211A87292D288501890109
:1002B00007178713851588170000000000002D28F8
:1002C000850189010717871388130515851585167C
:1002D000091409150000000000002D28850189017E
:1002E000071787130515851588178516091500004A
:1002F000000000002D288501890107178713891444
:100300008515881709150000000000002D288501BB
:10031000890107178713051589148817851609158C
:100320000000000000002D2823080F39A5000F3021
:10033000250603190A2A003025060319D72901309A
:1003400025060319E529023025060319E52903309E
:1003500025060319EF29043025060319E529053080
:1003600025060319EF29063025060319EF29073062
:1003700025060319FD29083025060319E52909304A
:1003800025060319EF290A3025060319EF290B303A
:1003900025060319FD290C3025060319EF290D3018
:1003A00025060319FD290E3025060319FD298501AF
:1003B0008901071387178515881705158516891470
:1003C00009140000000000001928850189010713A5
:1003D000871785158817000000000000192885017F
:1003E00089010713871788130515851585160914C4
:1003F0000915000000000000192885018901071374
:100400008717051585158817851609150000000042
:10041000000019288501890107138717891485159C
:1004200088170915000000000000192885018901BE
:1004300007138717051589148817851609150000F5
:10044000000000001928051A232AA11E282A2B2A99
:10045000A11688161928A11288121928A11E192878
:1004600023080F39A500003025060319192801308B
:1004700025060319C42A0230250603191A2B043055
:1004800025060319752B083025060319732A033036
:1004900025060319D52B0530250603193A2C0930FA
:1004A00025060319A42C063025060319132D0A303E
:1004B00025060319872D0C3025060319002E073059
:1004C000250603197E2E0B3025060319012F0D304A
:1004D00025060319892F0E302506031916280F301B
:1004E000250603191A2B8814F520F5208810AF2053
:1004F0008814F520F5208810AF200815F520F52088
:100500000811AF200815F520F5200811AF200815B7
:10051000F520F5200811AF208814F520F52088106B
:10052000AF208814F520F5208810AF208814F5201E
:10053000F5208810AF200815F520F5200811AF2010
:100540000815F520F5200811AF200815F520F52035
:100550000811AF208814F520F5208810AF208814EA
:10056000F520F5208810AF208814F520F52088109C
:10057000AF208814F520F5208810AF20A92008149A
:10058000F520F520081019288814F520F52088108A
:10059000AF208814F520F5208810AF200815F5202D
:1005A000F5200811AF200815F520F5200811AF201F
:1005B0000815F520F5200811AF208814F520F52046
:1005C0008810AF200815F520F5200811AF208814F9
:1005D000F520F5208810AF208814F520F52088102C
:1005E000AF200815F520F5200811AF200815F520DB
:1005F000F5200811AF200815F520F5200811AF20CF
:100600008814F520F5208810AF208814F520F520F7
:100610008810AF208814F520F5208810AF208814AA
:10062000F520F5208810AF20A9200814F520F5202A
:10063000081019288814F520F5208810AF20881498
:10064000F520F5208810AF200815F520F5200811B9
:10065000AF200815F520F5200811AF200815F5206A
:10066000F5200811AF208814F520F5208810AF2060
:100670000815F520F5200811AF200815F520F52004
:100680000811AF208814F520F5208810AF208814B9
:10069000F520F5208810AF200815F520F520081169
:1006A000AF200815F520F5200811AF200815F5201A
:1006B000F5200811AF208814F520F5208810AF2010
:1006C0008814F520F5208810AF208814F520F52037
:1006D0008810AF208814F520F5208810AF20A920BD
:1006E0000814F520F520081019288814F520F520A5
:1006F0008810AF208814F520F5208810AF20081549
:10070000F520F5200811AF200815F520F520081177
:10071000AF200815F520F5200811AF208814F5202A
:10072000F5208810AF200815F520F5200811AF201E
:100730000815F520F5200811AF200815F520F52043
:100740000811AF208814F520F5208810AF208814F8
:10075000F520F5208810AF200815F520F5200811A8
:10076000AF200815F520F5200811AF200815F52059
:10077000F5200811AF208814F520F5208810AF204F
:100780008814F520F5208810AF208814F520F52076
:100790008810AF208814F520F5208810AF20A920FC
:1007A0000814F520F520081019288814F520F520E4
:1007B0008810AF208814F520F5208810AF20081588
:1007C000F520F5200811AF200815F520F5200811B7
:1007D000AF200815F520F5200811AF208814F5206A
:1007E000F5208810AF200815F520F5200811AF205E
:1007F0000815F520F5200811AF200815F520F52083
:100800000811AF200815F520F5200811AF20881435
:10081000F520F5208810AF208814F520F5208810E9
:10082000AF200815F520F5200811AF200815F52098
:10083000F5200811AF200815F520F5200811AF208C
:100840008814F520F5208810AF208814F520F520B5
:100850008810AF208814F520F5208810AF20881468
:10086000F520F5208810AF20A9200814F520F520E8
:10087000081019288814F520F5208810AF20881456
:10088000F520F5208810AF200815F520F520081177
:10089000AF200815F520F5200811AF200815F52028
:1008A000F5200811AF208814F520F5208810AF201E
:1008B0000815F520F5200811AF200815F520F520C2
:1008C0000811AF200815F520F5200811AF200815F4
:1008D000F520F5200811AF200815F520F5200811A6
:1008E000AF208814F520F5208810AF208814F5205B
:1008F000F5208810AF200815F520F5200811AF204D
:100900000815F520F5200811AF200815F520F52071
:100910000811AF208814F520F5208810AF20881426
:10092000F520F5208810AF208814F520F5208810D8
:10093000AF208814F520F5208810AF20A9200814D6
:10094000F520F520081019288814F520F5208810C6
:10095000AF208814F520F5208810AF200815F52069
:10096000F5200811AF200815F520F5200811AF205B
:100970000815F520F5200811AF208814F520F52082
:100980008810AF200815F520F5200811AF200815B4
:10099000F520F5200811AF200815F520F5200811E5
:1009A000AF200815F520F5200811AF200815F52017
:1009B000F5200811AF200815F520F5200811AF200B
:1009C0008814F520F5208810AF208814F520F52034
:1009D0008810AF200815F520F5200811AF20081564
:1009E000F520F5200811AF200815F520F520081195
:1009F000AF208814F520F5208810AF208814F5204A
:100A0000F5208810AF208814F520F5208810AF203D
:100A10008814F520F5208810AF20A9200814F520AF
:100A2000F520081019288814F520F5208810AF202B
:100A30008814F520F5208810AF200815F520F52042
:100A40000811AF200815F520F5200811AF20081572
:100A5000F520F5200811AF208814F520F520881026
:100A6000AF200815F520F5200811AF200815F52056
:100A7000F5200811AF200815F520F5200811AF204A
:100A80000815F520F5200811AF200815F520F520F0
:100A90000811AF200815F520F5200811AF20081522
:100AA000F520F5200811AF208814F520F5208810D6
:100AB000AF208814F520F5208810AF200815F52008
:100AC000F5200811AF200815F520F5200811AF20FA
:100AD0000815F520F5200811AF208814F520F52021
:100AE0008810AF208814F520F5208810AF208814D6
:100AF000F520F5208810AF208814F520F520881007
:100B0000AF20A9200814F520F52008101928881412
:100B1000F520F5208810AF208814F520F5208810E6
:100B2000AF200815F520F5200811AF200815F52095
:100B3000F5200811AF200815F520F5200811AF2089
:100B40008814F520F5208810AF200815F520F52031
:100B50000811AF200815F520F5200811AF20081561
:100B6000F520F5200811AF200815F520F520081113
:100B7000AF200815F520F5200811AF200815F52045
:100B8000F5200811AF200815F520F5200811AF2039
:100B90000815F520F5200811AF208814F520F52060
:100BA0008810AF208814F520F5208810AF20081594
:100BB000F520F5200811AF200815F520F5200811C3
:100BC000AF200815F520F5200811AF208814F52076
:100BD000F5208810AF208814F520F5208810AF206C
:100BE0008814F520F5208810AF208814F520F52012
:100BF0008810AF20A9200814F520F5200810192826
:100C00008814F520F5208810AF208814F520F520F1
:100C10008810AF200815F520F5200811AF20081521
:100C2000F520F5200811AF200815F520F520081152
:100C3000AF208814F520F5208810AF200815F52086
:100C4000F5200811AF200815F520F5200811AF2078
:100C50000815F520F5200811AF200815F520F5201E
:100C60000811AF200815F520F5200811AF20081550
:100C7000F520F5200811AF200815F520F520081102
:100C8000AF200815F520F5200811AF200815F52034
:100C9000F5200811AF208814F520F5208810AF202A
:100CA0008814F520F5208810AF200815F520F520D0
:100CB0000811AF200815F520F5200811AF20081500
:100CC000F520F5200811AF208814F520F5208810B4
:100CD000AF208814F520F5208810AF208814F52067
:100CE000F5208810AF208814F520F5208810AF205B
:100CF000A9200814F520F520081019288814F520DB
:100D0000F5208810AF208814F520F5208810AF203A
:100D10000815F520F5200811AF200815F520F5205D
:100D20000811AF200815F520F5200811AF20881410
:100D3000F520F5208810AF200815F520F5200811C2
:100D4000AF200815F520F5200811AF200815F52073
:100D5000F5200811AF200815F520F5200811AF2067
:100D60000815F520F5200811AF200815F520F5200D
:100D70000811AF200815F520F5200811AF2008153F
:100D8000F520F5200811AF200815F520F5200811F1
:100D9000AF200815F520F5200811AF208814F520A4
:100DA000F5208810AF208814F520F5208810AF209A
:100DB0000815F520F5200811AF200815F520F520BD
:100DC0000811AF200815F520F5200811AF20881470
:100DD000F520F5208810AF208814F520F520881024
:100DE000AF208814F520F5208810AF208814F52056
:100DF000F5208810AF20A9200814F520F520081050
:100E000019288814F520F5208810AF208814F520C3
:100E1000F5208810AF200815F520F5200811AF2027
:100E20000815F520F5200811AF200815F520F5204C
:100E30000811AF208814F520F5208810AF20081580
:100E4000F520F5200811AF200815F520F520081130
:100E5000AF200815F520F5200811AF200815F52062
:100E6000F5200811AF200815F520F5200811AF2056
:100E70000815F520F5200811AF200815F520F520FC
:100E80000811AF200815F520F5200811AF2008152E
:100E9000F520F5200811AF200815F520F5200811E0
:100EA000AF200815F520F5200811AF208814F52093
:100EB000F5208810AF208814F520F5208810AF2089
:100EC0000815F520F5200811AF200815F520F520AC
:100ED0000811AF200815F520F5200811AF2088145F
:100EE000F520F5208810AF208814F520F520881013
:100EF000AF208814F520F5208810AF208814F52045
:100F0000F5208810AF20A9200814F520F52008103E
:100F100019288814F520F5208810AF208814F520B2
:100F2000F5208810AF200815F520F5200811AF2016
:100F30000815F520F5200811AF200815F520F5203B
:100F40000811AF208814F520F5208810AF2008156F
:100F5000F520F5200811AF200815F520F52008111F
:100F6000AF200815F520F5200811AF200815F52051
:100F7000F5200811AF200815F520F5200811AF2045
:100F80000815F520F5200811AF200815F520F520EB
:100F90000811AF200815F520F5200811AF2008151D
:100FA000F520F5200811AF200815F520F5200811CF
:100FB000AF200815F520F5200811AF200815F52001
:100FC000F5200811AF208814F520F5208810AF20F7
:100FD0008814F520F5208810AF200815F520F5209D
:100FE0000811AF200815F520F5200811AF200815CD
:100FF000F520F5200811AF208814F520F520881081
:10100000AF208814F520F5208810AF208814F52033
:10101000F5208810AF208814F520F5208810AF2027
:10102000A9200814F520F520081019288814F520A7
:10103000F5208810AF208814F520F5208810AF2007
:101040000815F520F5200811AF200815F520F5202A
:101050000811AF200815F520F5200811AF208814DD
:10106000F520F5208810AF200815F520F52008118F
:10107000AF200815F520F5200811AF200815F52040
:10108000F5200811AF200815F520F5200811AF2034
:101090000815F520F5200811AF200815F520F520DA
:1010A0000811AF200815F520F5200811AF2008150C
:1010B000F520F5200811AF200815F520F5200811BE
:1010C000AF200815F520F5200811AF200815F520F0
:1010D000F5200811AF200815F520F5200811AF20E4
:1010E0000815F520F5200811AF208814F520F5200B
:1010F0008810AF208814F520F5208810AF2008153F
:10110000F520F5200811AF200815F520F52008116D
:10111000AF200815F520F5200811AF208814F52020
:10112000F5208810AF208814F520F5208810AF2016
:101130008814F520F5208810AF208814F520F520BC
:101140008810AF20A9200814F520F52008101928D0
:1011500019286430A000F520A00BAB2808001E3031
:10116000A000F520A00BB12808008616A920AF200A
:10117000FF30A0008518BA28F5208518C228A00BDA
:10118000BC2893280617A920FF30A00006130613D9
:101190008518C828F5208518D028A00BCA28DC2877
:1011A0000617A920FF30A00006138518D528F520C2
:1011B0008518DD28A00BD72805290617A920FF30A0
:1011C000A00006138518E228F5208518EA28A00B50
:1011D000E42837290617A920FF30A0000613851838
:1011E000EF28F520A00BF1284829D93081000B11F8
:0611F0000B1DF8280800A9
:02400E00F13F80
:00000001FF

Compartilhar este post


Link para o post
Compartilhar em outros sites

Na minha versão do MPLAB, deu o mesmo erro de compilação do LEOPUENA.

Tenta adcionar o linker e marda compilar.

Compartilhar este post


Link para o post
Compartilhar em outros sites
Eu não adicionei e ele gerou o arquivo .hex normalmente.

Pois é, realmente foi esse ficheiro hex gerado aqui tambem.


:10000000831606309F0013308500003086003F3095
:100010008700890188018730810083128B01850167
:100020008701880186018901A101A201A301A40120
:10003000211406178612861305183F288518902864
:1000400007189E288718E52807190C2987193C29C5
:10005000871ABC28051A232A4B2905183F2885181A
:10006000902807189E288718E52807190C29871952
:100070003C29871ABC28051A232A9429192805180F
:100080003F284420861719280613F920F9208617DF
:1000900001300718632887186C28071975288719F5
:1000A0007E28071A87280617F920F92086170130BD
:1000B0000718632887186C280719752887197E2860
:1000C000071A8728442807186328F9202114A1104B
:1000D0002111A1112112080087186C28F920211084
:1000E000A1142111A1112112080007197528F92066
:1000F0002110A1102115A1112112080087197E28B5
:10010000F9202110A1102111A11521120800071AB0
:100110008728F9202110A1102111A1112116080012
:100120000613B928192821189E28A1189E282119DC
:10013000AA28A119AA28211ABC28192807189E281C
:10014000F920231CA428A728061423142E2A0610FD
:1001500023101928231CAD28B02806142314B32813
:1001600006102310B328A31CB628B9288614A3149C
:100170002E2A8610A3101928871ABC28F920A31E3E
:10018000C228CF280614B3208614B3200615B32046
:100190008615A3162314A3142315A3152E2A0610BF
:1001A000B3208610B3200611B3208611A3122310AA
:1001B000A3102311A31119282118E528A118AA2892
:1001C0002119F128A119BC2819288718E528F92038
:1001D000A31CEB28EE288614A3142E2A8610A31045
:1001E0001928231DF428F72806152315FC280611C5
:1001F0002311F920F920FC28A31DFF2802298615C8
:10020000A3152E2A8611A311192821180C29A1182B
:100210001829A119BC28192807190C29F920231D10
:1002200012291529061523152E2A0611231119281E
:10023000231C1B291E29061423142329061023100E
:10024000F920F9202329A31C262929298614A3147F
:100250002E298610A310F920F9202E29231D3129DB
:100260003429061523152E2A0611231119282118C1
:100270003C29A118BC28192887193C29F920A31D5D
:10028000422945298615A3152E2A8611A31119285E
:10029000A118BC28192821185629A118602921194C
:1002A0006E29A1197B29211A87292D288501890109
:1002B00007178713851588170000000000002D28F8
:1002C000850189010717871388130515851585167C
:1002D000091409150000000000002D28850189017E
:1002E000071787130515851588178516091500004A
:1002F000000000002D288501890107178713891444
:100300008515881709150000000000002D288501BB
:10031000890107178713051589148817851609158C
:100320000000000000002D2823080F39A5000F3021
:10033000250603190A2A003025060319D72901309A
:1003400025060319E529023025060319E52903309E
:1003500025060319EF29043025060319E529053080
:1003600025060319EF29063025060319EF29073062
:1003700025060319FD29083025060319E52909304A
:1003800025060319EF290A3025060319EF290B303A
:1003900025060319FD290C3025060319EF290D3018
:1003A00025060319FD290E3025060319FD298501AF
:1003B0008901071387178515881705158516891470
:1003C00009140000000000001928850189010713A5
:1003D000871785158817000000000000192885017F
:1003E00089010713871788130515851585160914C4
:1003F0000915000000000000192885018901071374
:100400008717051585158817851609150000000042
:10041000000019288501890107138717891485159C
:1004200088170915000000000000192885018901BE
:1004300007138717051589148817851609150000F5
:10044000000000001928051A232AA11E282A2B2A99
:10045000A11688161928A11288121928A11E192878
:1004600023080F39A500003025060319192801308B
:1004700025060319C42A0230250603191A2B043055
:1004800025060319752B083025060319732A033036
:1004900025060319D52B0530250603193A2C0930FA
:1004A00025060319A42C063025060319132D0A303E
:1004B00025060319872D0C3025060319002E073059
:1004C000250603197E2E0B3025060319012F0D304A
:1004D00025060319892F0E30250603191A280F3017
:1004E000250603191A2B8814F920F9208810B32047
:1004F0008814F920F9208810B3200815F920F92074
:100500000811B3200815F920F9200811B3200815A7
:10051000F920F9200811B3208814F920F920881057
:10052000B3208814F920F9208810B3208814F9200A
:10053000F9208810B3200815F920F9200811B320FC
:100540000815F920F9200811B3200815F920F92021
:100550000811B3208814F920F9208810B3208814DA
:10056000F920F9208810B3208814F920F920881088
:10057000B3208814F920F9208810B320AD20081486
:10058000F920F920081019288814F920F92088107A
:10059000B3208814F920F9208810B3200815F92019
:1005A000F9200811B3200815F920F9200811B3200B
:1005B0000815F920F9200811B3208814F920F92032
:1005C0008810B3200815F920F9200811B3208814E9
:1005D000F920F9208810B3208814F920F920881018
:1005E000B3200815F920F9200811B3200815F920C7
:1005F000F9200811B3200815F920F9200811B320BB
:100600008814F920F9208810B3208814F920F920E3
:100610008810B3208814F920F9208810B32088149A
:10062000F920F9208810B320AD200814F920F92012
:10063000081019288814F920F9208810B32088148C
:10064000F920F9208810B3200815F920F9200811A5
:10065000B3200815F920F9200811B3200815F92056
:10066000F9200811B3208814F920F9208810B3204C
:100670000815F920F9200811B3200815F920F920F0
:100680000811B3208814F920F9208810B3208814A9
:10069000F920F9208810B3200815F920F920081155
:1006A000B3200815F920F9200811B3200815F92006
:1006B000F9200811B3208814F920F9208810B320FC
:1006C0008814F920F9208810B3208814F920F92023
:1006D0008810B3208814F920F9208810B320AD20A9
:1006E0000814F920F920081019288814F920F92095
:1006F0008810B3208814F920F9208810B320081539
:10070000F920F9200811B3200815F920F920081163
:10071000B3200815F920F9200811B3208814F92016
:10072000F9208810B3200815F920F9200811B3200A
:100730000815F920F9200811B3200815F920F9202F
:100740000811B3208814F920F9208810B3208814E8
:10075000F920F9208810B3200815F920F920081194
:10076000B3200815F920F9200811B3200815F92045
:10077000F9200811B3208814F920F9208810B3203B
:100780008814F920F9208810B3208814F920F92062
:100790008810B3208814F920F9208810B320AD20E8
:1007A0000814F920F920081019288814F920F920D4
:1007B0008810B3208814F920F9208810B320081578
:1007C000F920F9200811B3200815F920F9200811A3
:1007D000B3200815F920F9200811B3208814F92056
:1007E000F9208810B3200815F920F9200811B3204A
:1007F0000815F920F9200811B3200815F920F9206F
:100800000811B3200815F920F9200811B320881425
:10081000F920F9208810B3208814F920F9208810D5
:10082000B3200815F920F9200811B3200815F92084
:10083000F9200811B3200815F920F9200811B32078
:100840008814F920F9208810B3208814F920F920A1
:100850008810B3208814F920F9208810B320881458
:10086000F920F9208810B320AD200814F920F920D0
:10087000081019288814F920F9208810B32088144A
:10088000F920F9208810B3200815F920F920081163
:10089000B3200815F920F9200811B3200815F92014
:1008A000F9200811B3208814F920F9208810B3200A
:1008B0000815F920F9200811B3200815F920F920AE
:1008C0000811B3200815F920F9200811B3200815E4
:1008D000F920F9200811B3200815F920F920081192
:1008E000B3208814F920F9208810B3208814F92047
:1008F000F9208810B3200815F920F9200811B32039
:100900000815F920F9200811B3200815F920F9205D
:100910000811B3208814F920F9208810B320881416
:10092000F920F9208810B3208814F920F9208810C4
:10093000B3208814F920F9208810B320AD200814C2
:10094000F920F920081019288814F920F9208810B6
:10095000B3208814F920F9208810B3200815F92055
:10096000F9200811B3200815F920F9200811B32047
:100970000815F920F9200811B3208814F920F9206E
:100980008810B3200815F920F9200811B3200815A4
:10099000F920F9200811B3200815F920F9200811D1
:1009A000B3200815F920F9200811B3200815F92003
:1009B000F9200811B3200815F920F9200811B320F7
:1009C0008814F920F9208810B3208814F920F92020
:1009D0008810B3200815F920F9200811B320081554
:1009E000F920F9200811B3200815F920F920081181
:1009F000B3208814F920F9208810B3208814F92036
:100A0000F9208810B3208814F920F9208810B32029
:100A10008814F920F9208810B320AD200814F9209B
:100A2000F920081019288814F920F9208810B3201B
:100A30008814F920F9208810B3200815F920F9202E
:100A40000811B3200815F920F9200811B320081562
:100A5000F920F9200811B3208814F920F920881012
:100A6000B3200815F920F9200811B3200815F92042
:100A7000F9200811B3200815F920F9200811B32036
:100A80000815F920F9200811B3200815F920F920DC
:100A90000811B3200815F920F9200811B320081512
:100AA000F920F9200811B3208814F920F9208810C2
:100AB000B3208814F920F9208810B3200815F920F4
:100AC000F9200811B3200815F920F9200811B320E6
:100AD0000815F920F9200811B3208814F920F9200D
:100AE0008810B3208814F920F9208810B3208814C6
:100AF000F920F9208810B3208814F920F9208810F3
:100B0000B320AD200814F920F92008101928881402
:100B1000F920F9208810B3208814F920F9208810D2
:100B2000B3200815F920F9200811B3200815F92081
:100B3000F9200811B3200815F920F9200811B32075
:100B40008814F920F9208810B3200815F920F9201D
:100B50000811B3200815F920F9200811B320081551
:100B6000F920F9200811B3200815F920F9200811FF
:100B7000B3200815F920F9200811B3200815F92031
:100B8000F9200811B3200815F920F9200811B32025
:100B90000815F920F9200811B3208814F920F9204C
:100BA0008810B3208814F920F9208810B320081584
:100BB000F920F9200811B3200815F920F9200811AF
:100BC000B3200815F920F9200811B3208814F92062
:100BD000F9208810B3208814F920F9208810B32058
:100BE0008814F920F9208810B3208814F920F920FE
:100BF0008810B320AD200814F920F9200810192816
:100C00008814F920F9208810B3208814F920F920DD
:100C10008810B3200815F920F9200811B320081511
:100C2000F920F9200811B3200815F920F92008113E
:100C3000B3208814F920F9208810B3200815F92072
:100C4000F9200811B3200815F920F9200811B32064
:100C50000815F920F9200811B3200815F920F9200A
:100C60000811B3200815F920F9200811B320081540
:100C7000F920F9200811B3200815F920F9200811EE
:100C8000B3200815F920F9200811B3200815F92020
:100C9000F9200811B3208814F920F9208810B32016
:100CA0008814F920F9208810B3200815F920F920BC
:100CB0000811B3200815F920F9200811B3200815F0
:100CC000F920F9200811B3208814F920F9208810A0
:100CD000B3208814F920F9208810B3208814F92053
:100CE000F9208810B3208814F920F9208810B32047
:100CF000AD200814F920F920081019288814F920CB
:100D0000F9208810B3208814F920F9208810B32026
:100D10000815F920F9200811B3200815F920F92049
:100D20000811B3200815F920F9200811B320881400
:100D3000F920F9208810B3200815F920F9200811AE
:100D4000B3200815F920F9200811B3200815F9205F
:100D5000F9200811B3200815F920F9200811B32053
:100D60000815F920F9200811B3200815F920F920F9
:100D70000811B3200815F920F9200811B32008152F
:100D8000F920F9200811B3200815F920F9200811DD
:100D9000B3200815F920F9200811B3208814F92090
:100DA000F9208810B3208814F920F9208810B32086
:100DB0000815F920F9200811B3200815F920F920A9
:100DC0000811B3200815F920F9200811B320881460
:100DD000F920F9208810B3208814F920F920881010
:100DE000B3208814F920F9208810B3208814F92042
:100DF000F9208810B320AD200814F920F92008103C
:100E000019288814F920F9208810B3208814F920B3
:100E1000F9208810B3200815F920F9200811B32013
:100E20000815F920F9200811B3200815F920F92038
:100E30000811B3208814F920F9208810B320081570
:100E4000F920F9200811B3200815F920F92008111C
:100E5000B3200815F920F9200811B3200815F9204E
:100E6000F9200811B3200815F920F9200811B32042
:100E70000815F920F9200811B3200815F920F920E8
:100E80000811B3200815F920F9200811B32008151E
:100E9000F920F9200811B3200815F920F9200811CC
:100EA000B3200815F920F9200811B3208814F9207F
:100EB000F9208810B3208814F920F9208810B32075
:100EC0000815F920F9200811B3200815F920F92098
:100ED0000811B3200815F920F9200811B32088144F
:100EE000F920F9208810B3208814F920F9208810FF
:100EF000B3208814F920F9208810B3208814F92031
:100F0000F9208810B320AD200814F920F92008102A
:100F100019288814F920F9208810B3208814F920A2
:100F2000F9208810B3200815F920F9200811B32002
:100F30000815F920F9200811B3200815F920F92027
:100F40000811B3208814F920F9208810B32008155F
:100F5000F920F9200811B3200815F920F92008110B
:100F6000B3200815F920F9200811B3200815F9203D
:100F7000F9200811B3200815F920F9200811B32031
:100F80000815F920F9200811B3200815F920F920D7
:100F90000811B3200815F920F9200811B32008150D
:100FA000F920F9200811B3200815F920F9200811BB
:100FB000B3200815F920F9200811B3200815F920ED
:100FC000F9200811B3208814F920F9208810B320E3
:100FD0008814F920F9208810B3200815F920F92089
:100FE0000811B3200815F920F9200811B3200815BD
:080FF000F920F9200811B320DB
:040FF800003400348D
:101000008814F920F9208810B3208814F920F920D9
:101010008810B3208814F920F9208810B320881490
:10102000F920F9208810B320AD200814F920F92008
:10103000081019288814F920F9208810B320881482
:10104000F920F9208810B3200815F920F92008119B
:10105000B3200815F920F9200811B3200815F9204C
:10106000F9200811B3208814F920F9208810B32042
:101070000815F920F9200811B3200815F920F920E6
:101080000811B3200815F920F9200811B32008151C
:10109000F920F9200811B3200815F920F9200811CA
:1010A000B3200815F920F9200811B3200815F920FC
:1010B000F9200811B3200815F920F9200811B320F0
:1010C0000815F920F9200811B3200815F920F92096
:1010D0000811B3200815F920F9200811B3200815CC
:1010E000F920F9200811B3200815F920F92008117A
:1010F000B3208814F920F9208810B3208814F9202F
:10110000F9208810B3200815F920F9200811B32020
:101110000815F920F9200811B3200815F920F92045
:101120000811B3208814F920F9208810B3208814FE
:10113000F920F9208810B3208814F920F9208810AC
:10114000B3208814F920F9208810B320AD200814AA
:10115000F920F9200810192819286430A000F92076
:10116000A00BAF2808001E30A000F920A00BB52866
:1011700008008616AD20B320FF30A0008518BE28D9
:10118000F9208518C628A00BC02893280617AD2083
:10119000FF30A000061306138518CC28F920851807
:1011A000D428A00BCE28DC280617AD20FF30A000E5
:1011B00006138518D928F9208518E128A00BDB280B
:1011C00005290617AD20FF30A00006138518E62874
:1011D000F9208518EE28A00BE82837290617AD203E
:1011E000FF30A00006138518F328F920A00BF5287E
:0E11F0004829D93081000B110B1DFC28080086
:02400E00F13F80
:00000001FF
:020000040000FA

Compartilhar este post


Link para o post
Compartilhar em outros sites

Segundo o manual,a memória de programa é consecutiva,não precisando mudar os bancos,ja a de dados...

No primeiro programa,ele inicia no endereço zero (reset) e subscreve o endereço de vetores de interrupçãp (0004h),não sei se isso devia causar erro tambem...

Compartilhar este post


Link para o post
Compartilhar em outros sites
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  





Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas publicações sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×