![]() |
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?
|
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. |
Re: Analog-to-digital conversions
Quote:
Thanks for the tip Brian! |
Re: Analog-to-digital conversions
Quote:
|
| All times are GMT -5. The time now is 23:52. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi