Kryten
New Member
Hi
Im having trouble finding out what im doing wrong with my code. Im using MPlab with HiTech compiler
I get this error :
Can someone pleas tell me what im doing wrong?
Im having trouble finding out what im doing wrong with my code. Im using MPlab with HiTech compiler
Code:
#include <htc.h>
void main (void)
{
while (1){
#if (RA0 == 1 && RA1 ==0)
{
RA2 = 1;
_delay_ms(5);
RA2 = 0;
}
#elif (RA0 == 0 && RA1 == 1)
{
RA2 = 1;
_delay_ms(5);
RA2 = 0;
_delay_ms(500);
}
#else
{
RA2=0;
}
}
}
I get this error :
Code:
Error [100] ; . unterminated #if[n][def] block from line 28
Can someone pleas tell me what im doing wrong?