|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Analog-to-digital conversions
Our team is attempting to utilize some of the analog ports for simple limit switches (as we are running low on digital ports) and were dismayed to find out that there is about a 1 second delay when using the standard Get_Analog_Value function provided in WPILib. We attempted to incorporate the adc.h and adc.c files from Kevin.org which reportedly is more efficient, but quickly found a conflict (Timer2). Due to there being no available source code for WPILib, it's hard to know what timers are used by WPILib and their purpose. Any suggestions?
|
|
#2
|
|||
|
|||
|
Re: Analog-to-digital conversions
A 1 second delay does not sound normal.
If you are using these for limit switches, you will likely need a pullup resistor (something like 4.7k should work) to 5V, as I don't believe the analog ports have any pullup within the RC like the digital ports do, since a switch works in an open-drain configuration rather than driving rail to rail. |
|
#3
|
|||
|
|||
|
Re: Analog-to-digital conversions
Quote:
Thanks for the tip Brian! |
|
#4
|
|||
|
|||
|
Re: Analog-to-digital conversions
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Digital to Analog Converters | 6600gt | Programming | 11 | 08-02-2007 23:27 |
| Digital to OI Analog | marcan | Control System | 33 | 05-02-2007 12:46 |
| Accelerometer: Analog or Digital? | psquared | Programming | 2 | 10-02-2005 16:38 |
| Analog / Digital IO Connectors | Aidan F. Browne | Control System | 4 | 06-02-2005 22:26 |
| Analog vs Digital inputs? | f22flyboy | Programming | 8 | 08-11-2002 22:18 |