bounjour;
List p=16f84a
#include <p16F84A.INC>
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _RC_OSC
bank1 macro
bsf STATUS,RP0
endm
bank0 macro
bcf STATUS,RP0
endm
CBLOCK 0x0c
c : 1
temp_b : 1
endc
org 0x0000
goto start
start
bank1
movlw b'00000000'
movwf TRISB
movlw b'11111111'
movwf TRISA
bank0
test1
movlw b'00000001'
test2
movwf PORTB
movf PORTA,1
btfss STATUS,2
call decodage
movf PORTB,0
addwf PORTB,0
movwf temp_b
btfss temp_b,4
goto test2
goto test1
decodage
btfsc temp_b,0
movlw .0
btfsc temp_b,1
movlw .1
btfsc temp_b,2
movlw .2
btfsc temp_b,3
movlw .3
movwf c
btfsc PORTA,0
movlw .0
btfsc PORTA,1
movlw .1
btfsc PORTA,2
movlw .2
btfsc PORTA,3
movlw .3
bcf STATUS,0
rlf c,1
addwf c,0
;bank0
;clrf PORTA
return
END
programme clavier 16 touche a mpilab
je veux l'explication du chaque ligne ?
-----