Guest User

Untitled

a guest
Apr 13th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MPASM 0.58 KB | None | 0 0
  1.             list        p=16F877A, r=dec, w=-302
  2.             include     <P16F877A.INC>
  3.             __config    b'11111100110011'
  4.  
  5.             cblock      0x70
  6.                     COUNTS
  7.                     COUNTSFIN
  8.             endc
  9.    
  10.             org     0x000
  11.  
  12. INIT            clrf        PORTA       ;init ports
  13.             clrf        PORTB
  14.             clrf        PORTC
  15.             clrf        PORTD
  16.             clrf        PORTE
  17.             banksel     ADCON1
  18.             movlw       6
  19.             movwf       ADCON1
  20.             clrf        TRISA
  21.             clrf        TRISB
  22.             clrf        TRISC
  23.             clrf        TRISD
  24.             clrf        TRISE
  25.             banksel     0
  26.            
  27.  
  28. MAIN            movlw       b'00000001'
  29.             xorwf       PORTA,F
  30.             movlw       0x50
  31.             call        DELAY
  32.             goto        $-4
  33.  
  34. DELAY           movwf       COUNTS
  35.             decfsz      COUNTS,F
  36.             goto        $-1
  37.             return
  38.  
  39.             end
Add Comment
Please, Sign In to add comment