Bonjour
Je travaille sous MPLAB et j'ai réalisé un programme qui permet de faire clignoter une led lorsque j'appuie sur un bouton poussoir.
Voici mon programme
Le problème est que lorsque je compile celui ci me met le message d'erreur suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71 ;--------------------------Exemple d'application avec un PIC : un clignotant-------------------------------------------------------- ;Titre:Clignotant ;Date:03 novembre 2010 ;Auteur:Jérôme Forcioli ;PIC utilisé:PIC 16F84 ;On réalise un clignotant sur la broche RB0 d'un PIC 16F84 ;Le quartz est de 4MHz.On effectue une tempo environ égale à 0,2s. ;Un bouton marche sur le port A permet de lancer un clignotant. ;--------------------------Directivité d'assemblage pour MPLAB----------------------------------------------------------------------- list p=16f84A #include p16f84A.inc _config H'3FF9' ;-------------------------Définition des constantes---------------------------------------------------------------------------------- #define inter0 0 ;bouton marche ;-------------------------Définition des registres temporaires------------------------------------------------------------------------ retard1 EQU 0*0C ;le registre temporaire retard1 ;se trouve à l'adresse 0C retard2 EQU 0*0F ;le registre temporaire retard2 ;se trouve à l'adresse 0F memo EQU 0*12 ;le registre temporaire memo ; se trouve à l'adresse 12 ;-------------------------initialisation des PORTS A et B------------------------------------------------------------------------------ ORG 0 BSF STATUS,5 ;On met à 1 le 5ème bit du registre status pour accéder à la 2ème page ;mémoire(pour TRISA et TRISB) MOVLW 0*00 ;On met 00 l'adresse dans le registre w MOVWF TRISB ;On met le registre w dans TRISB MOVLW 0*1F ;On met 1F l'adresse dans le registre w MOVWF TRISA ;On met w dans le registre TRISA BCF STATUS,5 ;On met à 0 le 5ème bit du registre status pour accéder à la 1er page ;mémoire ;-------------------------Raz de la led et de registre memo--------------------------------------------------------------------------- MOVLW 0*00 MOVWF PORTB MOVWF memo ;-------------------------Programme Principal--------------------------------------------------------------------------------------- debut BTFSS PORTA,inter0 GOTO debut MOVLW 0*FF MOVWF retard1 MOVWF retard2 COMF memo,F MOVF memo,W; MOVWF PORTB CALL tempo GOTO debut ;------------------------Programme de temporisation----------------------------------------------------------------------------------- tempo DECFSZ retard1,F GOTO tempo MOVLW 0*FF MOVWF retard1 DECFSZ retard2,F GOTO tempo RETURN END
Je comprend pas bien ce qu'il veut me dire est ce quelqu'un peut m'aider??
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 Make: The target "C:\Program Files\Microchip\clignotant.o" is out of date. Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F84A "clignotant.asm" /l"clignotant.lst" /e"clignotant.err" Warning[205] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 10 : Found directive in column 1. (list) Error[122] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 12 : Illegal opcode (H) Warning[205] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 25 : Found directive in column 1. (ORG) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 26 : Found opcode in column 1. (BSF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 29 : Found opcode in column 1. (MOVLW) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 30 : Found opcode in column 1. (MOVWF) Message[302] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 30 : Register in operand not in bank 0. Ensure that bank bits are correct. Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 33 : Found opcode in column 1. (MOVLW) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 34 : Found opcode in column 1. (MOVWF) Message[302] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 34 : Register in operand not in bank 0. Ensure that bank bits are correct. Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 36 : Found opcode in column 1. (BCF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 39 : Found opcode in column 1. (MOVLW) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 40 : Found opcode in column 1. (MOVWF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 41 : Found opcode in column 1. (MOVWF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 45 : Found opcode in column 1. (BTFSS) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 46 : Found opcode in column 1. (GOTO) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 47 : Found opcode in column 1. (MOVLW) Error[113] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 47 : Symbol not previously defined (FF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 48 : Found opcode in column 1. (MOVWF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 49 : Found opcode in column 1. (MOVWF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 50 : Found opcode in column 1. (COMF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 52 : Found opcode in column 1. (MOVF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 53 : Found opcode in column 1. (MOVWF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 54 : Found opcode in column 1. (CALL) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 55 : Found opcode in column 1. (GOTO) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 59 : Found opcode in column 1. (DECFSZ) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 60 : Found opcode in column 1. (GOTO) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 61 : Found opcode in column 1. (MOVLW) Error[113] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 61 : Symbol not previously defined (FF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 62 : Found opcode in column 1. (MOVWF) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 63 : Found opcode in column 1. (DECFSZ) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 65 : Found opcode in column 1. (GOTO) Warning[203] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 67 : Found opcode in column 1. (RETURN) Warning[205] C:\USERS\ZODA\DOCUMENTS\CLIGNOTANT.ASM 69 : Found directive in column 1. (END) Halting build on first failure as requested. BUILD FAILED: Fri Nov 05 10:43:33 2010
Partager