Tenho esse progrma em C pra resolver, só que sempre qd compilo ele dá falha e não to conseguindo achar o erro o programa pede para elaborar um contador crescente / decrescente 00 a 99 utilizando o display de 7 segmentos. O botão SW4 ativa a contagem crescente. O botão SW5 ativa a contagem decrescente. O botão SW6 zera a contagem. Na contagem entre 40 e 60 o ventilador deve ser acionado. Na contagem entre 70 e 90 a ventilador deve ser acionada. Gente por favor me ajudem, se vocês puderem me ajudar a desvendar este misterio ficarei muito agradecida. Desede já agradeço a atenção. Código: #include <htc.h>
#include "DELAY.h"
__CONFIG (HS & WDTDIS & PWRTDIS & BORDIS & LVPDIS & WRTEN & DEBUGDIS & DUNPROT & UNPROTECT);
#define DISPLAY PORTD
#define CONT_CRESC RB0
#define CONT_DECRES RB1
#define CONT_ZER0 RB2
#define VENTILADOR RC2
void CONT ();
void DELAY (char CONT);
int X,Y,CONT;
const char TABELA_7SEG[16]=
{
0x3f, // 0h = 0
0x06, // 1h = 1
0x5B, // 2h = 2
0x4F, // 3h = 3
0x66, // 4h = 4
0x6D, // 5h = 5
0x7D, // 6h = 6
0x07, // 7h = 7
0x7F, // 8h = 8
0x6F, // 9h = 9
0x00, // Ah = A
0x00, // Bh = B
0x00, // Ch = C
0x00, // Dh = D
0x00, // é = E
0x00, // Fh = F
};
void main (void)
{
OPTION = 0b00000000;
INTCON = 0b00000000;
TRISD = 0b00000000;
PORTD = 0b11111111;
TRISA = 0b00000000;
PORTA = 0b00100000;
TRISC = 0b11111111;
RC2 = 0;
NUMERO = 0;
DISPLAY =0x3f;
while(1){
if (CONT=0,CONT>X,CONT++){
RB0 = 1;
}
if (CONT=0,CONT<X,CONT--){
RB1 = 1;
}
if (CONT=0,CONT=X,CONT == 0){
RB2 = 1;
}
}
while(1){
for (X=0;X<Y;X++){
RC2=0;
DELAY (X);
RC2=1;
DELAY (X);
}
if(x>40 && x<60){
Ventilador = 1;
}
if(x>70 && x<90){
Ventilador = 1;
}
}
}