Go to Post I encourage the communication of constructive ideas on how to make FIRST a better program. - meaubry [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 07-03-2008, 21:52
ebarker's Avatar
ebarker ebarker is offline
Registered User
AKA: Ed Barker
FRC #1311 (Kell Robotics)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Kennesaw GA
Posts: 1,437
ebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond reputeebarker has a reputation beyond repute
Re: Using Analog Inputs as Digital (on the OI)

tie a 10K resistor from +5 to the analog input pin

connect a switch from ground to the same analog input pin

when the switch is closed you will have a 0

when the switch is open you will have full scale analog value (I don't remember if it is 8 or 10 bit or what)

write some code that interprets

half-scale or lower as a switch closed
else
switch open
__________________
Ed Barker
 


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
We need help with the analog inputs M_dalgashon Programming 4 08-02-2008 17:39
Code to Read the Binary Inputs on Analog Buttons Kingofl337 Control System 5 14-03-2007 11:01
Set Default Digital inputs to Low? How? bad Analog value? Generalx5 Programming 11 04-01-2007 18:57
How do the Analog Inputs work? JBotAlan Electrical 3 07-01-2005 00:11
Analog vs Digital inputs? f22flyboy Programming 8 08-11-2002 22:18


All times are GMT -5. The time now is 20:36.

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