D'abord le programme est de la source suivante:"http://fabrice.sincere.pagesperso-orange.fr/cm_electronique/projet_pic/rs232afficheur/afficheur84.asm"
-------------------------------------------------------------------------
***affichage***
-------------------------------------------------------------------------
movlw '0' ; (code ASCII de 0 = 0x30 = B'00110000')
subwf donnee,W
btfsc STATUS,Z
goto affiche0 ; donnee = '1'
movlw '1' ; (code ASCII de 1)
subwf donnee,W
btfsc STATUS,Z
goto affiche1 ; donnee = '1'
movlw '2' ; (code ASCII de 2)
subwf donnee,W
btfsc STATUS,Z
goto affiche2 ; donnee = '2'
movlw '3' ; (code ASCII de 3)
subwf donnee,W
btfsc STATUS,Z
goto affiche3 ; donnee = '3'
movlw '4' ; (code ASCII de 4)
subwf donnee,W
btfsc STATUS,Z
goto affiche4 ; donnee = '4'
movlw '5' ; (code ASCII de 5)
subwf donnee,W
btfsc STATUS,Z
goto affiche5 ; donnee = '5'
movlw '6' ; (code ASCII de 6)
subwf donnee,W
btfsc STATUS,Z
goto affiche6 ; donnee = '6'
movlw '7' ; (code ASCII de 7)
subwf donnee,W
btfsc STATUS,Z
goto affiche7 ; donnee = '7'
movlw '8' ; (code ASCII de 8)
subwf donnee,W
btfsc STATUS,Z
goto affiche8 ; donnee = '8'
movlw '9' ; (code ASCII de 9)
subwf donnee,W
btfsc STATUS,Z
goto affiche9 ; donnee = '9'
movlw ' ' ; (code ASCII de l'espace = 0x20)
subwf donnee,W
btfsc STATUS,Z
goto afficherien ; donnee = ' '
; autre caractère
movlw B'01111110'
movwf PORTB ; RB7 au niveau bas (le segment a est allumé)
goto finaffichage
affiche0
movlw B'00000010' ; on affiche '0'
movwf PORTB ; afficheur 7 segments (abcdefg) =(0000001)
goto finaffichage
affiche1
movlw B'10011110' ; on affiche '1'
movwf PORTB ; afficheur 7 segments (abcdefg) = (1001111)
goto finaffichage
affiche2
movlw B'00100100' ; on affiche '2'
movwf PORTB ; afficheur 7 segments (abcdefg) = (0010010)
goto finaffichage
affiche3
movlw B'00001100' ; on affiche '3'
movwf PORTB ; afficheur 7 segments (abcdefg) = (0000110)
goto finaffichage
affiche4
movlw B'10011000' ; on affiche '4'
movwf PORTB ; afficheur 7 segments (abcdefg) = (1001100)
goto finaffichage
affiche5
movlw B'01001000' ; on affiche '5'
movwf PORTB ; afficheur 7 segments (abcdefg) = (0100100)
goto finaffichage
affiche6
movlw B'11000000' ; on affiche '6'
movwf PORTB ; afficheur 7 segments (abcdefg) = (1100000)
goto finaffichage
affiche7
movlw B'00011110' ; on affiche '7'
movwf PORTB ; afficheur 7 segments (abcdefg) = (0001111)
goto finaffichage
affiche8
movlw B'00000000' ; on affiche '8'
movwf PORTB ; afficheur 7 segments (abcdefg) = (0000000)
goto finaffichage
affiche9
movlw B'00011000' ; on affiche '9'
movwf PORTB ; afficheur 7 segments (abcdefg) = (0001100)
goto finaffichage
il suffit de modifier les valeurs pour afficher ce que tu as besoin, et bonne chance
