sample and hold ADC08832
ADP
Posts: 15
Has anyone used one of these with bs2. I am trying to use the code for adc0831 with adc08832 but it isnt working. I dont know why this is a problem or what i should consider looking into. Could anyone help if possible.
thanks alot guys
thanks alot guys
Comments
What type of input are you trying to read in?· Are you reading in a variable voltage?·· Have you tried using the ADC0831?· The reason·I ask is that I want to make sure that isn't a problem with the·circuit. ·Here are a couple of links·regarding·the data sheets for the two ADC chips:· http://www.national.com/JPN/ds/AD/ADC08832.pdf·
http://64.233.161.104/search?q=cache:mxjuaNi9788J:laspace.lsu.edu/aces/Docs/Component%2520Docs/adc0831.pdf+adc0831&hl=en
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
www.parallax.com
·
Yes i am reading variable voltage in and i am just trying to to see if i can get a display on the debug window using the code for adc0831. Unfortunately nothing is being displayed but i am even wondering whether sample and hold option adc08832 has anything to do with this problem. I am using pretty much similar connections as for adc0831 to BS2 except for the fact that· i am just using 1 channel instead of the 2 that adc08832 offers.
Attached is the code im using for adc0831 (i am using the same for adc08332 but doesnt work).
Your help will be highly appreciated
ADP
Another thing to double-check is your connections -- even though they have the same package size, the ADC0831 and ADC0832 do NOT have the same pinout.·
Update 12/3: I bought a couple ADC08832s and found that the code above does indeed work.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Post Edited (Jon Williams) : 12/3/2004 9:00:14 PM GMT
Thanks for your reply. Unfortunately I am using adc08832 (not adc0832). I think they work differently. The adc08832 is a sample/hold converter. I dont think that really comes into play with the code BUT it has a conversion time of 4us as opposed to adc0832 (the one you are referring to) which has 32us. I know you can help me here. Could the conversion time effect the code??? If , so , how?? and what necessary ammendments should my code focus on??
Thanks Jon, i would really appreciate you help on this one, once again.
ADP
I'm on vacation for the next week, so I'll simply bid you good luck and Happy Thanksgiving.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
happy thanksgiving to you too
ADP
I was wondering how I could be able to count time betweend peaks. Lets say i have a sine wave coming into adc0831 at a certain frequency. How would I go about getting the time between the peaks using BS2. I know the voltages will be rising and falling according to the sine waves amplitude.
thanks
ADP
Then just mark the time at the peak of each ADC read and then determine the time between each positive peak.·
It's rough/crude....but it all depends what you need for accuracy.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Do you think LabView could solve this problem? I can constantly send data from BS2 to LabView and i'm wondering whether basic stamp is responsible for doing the necessary peak calculation values or would LabView take·care of this.
Thanks
ADP
Having said that, you could read the AtoD converter with the BS2, then send a result to Labview, then read a new value, then send, etc. The reading loop would take 500 uSec, but sending a character at 9600 baud takes a mSec per character. Say 4 digits, its 4.5 mSec per sample, or a max sample frequency of 222 hz.
If the Stamp takes care of peak-detection, then it can take a reading every 500 uSec. This is a max sample frequency of 2000 hz. -- using Nyquist limits that you must sample a frequency twice as fast as the signal changes, this is a frequency of 1000 Hz.
What is the frequency you are trying to measure?
well i want to be able to take heart signals that enter the adc (0831) and through them out to LabView and I just found out that labView cant just take these signals and do the necessary calculations to find the BPM of the heart. So I just want to try and send a sine wave into the BS2 and just be able to calculate the time between the peaks. I could use a function generator and change the frequency accordingly. But i just want to that can be done and how.
I'd really appreciate your help,
ADP