Well, some days ago, I was making an program to give the max value of 2 analog inputs. So I looked at the examples folder and find 1 example.
Basically you read the analog channel and compare with your predefined variable to see if it is bigger. Ok! It worked.
_BUT_ my teacher tell me to do it with another way. Since my analog input has 60Hz, so an entire cycle has 1.6ms. He told me to make a read of the analog channel 120 times per cycle. Ok, this is not a problem. But he wants that I take all the 120 values and store in a table and use a function called "simple hold" to find the bigger value. But I do not know with function is that.
Someone can help me?
thanks
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
Posted: Sun Dec 05, 2010 11:48 pm
Greetings !! I have not heard of a "simple hold" before. My best guess is something got lost in translation and the term was "sample and hold" -- see this wikipedia definition and see if that is what he is talking about.
http://en.wikipedia.org/wiki/Sample_and_hold
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
Posted: Mon Dec 06, 2010 8:59 am
I think he just meant a function that stores all the values in an array
for later comparison.
g. _________________ CCS PCM 5.078 & CCS PCH 5.093
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum