User Tools

Site Tools


roborio_digital_io

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
roborio_digital_io [2018/01/23 10:43] – [Software] tellroborio_digital_io [2018/12/11 22:31] (current) – [Selecting from among more than two alternatives] tell
Line 1: Line 1:
 On this page we'll describe the 10 "DIO" Digital I/O connections on the RoboRIO.   On this page we'll describe the 10 "DIO" Digital I/O connections on the RoboRIO.  
 +{{ :roborio-dio.jpg?nolink&250|}}
  
 ====== Introduction ====== ====== Introduction ======
Line 30: Line 31:
 When configured as an output, the signal pin is driven to 0 volts for a "zero", and 3.3 volts for a "one" More on outputs later. When configured as an output, the signal pin is driven to 0 volts for a "zero", and 3.3 volts for a "one" More on outputs later.
  
-When acting as an input, the RoboRIO interprets any voltage between 0 and 0.8v ad a "zero", and a voltage between 2.0v and 5.5v as a "one."  A voltage in between those ranges +When acting as an input, the RoboRIO interprets the voltage seen on the "Signal" pin as: 
-results in either a zero or a one being delivered to the software program.+  * any voltage between 0 and 0.8v is a "zero" 
 +  * a voltage between 2.0v and 5.5v a "one." 
 +  A voltage in between those ranges results in either a zero or a one being delivered to the software program.  We generally want to avoid this indeterminate region.
  
-There is a "pullup" or "pulldown" resistor internal to the RoboRIO that helps ensure that the voltage on a disconnected DIO does not drift into that "unknown" region.  For the ten basic DIOs on the RoboRIO, it is a pullup, so an unconnected DIO will be read by software as a "one".+There is a "pullup" or "pulldown" resistor internal to the RoboRIO that helps ensure that the voltage on a disconnected DIO does not drift into that "unknown" region.  For the ten basic DIOs on the RoboRIO, the resistor is a pullup, so an unconnected DIO will be read by software as a "one".
  
-To cause a DIO to be read as "zero" by software, all we have to do is connect the signal pin to ground, for example with a switch.+So, to cause a DIO to be read as "zero" by software, all we have to do is connect the signal pin to ground, for example with a switch
 + 
 +{{ :pwm-switch-cable.png?400 |}}
  
-[picture needed] 
  
 ====== Software ====== ====== Software ======
Line 94: Line 98:
  
  
 +
 +
 +What if we want to select between more than two choices?   See "fun with switches" on the page [[Switches as Digital IO]]
  
 ====== Conclusion ====== ====== Conclusion ======
 +
  
 This discussion also applies to the 16 additional DIO pins located on the roborio expansion connector. This discussion also applies to the 16 additional DIO pins located on the roborio expansion connector.
  
  
roborio_digital_io.1516722213.txt.gz · Last modified: 2018/01/23 10:43 by tell