Advertisement
Guest User

Untitled

a guest
Aug 11th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pic 16 0.66 KB | None | 0 0
  1. LIST p=16F887
  2. #include <p16F887.inc>
  3.     __CONFIG    _CONFIG1, _LVP_OFF & _FCMEN_OFF & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT
  4.     __CONFIG    _CONFIG2, _WRT_OFF & _BOR21V
  5.  
  6. cblock 0x20
  7. Display
  8. Delay1
  9. Delay2
  10.      endc
  11.  
  12.  
  13.      org 0
  14. Start:
  15.      bsf     STATUS,RP0
  16.      clrf     TRISD
  17.      bcf STATUS,RP0
  18.      movlw 1
  19.      movwf Display
  20.  
  21. OloloLoop:
  22.      movf Display,W
  23.      movwf PORTD
  24.  
  25. OloloDelay:
  26.      decfsz Delay1,f
  27.      goto OloloDelay
  28.      decfsz Delay2,f
  29.      goto OloloDelay
  30.  
  31.      bcf STATUS,C
  32.      rlf Display,f
  33.      btfsc STATUS,C
  34.      bsf Display,0
  35.  
  36.      goto OloloLoop
  37.  
  38.      end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement