LIST P=16F877 RADIX HEX

INCLUDE <P16F877.INC> INCLUDE <MATH16.INC>

DECENA UNIDAD DECIMA

EQU 0x6A EQU 0x6B EQU 0x6C

CENTESIMA EQU 0x6D

ORG 0x00 goto INICIO

ORG 0x04 bcf INTCON,GIE

btfsc goto btfsc goto

INTCON,RBIF TECLA INTCON,T0IF TIMER_0

ORG 0x20

INICIO call call call INI_PORTS INI_I2C Start_cond

call SendWrtAddr call clrf bsf call call BANCO_0 SCREEN SCREEN.0 CLS BANCO_0 movlw 0x4A movwf COMANDO call call SEND_C BANCO_0 movlw 0x43 movwf COMANDO call call SEND_C BANCO_0 movlw 0x51 movwf COMANDO call call SEND_C BANCO_0 movlw 0x53 movwf COMANDO call call SEND_C BANCO_0 movlw 0x46 movwf COMANDO call SEND_C movlw 0xFF .

0 BUC_P PIR1.0 POS_CUR call call call call DEFAULT_PA CALC_K1 CALC_K2 CONF_INT .0 decfsz PAUSA goto BUC_P movlw 0x03 .-------------------------Call clrf clrf bcf BANCO_0 TMR1H TMR1L PIR1.call BANCO_0 movwf KEY_P clrf bsf clrf FILA FILA.0 movlw b'00110001' movwf T1CON movlw 0x03 movwf PAUSA BUC_P call BANCO_0 btfss goto bcf PIR1.

GIE SCREEN. ---------------------------------------call TRANS_SP_A movlw 0x83 movwf BEXP movlw 0x20 movwf BARGB0 clrf call call call call BARGB1 FPM24 DISP_5 FLOAT_ASCII TRANS_IN_A movlw 0x83 movwf BEXP movlw 0x20 movwf BARGB0 clrf call call call BARGB1 FPM24 DISP_6 FLOAT_ASCII .0 SKIP_UNO .movwf PAUSA bcf btfss goto INTCON.-------------------------SKIP_UNO call call ANALOG_IN CONV_PF .

0 btfsc clrf call call bcf STATUS.Z movlw 0xFF andwf AEXP.Z AARGB0 TRANS_AE_B FPS24 STATUS.0 btfsc clrf STATUS.Z movlw 0xFF andwf AEXP.call call call call call call call call call call call bcf TRANS_A_IN TRANS_A_B TRANS_SP_A FPS24 TRANS_A_D TRANS_K1_B FPM24 TRANS_A_GN TRANS_C_A TRANS_BE_B FPS24 STATUS.Z AARGB0 movlw 0x80 movwf BEXP movlw 0x40 movwf BARGB0 .

Z movlw 0xFF andwf AEXP.Z movlw 0x20 .Z FPM24 TRANS_D_B FPA24 TRANS_K2_B FPM24 TRANS_GN_B TRANS_SP_B FPA24 call btfsc goto bsf bcf BANCO_0 AARGB0.7 CARGA_0 STATUS.C SI_SUP STATUS.0 btfss call call call call call call call call STATUS.Z NO_SUP STATUS.clrf bcf BARGB1 STATUS.0 btfsc goto btfss goto bcf STATUS.C STATUS.Z movlw 0x81 subwf AEXP.

C SI_SUP STATUS.0 btfss goto btfss goto bcf STATUS.subwf AARGB0.Z NO_SUP STATUS.Z NO_SUP AARGB0 AARGB1 .0 btfss goto btfss goto SI_SUP movlw 0x81 movwf Y_EXP movwf AEXP movlw 0x20 movwf Y_B0 movwf AARGB0 movlw 0x00 movwf Y_B1 movwf AARGB1 goto CARGA_0 clrf clrf NO_SUP call TRANS_A_Y LAB_1 clrf AEXP STATUS.Z movlw 0x00 subwf AARGB1.C SI_SUP STATUS.

0 movwf PORTD call call call bsf goto CONF_INT call bcf bcf bcf bsf bsf clrf bsf bsf bsf BANCO_1 OPTION_REG.PS1 OPTION_REG.T0IE INTCON.PS2 OPTION_REG.RBIE INTCON.PS0 INTCON INTCON.LAB_1 movlw 0x84 movwf BEXP movlw 0x4C movwf BARGB0 clrf call call BARGB1 FPM24 INT2416 movf AARGB1.PSA OPTION_REG.GIE TRANS_BE_AE TRANS_CE_BE TRANS_DE_CE INTCON.GIE BUC_P RETURN .T0CS OPTION_REG.

INI_PORTS call clrf clrf clrf clrf bsf bcf bcf bcf bcf call BANCO_0 PORTA PORTB PORTC PORTD ADCON0.NOT_RBPU movlw b'11110000' movwf TRISB movlw b'00011000' movwf TRISC clrf INTCON RETURN .CHS1 ADCON0.CHS0 BANCO_1 movlw b'10001110' movwf ADCON1 movwf TRISA clrf call bsf call bsf TRISD BANCO_0 ADCON0.ADCS0 ADCON0.ADON BANCO_1 OPTION_REG.ADCS1 ADCON0.CHS2 ADCON0.

RP0 STATUS.RP0 STATUS.RP0 STATUS.RP1 CALC_K1 call call call call call call call call TRANS_KP_A TRANS_TN_B FPM24 TRANS_T_B FPM24 TRANS_KP_B FPA24 TRANS_A_K1 RETURN CALC_K2 .RP1 BANCO_2 bsf return bcf STATUS.RP1 BANCO_3 bsf return bsf STATUS.RP0 STATUS.RP1 BANCO_1 bcf return bsf STATUS.BANCO_0 bcf return bcf STATUS.

call call call call TRANS_KP_A TRANS_TV_B FPM24 BANCO_0 movlw 0x81 movwf BEXP movlw 0x40 clrf call call call call BARGB1 FPD24 TRANS_T_B FPD24 TRANS_A_K2 RETURN ANALOG_IN call bsf BANCO_0 ADCON0.GO_DONE BUC_AN RETURN CONV_PF call BANCO_0 movf ADRESH.GO_DONE BUC_AN btfsc goto ADCON0.0 movwf AARGB0 call BANCO_1 .

0 call BANCO_0 movwf AARGB1 call call FLO24 BANCO_0 movlw 0x77 movwf BEXP movlw 0x20 movwf BARGB0 movlw 0x28 movwf BARGB1 call FPM24 RETURN FLOAT_ASCII call BANCO_0 movlw 0x85 movlw 0x48 movwf BARGB0 clrf call call clrf clrf movlw movwf .movf ADRESL.---------------call FXD1616U BARGB1 FPM24 INT24 BARGB0 BEXP 0x0A BARGB1 .

---------------call FXD1616U movf REMB1.0 movwf LETRA .0 movwf LETRA call call WrtData BANCO_0 movf UNIDAD.1 call FXD1616U movf REMB1.1 .W movwf DECIMA movlw 0x30 addwf DECIMA.W movwf CENTESIMA movlw 0x30 addwf CENTESIMA.W movwf DECENA movlw 0x30 addwf DECENA.movf REMB1.W movwf UNIDAD movlw 0x30 addwf UNIDAD.1 .1 movf DECENA.---------------call FXD1616U movf REMB1.

0 movwf LETRA call call WrtData BANCO_0 movf CENTESIMA.0 movwf LETRA call WrtData RETURN .A16> INCLUDE <TECLADO.call call WrtData BANCO_0 movlw 0x2E movwf LETRA call WrtData call BANCO_0 movf DECIMA. Librerias usadas INCLUDE <TRANSF.ASM> INCLUDE <FP24.ASM> INCLUDE <I2C.ASM> INCLUDE <FXD66.A16> END .

Sign up to vote on this title
UsefulNot useful