View Single Post
  #10   Spotlight this post!  
Unread 08-02-2004, 13:20
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,817
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: IR signals inverted

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 */
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-02-2004 at 13:25.