Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;* Projet : Labo XXX *
- ;************************************************************************
- ;* Nom de fichier: Labo XXX *
- ;* Date: XX-XX-XXXX *
- ;* *
- ;* Auteur: YY *
- ;* Haute Ecole Louvain en Hainaut *
- ;************************************************************************
- ;* Fichiers nécessaires: aucun *
- ;************************************************************************
- ;* Notes: *
- ;************************************************************************
- list p=16F887, f=INHX8M ; directive pour definir le processeur
- list c=90, n=60 ; directives pour le listing
- #include <p16F887.inc> ; incorporation variables spécifiques
- errorlevel -302 ; pas d'avertissements de bank
- errorlevel -305 ; pas d'avertissements de fdest
- __CONFIG _CONFIG1, _LVP_OFF & _WDT_OFF & _INTOSCIO
- __CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF
- ;*************************************************************************
- ;* Définitions et Variables *
- ;*************************************************************************
- cblock 0x020
- tempo2,RESULTHI,VAR,tempo1, tempo3
- endc
- ;*************************************************************************
- ;* Programme principal *
- ;*************************************************************************
- ORG 0x000 ; vecteur reset
- START
- CLRF STATUS ; INIT
- BSF STATUS,5 ; BANK 1
- CLRF TRISA ; PORTA en output
- CLRF TRISC ; PORTC en 0
- COMF TRISC ; PORTC en input
- BSF STATUS,6 ; BANK 3
- CLRF ANSEL ; SIGNAL DIGITAL
- CLRF STATUS ; BANK 0
- CLRF PORTA ; INIT LES LEDS
- MOVLW b'00000001'
- MOVWF PORTA
- MAINLOOP
- RLF PORTA
- TEMPO2
- BTFSS PORTA,7
- goto LOOP2
- goto MAINLOOP
- LOOP2
- RRF PORTA
- TEMPO2
- BTFSS PORTA,0
- goto MAINLOOP
- goto LOOP2
- TEMPO2
- MOVLW .10
- MOVWF tempo3
- CALL TEMPO
- DECFSZ tempo3,f
- GOTO $-2
- RETURN
- TEMPO
- movlw .250
- movwf tempo2
- movlw .250
- movwf tempo1
- decfsz tempo1,f
- goto $-1
- decfsz tempo2,f
- goto $-5
- RETURN
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement