Go to Post If you're the smartest person in the room, you're in the wrong room - Ian Curtis [more]
Home
Go Back   Chief Delphi > Technical > Control System
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 02-03-2004, 16:48
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Digital In Question

I'm assuming the rotary switch you are usign has a single common, and then a bunch of other pins. Pick a groung any ground on the RC and tie each of the other pins to a sig pin. Internaly, all of the gnd pins are connected to each other inside the RC.
__________________
1139 Alumni
  #2   Spotlight this post!  
Unread 02-03-2004, 16:53
jacob_dilles's Avatar
jacob_dilles jacob_dilles is offline
Registered User
AKA: theshadow
FRC #0620 (WarBots)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Vienna, VA
Posts: 245
jacob_dilles will become famous soon enough
Send a message via AIM to jacob_dilles
Re: Digital In Question

Quote:
Originally Posted by Rickertsen2
Internaly, all of the gnd pins are connected to each other inside the RC.
yep, all the grounds are solderd together inside the box. TECHNICLY you should run a ground wire from each that u use so that your not sinking more curent thurgh the ground then your drawing thrugh the postitives

lol BUT yes one wire will work fine and i doubt its even in the rules... becasue it doesnt realy matter
__________________
--------------------------
"You're not a real programmer until all your sentences end with semicolons;"
  #3   Spotlight this post!  
Unread 02-03-2004, 16:54
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,187
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Digital In Question

ok i was just trying to figure out which pin the RC looks at when trying to see highs and lows.
  #4   Spotlight this post!  
Unread 02-03-2004, 17:09
jacob_dilles's Avatar
jacob_dilles jacob_dilles is offline
Registered User
AKA: theshadow
FRC #0620 (WarBots)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Vienna, VA
Posts: 245
jacob_dilles will become famous soon enough
Send a message via AIM to jacob_dilles
Re: Digital In Question

when you set a pin to be an "input" in the initilzation code, it automaticly sets an internal pull up resistor. when the switch/rotor/encoder/aliean space ship is "off" as in OPEN the I/O reads a "1" on say "rc_dig_io01" or whatever the variable is. you then proceed to wire the switch to the pin and to ground. that way, when it is in the "on" i.e. "CLOSED" postion, the circut is shorted thrugh ground ( but its thrugh a 100 million billion ohm resistor so its not a problem ) and when you read it it calls it a "0"

so when your rotory switch, pic a ground pin, and solder that to the common. then for each "leg", solder it to inputs 1, 2, 3 etc ( actualy, id start at 7 if you dont have any, its an inturpt thing for future expandibity) so 7, 8, 9 etc. then to code it, you can either have a million
Code:
if a=0 and b=1 and c=1 and d=1 {do this}
if a=1 and b=0 and c=0 and d=1 {do this}
if a=0 and b=1 and c=0 and d=1 {do this}
if a=1 and b=0 and c=0 and d=1 {do this}
or you can have a switch statement. or NESTED switch statements.

or even better, you could have a lookup table! lol have fun with the code tho...
__________________
--------------------------
"You're not a real programmer until all your sentences end with semicolons;"
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
MIM's question of the day on programming. Gene F Programming 3 24-02-2004 16:32
A question about control system options computhief263 Control System 7 04-02-2004 14:46
digital inputs not valid just after initialization? WizardOfAz Programming 2 26-01-2004 13:21
MnM EASY Question of the Day Winners! Mike Bonham General Forum 22 03-05-2002 21:21
Have a question about the Basic Stamp Chip Boards wes16zeus Programming 3 06-12-2001 08:25


All times are GMT -5. The time now is 06:02.

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