yes. however, i would advise against leaving the default values, it's not a good practice.
the problem of course lies in the "if" statement. you have to check what the hell is the compiler's outputing
but as i said putting the input pins directly into an if statement never worked reliably for me. a lot happens inside an if statement.
Sampling the port and using that byte inside your if statement should resolve all of your problems
(by the way what was all that abstracion rubbish in the attached file? plain C is already too abstract for an 8 bit PIC)
ok, I'll try to change the relevant ones.
how is the compiler going to tell me about the if casing trouble in the chip while running ? the compiler gives a clear and detailed output in the terminal when I compile.
I've tried to replace the "abstracion rubbish" if line with "if(PORTBbits.RB0 == 0)" , same result.
and that abstracion rubbish is what's going to save me when I port the HD44780U LCD driver. Generally speaking, It might seem as a big overhead, but later on, it's very helpful
I don't have to sample it, I think it's already sampled enough with "PORTBbits.RB0" .