SHARE
TWEET

Untitled

a guest Dec 10th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #INCLUDE "P16F877A.INC"
  2.     CounterTable EQU 0X0F
  3.     CounterTable2 EQU 0X10
  4.     DCounter1 EQU 0X0C
  5.     DCounter2 EQU 0X0D
  6.     DCounter3 EQU 0X0E
  7.     DCounter4 EQU 0X11
  8.     ORG 0
  9.     GOTO START
  10.  
  11.     ORG 4
  12.     BCF INTCON,0
  13.     RLF PORTD,1
  14.     Call Delay
  15.     RETFIE
  16.  
  17.  
  18. Table: 
  19.     addWF   PCL,F
  20.     retLW   b'00010000' ;- 0        ;Десятичные цифры
  21.     retLW   b'01011011' ;- 1   
  22.     retLW   b'00001100' ;- 2   
  23.     retLW   b'00001001' ;- 3
  24.     retLW   b'01000011' ;- 4
  25.     retLW   b'00100001' ;- 5
  26.     retLW   b'00100000' ;- 6
  27.     retLW   b'00011011' ;- 7
  28.     retLW   b'00000000' ;- 8
  29.     retLW   b'00000001' ;- 9
  30.     retLW   b'01111111' ;- заготовка
  31.    
  32. START
  33.     CLRF CounterTable
  34.     CLRF CounterTable2
  35.     BSF STATUS,RP0
  36.     CLRF TRISC
  37.     BCF STATUS,RP0
  38.     MOVLW b'01111111'
  39.     MOVWF PORTC
  40.     MOVLW b'11111111'
  41.     MOVWF PORTC
  42.     MOVLW b'10100000'
  43.     MOVWF INTCON
  44. START_PROG:
  45.     GOTO START_PROG
  46. Delay:
  47.     CLRWDT
  48.     MOVLW 0xff
  49.     MOVWF DCounter1
  50.     MOVLW 0xff
  51.     MOVWF DCounter2
  52.     MOVLW 0xff
  53.     MOVWF DCounter3
  54.     MOVLW 0x02
  55.     MOVWF DCounter4
  56. LOOP:
  57.     DECFSZ DCounter1, 1
  58.     GOTO LOOP
  59.     GOTO Delay1
  60. Delay1:
  61.     MOVLW 0xff
  62.     MOVWF DCounter1
  63.     DECFSZ DCounter2, 1
  64.     GOTO LOOP
  65.     GOTO Delay2
  66. Delay2:
  67.     MOVLW 0xff
  68.     MOVWF DCounter1
  69.     MOVLW 0xff
  70.     MOVWF DCounter2
  71.     DECFSZ DCounter3, 1
  72.     GOTO LOOP
  73.     GOTO Delay3
  74. Delay3:
  75.     MOVLW 0xff
  76.     MOVWF DCounter1
  77.     MOVLW 0xff
  78.     MOVWF DCounter2
  79.     MOVLW 0xff
  80.     MOVWF DCounter3
  81.     DECFSZ DCounter4, 1
  82.     GOTO LOOP
  83.     Return
  84.     END
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top