Quote:
|
Originally Posted by Atheist
Any ideas? Am I missing something?
|
Yep, you should get 1 when the signal pin is disconnected and 0 when a switch connects it to ground.
How are you displaying the value? Are you typecasting (int) the char value?
e.g.,
Code:
printf("rc_dig_in1 = %d\n", (int) rc_dig_in1);
Just to verify your User_Initialization() should have:
Code:
IO1 = IO2 = INPUT;
.
.
.
/* SECOND: Configure the number of analog channels. */
Set_Number_of_Analog_Channels(NO_ANALOG); /* See ifi_aliases.h */