list include ;**************** ORG #DEFINE #DEFINE #DEFINE #DEFINE #DEFINE D1 D2 D3 COUNT1 COUNT2 pallo CLRF CLRF PORTA PORTB

p=pic16f84a p16f84a.inc Label Definition ********************

0x00 E PORTA,0 RS PORTA,1 START PORTA,2 STOP PORTA,3 RESET PORTA,4 EQU EQU EQU EQU EQU 0X12 0X13 0X14 0X15 0X16

BSF STATUS,RP0 CLRF TRISB MOVLW 0X1C MOVWF TRISA BCF STATUS,RP0 MOVLW MOVWF MOVWF MOVWF MOVWF MOVWF CALL CALL CALL CALL MOVF CALL BSF MOVWF CALL CALL INCF XORLW BTFSC GOTO INCF GOTO 0X01 0X0D 0X0E 0X30 0X31 0X32 DELAY_0.01S FUNCSET DIS_ON ADDRS_START 0F,W TEXT RS PORTB PULSE_E Delay_125ms 0F,W D'8' 03,02 $+03 0F,F $-0B

TIME1 CALL CLRF MOVF CALL BSF MOVWF CALL CALL INCF XORLW BTFSC GOTO INCF GOTO SW BTFSC START GOTO SW ADDRS_TIME 0X0F 0F,W TIMER RS PORTB PULSE_E Delay_125ms 0F,W D'10' 03,02 SW 0F,F $-0B

MMSEC1 CALL CLRF MOVF CALL BSF MOVWF CALL CALL INCF XORLW BTFSC GOTO INCF GOTO MMSEC ULE CALL

ADDRS_START 0X0F 0F,W RUN RS PORTB PULSE_E Delay_125ms 0F,W D'8' 03,02 MMSEC 0F,F $-0B ADDRS_MMSEC

BTFSS STOP GOTO STOP1 MOVF CALL BSF MOVWF CALL CALL 0D,W NO

RS PORTB PULSE_E DELAY_0.01S

CALL DIS_CURSOR_SHIFT_LEFT INCF 0D,W XORLW D'10'

BTFSC 03,02 GOTO MSEC INCF 0D,F BTFSS STOP GOTO STOP1 GOTO ULE MSEC CALL MOVF CALL BSF MOVWF CALL CALL CALL CLRF MOVF CALL BSF MOVWF CALL INCF INCF XORLW BTFSC GOTO INCF GOTO ADDRS_MSEC 0E,W NO RS PORTB PULSE_E Delay_125ms ADDRS_MMSEC 0D 0D,W NO RS PORTB PULSE_E 0D,F 0E,W D'11' 03,02 SEC 0E,F MMSEC

ADDRS_MMSEC BCF RS CALL Delay_125ms MOVLW 0xCA MOVWF PORTB CALL PULSE_E CALL Delay_125ms RETURN SEC CALL MOVF CALL BSF MOVWF CALL CALL CALL CLRF MOVF CALL BSF MOVWF CALL ADDRS_SEC 30,W NO RS PORTB PULSE_E Delay_125ms ADDRS_MSEC 0E 0E,W NO RS PORTB PULSE_E

INCF CALL CLRF MOVF CALL BSF MOVWF CALL INCF INCF XORLW BTFSC GOTO INCF GOTO NEXT_SEC CALL MOVF CALL BSF MOVWF CALL CALL CALL CLRF MOVF CALL BSF MOVWF CALL INCF CALL CLRF MOVF CALL BSF MOVWF CALL INCF CALL CLRF MOVF CALL BSF MOVWF CALL INCF

0E,F ADDRS_MMSEC 0D 0D,W NO RS PORTB PULSE_E 0D,F 30,W D'7' 03,02 NEXT_SEC 30,F MMSEC

ADDRS_NEXTSEC 31,W NO RS PORTB PULSE_E Delay_125ms ADDRS_SEC 30 30,W NO RS PORTB PULSE_E 30,F ADDRS_MSEC 0E 0E,W NO RS PORTB PULSE_E 0E,F ADDRS_MMSEC 0D 0D,W NO RS PORTB PULSE_E 0D,F

