Académique Documents
Professionnel Documents
Culture Documents
; *
; GROUPE : 2A4 *
; POSTE : (1 à 8) : 6 *
; DATE DE REMISE DU RAPPORT : 14/11/2022 *
; *
;**********************************************************************
; *
; Auteur : Copine Anthoine *
; Titre : *
; Date : 14/11/2022 *
; *
;**********************************************************************
; *
; Hardware (quoi est câblé où ?) *
; *
; *
; *
; *
;**********************************************************************
;*********************************************************************
; ASSIGNATIONS *
;*********************************************************************
;*********************************************************************
; DEFINE *
;*********************************************************************
;Exemple :
;#DEFINE LED1 PORTB,1
;*********************************************************************
; 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
movlw d'1' ; On met 1 dans W
xorwf PORTA,f ; On inverse Les bits de PORTA
call tempo1
tempo1
movlw d'250' ; On met 250 dans W
movwf cpt ; On set Cpt à 250
Timer
movlw d'6' ; On met 6 dans W
movwf TMR0 ; On set TMR0 à 250
test
btfss INTCON,T0IF ; Test si T0IF (flag TMR0 = 1) est = a
1 (si 1 ==> skip)
goto test ; On fait du polling pour voir si le
flag T0IF est actif
tempo2
movlw d'250' ; On met 250 dans W
movwf cpt2 ; On set cpt2 à 250
boucle2
movlw d'250' ; On met 250 dans W
movwf cpt1 ; On set cpt1 à 250
boucle1
nop ;1
nop ;2
nop ;3
nop ;4 pourquoi des nops?
nop ;5
decfsz cpt1
goto boucle1
decfsz cpt2
goto boucle2
return
;*********************************************************************
; PROCEDURES *
;*********************************************************************