BANK1
movlw ADCON1VAL ; charger valeur ADCON1VAL du premier détecteur dans w
movwf ADCON1 ; puis dans ADCON1
BANK0
movlw ADCON0VAL1 ; charger le CAN pour la première valeur
movwf ADCON0 ; dans ADCON0, pour démarrer la charge du condensateur
TEMP25 ; temporisation pour que le condensateur se charge
bsf ADCON0,GO ; On démarre la conversion numérique
waitconv1
btfsc ADCON0,GO ; la conversion est-elle terminée ?
goto waitconv1 ; non, on attend qu'elle le soit
movf ADRESH,w ; on charge la
call SendHex ;send the byte in W
rien goto rien ;wait forever
SendHex movwf HexTemp
swapf HexTemp,W
call WriteLoNibble
movfw HexTemp
WriteLoNibble andlw 0fh
addlw .256-.10 ; if a-f then carry set
btfsc STATUS,C
addlw 7
addlw "0"+.10
goto SendByte
SendByte btfss PIR1,TXIF ;has previous byte been sent
goto SendByte ;no so wait
movwf TXREG ;yes so send next one.
return