INCF 31,W XORLW D'11' BTFSC 03,02

GOTO INCF GOTO STOP1 STOPT

$+3 31,F MMSEC

CALL CLRF MOVF CALL BSF MOVWF CALL CALL INCF XORLW BTFSC GOTO INCF GOTO

ADDRS_START 0X0F 0F,W TEXT_STOP1 RS PORTB PULSE_E Delay_125ms 0F,W D'8' 03,02 BENTI 0F,F STOPT

BENTI BTFSS RESET GOTO pallo BTFSS START GOTO MMSEC1 GOTO BENTI PULSE_E Call BSF Call BCF CALL RETLW NO MOVWF RETLW RETLW RETLW RETLW RETLW RETLW RETLW RETLW RETLW RETLW MOVWF RETLW RETLW RETLW RETLW

Delay_125ms E Delay_125ms E Delay_125ms 0 PCL '0' '1' '2' '3' '4' '5' '6' '7' '8' '9' PCL 'S' 'T' 'A' 'R'

TEXT

RETLW RETLW RETLW RETLW RUN MOVWF RETLW RETLW RETLW RETLW RETLW RETLW RETLW RETLW MOVWF RETLW RETLW RETLW RETLW RETLW RETLW RETLW RETLW RETLW RETLW TEXT_STOP1 MOVWF RETLW RETLW RETLW RETLW RETLW RETLW RETLW RETLW

'T' 0X20 0X20 0X20 PCL 'R' 'U' 'N' 'N' 'I' 'N' 'G' '!' PCL '0' '0' ':' '0' '0' ':' '0' '0' '.' '0' PCL 'S' 'T' 'O' 'P' '!' '!' 0X20 0X20

TIMER

FUNCSET BCF RS CALL Delay_125ms MOVLW 0x38 MOVWF PORTB CALL PULSE_E CALL Delay_125ms RETURN DIS_ON BCF RS CALL Delay_125ms MOVLW 0x0C MOVWF PORTB CALL PULSE_E CALL Delay_125ms RETURN

ENTRY_MODE BCF RS CALL Delay_125ms MOVLW 0x06 MOVWF PORTB CALL PULSE_E CALL Delay_125ms RETURN ADDRS_MSEC BCF RS CALL Delay_125ms MOVLW 0xC8 MOVWF PORTB CALL PULSE_E CALL Delay_125ms RETURN ADDRS_SEC BCF RS CALL Delay_125ms MOVLW 0xC7 MOVWF PORTB CALL PULSE_E CALL Delay_125ms RETURN ADDRS_NEXTSEC BCF RS CALL Delay_125ms MOVLW 0xC5 MOVWF PORTB CALL PULSE_E CALL Delay_125ms RETURN ADDRS_START BCF RS CALL Delay_125ms MOVLW 0x85 MOVWF PORTB CALL PULSE_E CALL Delay_125ms RETURN ADDRS_TIME BCF RS CALL Delay_125ms MOVLW 0xC1 MOVWF PORTB CALL PULSE_E CALL Delay_125ms RETURN DIS_CURSOR_SHIFT_LEFT BCF RS CALL Delay_125ms

MOVLW 0x10 MOVWF PORTB CALL PULSE_E CALL Delay_125ms RETURN ;------Delay-delay-----DELAY_0.1S MOVLW D'50' MOVWF D3 MOVLW D'13' MOVWF D2 MOVLW D'50' MOVWF D1 DECFSZ D1 GOTO $-1 DECFSZ D2 GOTO $-5 DECFSZ D3 GOTO $-9 RETURN DELAY_0.01S MOVLW D'50' MOVWF D3 MOVLW D'14' MOVWF D2 MOVLW D'50' MOVWF D1 DECFSZ D1 GOTO $-1 DECFSZ D2 GOTO $-5 DECFSZ D3 GOTO $-9 RETURN Delay_125ms MOVLW D'42' ;Repeat 42 cycle MOVWF COUNT1 DECFSZ COUNT1 GOTO $-1 RETURN ;-------ABIH DOH LA---END

Sign up to vote on this title
UsefulNot useful