Bonjours à tous,
Je n'arrive pas à gérer les interruptions sur changement d’état de mes entrées RA0, RA1, RA2
le compilateur me retourne cette erreur :
Executing: "C:\Program files\Picc\CCSC.exe" +FM "prog.c" +DF +LN +T +A +M +Z +Y=9 +EA
*** Error 7 "prog.c" Line 3(0,1): Invalid Pre-Processor directive
*** Error 7 "prog.c" Line 11(0,1): Invalid Pre-Processor directive
2 Errors, 0 Warnings.
Halting build on first failure as requested.
voici mon programme de test :
#include <12F683.h>
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES NOCPD //No EE protection
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOMCLR //Master Clear pin used for I/O
#FUSES NOPUT //No Power Up Timer
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES NOFCMEN //Fail-safe clock monitor disabled
#use delay(clock=1000000)
#define RL1 PIN_A0
#define RL2 PIN_A1
#define TRIAC PIN_A2
#define BPAV PIN_A3
#define BPSTP PIN_A4
#define BPAR PIN_A5
#INT_RA0
void ra0_isr()
{
//mycode
output_high(RL1);
output_low(RL2);
}
#INT_RA1
void ra1_isr()
{
//mycode
output_high(RL2);
output_low(RL1);
}
void main()
{
setup_oscillator(OSC_1MHZ);
setup_timer_0(RTCC_INTERNAL|RT CC_DIV_2);
enable_interrupts(GLOBAL);
enable_interrupts(INT_RA0);
enable_interrupts(INT_RA1);
enable_interrupts(INT_RA2);
set_tris_a(000111);
output_low(RL1);
output_low(RL2);
output_low(TRIAC);
while (true) /* Boucle sans fin */
{
}
}
Merci d'avance pour votre aide,
Cordialement,
-----