Académique Documents
Professionnel Documents
Culture Documents
; *
; GROUPE : 2 A 4 *
; POSTE : (1 à 8) : 6 *
; DATE DE REMISE DU RAPPORT : 21/11/2022
*
; *
;**********************************************************************
; *
; Auteur : *
; Titre : *
; Date : *
; *
;**********************************************************************
; *
; Hardware (quoi est câblé où ?) *
; *
; *
; *
; *
;**********************************************************************
;*********************************************************************
; ASSIGNATIONS *
;*********************************************************************
;*********************************************************************
; DEFINE *
;*********************************************************************
;Exemple :
;#DEFINE LED1 PORTB,1
#DEFINE SENS PORTA,4 ; define "sens" comme RP04 de PortA
#DEFINE LED PORTB ; define "LED" comme le PortB
;*********************************************************************
; MACRO *
;*********************************************************************
BANQUE1 macro
bsf STATUS,RP0 ; sélectionner BANQUE 1
endm
BANQUE0 macro
bcf STATUS,RP0 ; sélectionner BANQUE 0
endm
;*********************************************************************
; DECLARATIONS DE VARIABLES *
;*********************************************************************
;*********************************************************************
; DECLARATIONS DE LA ZONE EEPROM *
;*********************************************************************
;**********************************************************************
; DEMARRAGE SUR RESET *
;**********************************************************************
;*********************************************************************
; INITIALISATIONS *
;*********************************************************************
init
;*********************************************************************
; PROGRAMME PRINCIPAL *
;*********************************************************************
start
boucle
Movlw d'61' ; set le timer0 à 195 µs (256-61)
Movwf TMR0 ; set le timer0 à 195 µs (256-61)
Pulling
BTFSS INTCON,T0IF ; polling pour le flag de TMR0 (T0IF)
goto Pulling ; renvois à "pulling"
BCF INTCON,T0IF ; réinitialise le flag
DECFSZ Cpt ; décrémente et teste Cpt
goto boucle ; renvois à boucle si Cpt est différent de 0