Essai de fichier ASM
boucle port B et E
0x0080 : 0x1283 bcf 0x03 , 5 bank 0
0x0081 : 0x1303 bcf 0x03 , 6 bank 0
0x0082 : 0x0186 clrf 0x06 port b raz
0x0083 : 0x0185 clrf 0x05 port a raz
0x0084 : 0x300F movlw 0x0F désactivation
0x0085 : 0x009F movwf 0x1F des comparateurs
0x0086 : 0x1683 bsf 0x03 , 5 bank 1
0x0087 : 0x1303 bcf 0x03 , 6 bank 1
0x0088 : 0x3000 movlw 0x00 B'0000 0000
0x0089 : 0x0081 movwf 0x01.. î 8eme bit à 0 les R pull up du port B validées les interruptions non en
0x008A : 0x3000 movlw 0x00 B'0000 0000 = 00......................................................services à 0
0x008B : 0x0085 movwf 0x05 tris A à 00 pins du port A en sorties
0x008C : 0x30FF movlw 0xFF B'1111 1111 = FF
0x008D : 0x0086 movwf 0x06 tris B à 11 pins du port B en entrées
0x008E : 0x300F movlw 0x0F B'0000 1111 = 0F
0x008F : 0x0089 movwf 0x09 tris E à 01 pins du port E en entrées (port E en 4 bits only) RE0 à RE3 pins
0x0090 : 0x1283 bcf 0x03 , 5 retour en bank 0.......................................................8,9,10,et 1
0x0091 : 0x1303 bcf 0x03 , 6 retour en bank 0
0x0092 : 0x3000 movlw 0x00 B'0000 0000
0x0093 : 0x0085 movwf 0x05 port A 00 on éteint (les leds maquette) sinon les relais au repos sur
0x0094 : 0x1806 btfsc 0x06 , 0 test RB0 négatif non.......................................l'amplificateur
0x0095 : 0x2899 goto 0x99 saut 0099 1 er btfsc si oui on saute la ligne 0095
0x0096 : 0x230C call 0x30C RA0 (ON) 40 mS on met les 3 relais bistables hors tensions 1er HT 2eme
0x0097 : 0x2312 call 0x312 on affiche l'alarme 450 V.....................................HT et 3 eme HPs
0x0098 : 0x28BD goto 0xBD puis saut à RB7 on reste dans cette position sauf si RAZ sur btfsc 7
0x0099 : 0x1886 btfsc 0x06 , 1 test RB1 négatif non on saute à RB2
0x009A : 0x289F goto 0x9F saut RB2
0x009B : 0x2408 call 0x408 si non RA0 (ON) 40mS
0x009C : 0x2656 call 0x656 on affiche l'alarme 360 V
0x009D : 0x25E3 call 0x5E3 suite du message 360 V puis
0x009E : 0x28BD goto 0xBD saut à RB7
0x009F : 0x1906 btfsc 0x06 , 2 test RB2 si non saut RB3
0x00A0 : 0x28A5 goto 0xA5 saut RB3
0x00A1 : 0x230C call 0x30C les 3 relais au repos RA0
0x00A2 : 0x2603 call 0x603 on affiche l'alarme + 115 V
0x00A3 : 0x2411 call 0x411 suite du message
0x00A4 : 0x28BD goto 0xBD saut RB7
0x00A5 : 0x1986 btfsc 0x06 , 3 test RB3
0x00A6 : 0x28AB goto 0xAB saut RB4
0x00A7 : 0x230C call 0x30C RA0 (ON) 40 mS
0x00A8 : 0x2603 call 0x603 on affiche l'alarme (-) 115 V
0x00A9 : 0x24B7 call 0x4B7 suite du message
0x00AA : 0x28BD goto 0xBD saut RB7
0x00AB : 0x1A06 btfsc 0x06 , 4 test RB4
0x00AC : 0x28B0 goto 0xB0 saut RB0
0x00AD : 0x230C call 0x30C on affiche l'alarme 12,6V
0x00AE : 0x25A2 call 0x5A2 suite du message
0x00AF : 0x28BD goto 0xBD saut RB7
0x00B0 : 0x1A86 btfsc 0x06 , 5 test RB5 good bye
0x00B1 : 0x28B5 goto 0xB5 saut RB6
0x00B2 : 0x21FC call 0x1FC message + procédure de mise hors tensions les relais au repos test
0x00B3 : 0x223C call 0x23C + extinction de l'ampli..................................des leds ( rouge)
0x00B4 : 0x28BA goto 0xBA
0x00B5 : 0x1B06 btfsc 0x06 , 6 test RB6
0x00B6 : 0x28C0 goto 0xC0 saut sur btfsc port E RE0
0x00B7 : 0x23A0 call 0x3A0 standby
0x00B8 : 0x23A3 call 0x3A3
0x00B9 : 0x0063 sleep on arrête le microcontrôleur ce qui permet de voir des PB ? (parasites)
0x00BA : 0x1B86 btfsc 0x06 , 7 test RB7 (RAZ)
0x00BB : 0x28BA goto 0xBA ici on tourne en boucle sur RB7 00BA
0x00BC : 0x2894 goto 0x94 si appui sur RB7 alors on repart en début de programme
0x00BD : 0x3040 movlw 0x40 B'01OO 000 on allume la led rouge
0x00BE : 0x0085 movwf 0x05 port A
0x00BF : 0x28BA goto 0xBA saut RB7
0x00C0 : 0x1809 btfsc 0x09 , 0 test RE0
0x00C1 : 0x28C5 goto 0xC5 saut RE1
0x00C2 : 0x26A1 call 0x6A1 source
0x00C3 : 0x210F call 0x10F TUNER
0x00C4 : 0x2892 goto 0x92
0x00C5 : 0x1889 btfsc 0x09 , 1 test RE1
0x00C6 : 0x28CA goto 0xCA saut RE2
0x00C7 : 0x26A1 call 0x6A1 source
0x00C8 : 0x26B5 call 0x6B5 WEB
0x00C9 : 0x2892 goto 0x92
0x00CA : 0x1909 btfsc 0x09 , 2 test RE2
0x00CB : 0x28CF goto 0xCF saut RE3
0x00CC : 0x26A1 call 0x6A1 source
0x00CD : 0x2004 call 0x04 phono
0x00CE : 0x2892 goto 0x92
0x00CF : 0x1989 btfsc 0x09 , 3 test RE3 pin 1 ( MCLR ou RE3) ici en lecture de bit donc RE3
0x00D0 : 0x2892 goto 0x92 saut 0092 on boucle
0x00D1 : 0x26A1 call 0x6A1 source
0x00D2 : 0x2776 call 0x776 CD DVD
0x00D3 : 0x2892 goto 0x92 on tourne en boucle retour à 0092