;÷÷÷÷÷÷÷÷÷÷÷÷÷ LA BRIQUOTHEQUE DE PICTRAIN ÷÷÷÷÷÷÷÷÷÷÷÷÷ ; SOUS-PROGRAMMES DE DELAI ; SP_delai_V1_1.inc - PSi - 29/09/2007 ;÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ ; sous-programmes de DELAI de 100 microsecondes SP_delai100uS movlw d'31' movwf VA_CPT_delai1 ; Attention: lire 'délai un', car decfsz VA_CPT_delai1,f ; '1' est est un 'un' et non un 'L' goto $-1 nop nop return ;÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ ; sous-programmes de DELAI d'au moins 1 milliseconde SP_delai_aumoins_1mS movlw d'10' movwf VA_CPT_delai2 call SP_delai100uS decfsz VA_CPT_delai2,f goto $-2 return ;÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ ; sous-programmes de DELAI exactement 1 milliseconde SP_delai_1mS clrf VA_CPT_delai2 ; première boucle de 256 decfsz VA_CPT_delai2,f goto $-1 movlw d'75' ; deuxième boucle de 75 movwf VA_CPT_delai2 decfsz VA_CPT_delai2,f goto $-1 nop nop return ;÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ ; sous-programmes de DELAI 1 Seconde SP_delai_1seconde clrf VA_CPT_delai1 ; compteur de 1re boucle clrf VA_CPT_delai2 ; compteur de 2e boucle movlw d'5' ; compteur de 3e boucle movwf VA_CPT_delai3 decfsz VA_CPT_delai1,f goto $-1 decfsz VA_CPT_delai2,f goto $-3 decfsz VA_CPT_delai3,f goto $-5 return ;÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ ; sous-programmes de DELAI variable SP_delai_variable_100uS call SP_delai100uS decfsz VA_CPT_delai2,f goto $-2 return ; rem movlw d'10' movwf VA_CPT_delai2 call SP_delai_variable_100uS