View Single Post
  #5   Spotlight this post!  
Unread 22-02-2009, 09:14
Daniel_LaFleur's Avatar
Daniel_LaFleur Daniel_LaFleur is offline
Mad Scientist
AKA: Me
FRC #2040 (DERT)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Peoria, IL
Posts: 1,964
Daniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond repute
Send a message via MSN to Daniel_LaFleur
Re: AnalogModule->GetAverageValue() gives wrong results if polled too fast

Many A/D converters multiplex their input lines (that is that there is 1 A/D converter for up to 8 analog inputs). When these switch from 1 line to another it takes time for the charge to dissipate on the A/D input.

The Wait(.005) may be a 'quick fix' as the system may be able to cycle inputs faster than the A/D can dissipate a large charge (in this case ~ 12 v).

Is there a reason that you need to poll the inputs that quickly?
__________________
___________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "
- Tennyson, Ulysses
Reply With Quote