Go to Post "I need the adjustable hammer" "You mean that wren-" "No, it's a hammer" - Karibou [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 18-01-2008, 09:43
PhilM PhilM is offline
Registered User
FRC #0937
 
Join Date: Jan 2007
Location: Shawnee Mission North High School
Posts: 4
PhilM is an unknown quantity at this point
rc_dig_in help?

our digital imputs are always set to one no matter what we do. We even defined them as zero right before the code that we were testing and they were still set to one and.. thats not suppost to happen. has anyone else had similar problems?
  #2   Spotlight this post!  
Unread 18-01-2008, 09:49
jasonpeinko jasonpeinko is offline
Registered User
FRC #1087
 
Join Date: Jan 2008
Location: Salem Oregon
Posts: 22
jasonpeinko is an unknown quantity at this point
Re: rc_dig_in help?

what kind of input are you using, i have been trying to get the gear tooth sensor working but i have no printf right now so i cant see whats going on.
  #3   Spotlight this post!  
Unread 18-01-2008, 09:56
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: rc_dig_in help?

How are you trying to define an input as zero? What circuitry are you connecting to the input pin?

When you read a digital input, the value you get depends on the voltage on the pin. Ground gives you a zero, and +5 volts gives you a one. The RC input pins have pullup resistors built in, so a pin with no connection is the same as a pin with +5 volts supplied to it.
  #4   Spotlight this post!  
Unread 18-01-2008, 11:44
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,854
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: rc_dig_in help?

Quote:
Originally Posted by PhilM View Post
our digital imputs are always set to one no matter what we do. We even defined them as zero right before the code that we were testing and they were still set to one and.. thats not suppost to happen.
You don't set digital inputs in the code, so you can try to assign values to them all you want, but .00002 sec. later it will be overwritten by the hardware and nothing will ever take. As Alan said, the digital input values only reflect the voltage seen at the hardware pins.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 18-01-2008 at 11:49.
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
Grab Frame - Help Help Help... nmihailidis Programming 2 04-03-2007 14:44
section 'InterruptVectorLow' type is non-overlay (was: HELP HELP HELP!!!!!) naor52 Programming 14 24-02-2007 01:19
Help: How do we get a teacher to help? (was: Help) ChaosAlchimey General Forum 13 21-01-2007 11:57


All times are GMT -5. The time now is 18:35.

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