Go to Post GP is a measurement that can only apply to yourself. To apply it to another is unfair to that person/group. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-02-2004, 22:14
Atheist Atheist is offline
Registered User
#0555
 
Join Date: Jan 2004
Location: New Jersey
Posts: 22
Atheist is on a distinguished road
IR signals inverted

For some reason the EDU controller is interpretting signals on the first and second digital inputs as 0 and no signal as 1. Am I missing something or is this not correct? I use PrintByte() to print the value of each and the beacons/sensors are functioning perfectly. What could be causing this?
  #2   Spotlight this post!  
Unread 04-02-2004, 22:21
Random Dude Random Dude is offline
Oregon State Head FTA
AKA: Chris
no team (Oregon Robotics Tournament & Outreach Program)
 
Join Date: Aug 2002
Rookie Year: 1998
Location: Oregon
Posts: 142
Random Dude will become famous soon enoughRandom Dude will become famous soon enough
Re: IR signals inverted

Quote:
Originally Posted by Atheist
For some reason the EDU controller is interpretting signals on the first and second digital inputs as 0 and no signal as 1. Am I missing something or is this not correct? I use PrintByte() to print the value of each and the beacons/sensors are functioning perfectly. What could be causing this?

Well the IR sensor (Spec Sheet), will output a logic high (+5v) when it does not see a signal, and a logic low (0v) when it does see a signal. This appears to be what you are seeing.
  #3   Spotlight this post!  
Unread 04-02-2004, 22:29
Atheist Atheist is offline
Registered User
#0555
 
Join Date: Jan 2004
Location: New Jersey
Posts: 22
Atheist is on a distinguished road
Re: IR signals inverted

Thanks, so it would seem that they were working after all.
  #4   Spotlight this post!  
Unread 04-02-2004, 22:37
Atheist Atheist is offline
Registered User
#0555
 
Join Date: Jan 2004
Location: New Jersey
Posts: 22
Atheist is on a distinguished road
Re: IR signals inverted

Those are the best kinds of problems.
  #5   Spotlight this post!  
Unread 04-02-2004, 23:40
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: IR signals inverted

Quote:
Originally Posted by Atheist
For some reason the EDU controller is interpretting signals on the first and second digital inputs as 0 and no signal as 1. Am I missing something or is this not correct? I use PrintByte() to print the value of each and the beacons/sensors are functioning perfectly. What could be causing this?
This illustration shows what the sensor output should look like.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #6   Spotlight this post!  
Unread 06-02-2004, 16:19
Atheist Atheist is offline
Registered User
#0555
 
Join Date: Jan 2004
Location: New Jersey
Posts: 22
Atheist is on a distinguished road
Re: IR signals inverted

Actually I don't think it has anything to do with the sensor output. When I manually connect the pins it reads as 0 and when they are not connected it reads as 0.
  #7   Spotlight this post!  
Unread 06-02-2004, 16:27
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: IR signals inverted

is it possible you redefined the port in your code somewhere to make the pin an output instead of an input?

is it possible you connected something to the pin that you shouldnt have, like 12V, and blew out the input circuit for that pin?

I would look up how to connect a simple switch to the port (in the RC reference manual) and try reading the port that way - you cant get any simpler than a switch - if the pin is blown out, and you dont need to use all your input pins, then use another one.
  #8   Spotlight this post!  
Unread 06-02-2004, 16:32
Atheist Atheist is offline
Registered User
#0555
 
Join Date: Jan 2004
Location: New Jersey
Posts: 22
Atheist is on a distinguished road
Re: IR signals inverted

Anything is possible, but not likely. I've triple checked the code to make sure they are inputs. What I said is true for EVERY pin on the EDU controller. I tried the switch method with the same result.
  #9   Spotlight this post!  
Unread 08-02-2004, 11:24
Atheist Atheist is offline
Registered User
#0555
 
Join Date: Jan 2004
Location: New Jersey
Posts: 22
Atheist is on a distinguished road
Re: IR signals inverted

Any ideas? Am I missing something?
  #10   Spotlight this post!  
Unread 08-02-2004, 13:20
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,862
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.
  #11   Spotlight this post!  
Unread 08-02-2004, 16:27
Atheist Atheist is offline
Registered User
#0555
 
Join Date: Jan 2004
Location: New Jersey
Posts: 22
Atheist is on a distinguished road
Re: IR signals inverted

Ok, that is what we are getting. 1 when disconnected and 0 when connected.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Radios not getting signals BrendaB Control System 3 24-01-2004 22:50
nats: stoping conflicting robot signals? JasonStern Technical Discussion 25 25-05-2003 00:37
visual signals from operator allowed? angelina Rules/Strategy 16 23-01-2003 20:11
Referee hand signals archiver 1999 1 23-06-2002 21:57
problems with receiving signals between radios (need help0 chrisw Technical Discussion 4 11-01-2002 10:35


All times are GMT -5. The time now is 13:47.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi