help with BASIC STAMP 2 sampling
dynamitekilla
Posts: 3
Dear Reader,
·· I am trying to perform ADC with my BASIC stamp 2 but need to know the sampling frequency that the stamp reads in the data using the AD0831 chip. Please tell me if I am wrong with the following; using a basic stamp 2 module with a clock of 20MHz, the ADC needs about 8 clock cycles to convert the data and another 8 clock cycles are needed to transmit the data to the pc so this means 16 clock cycles in all. With a 20Mhz clock, 1 clock cycle = 0.05us so 16 clock cycles means 0.8us. Is the sampling frequency then 1/8 clock cycles = 250kHz ?
Alternatively, if I were to read the state change on a pin for a TTL input(0 and 5 only) then is the sampling frequency = 1 clock cycle =0.05us = 20Mhz ?
Thank you for taking the time to read my post. Have a pleasant day.
·· I am trying to perform ADC with my BASIC stamp 2 but need to know the sampling frequency that the stamp reads in the data using the AD0831 chip. Please tell me if I am wrong with the following; using a basic stamp 2 module with a clock of 20MHz, the ADC needs about 8 clock cycles to convert the data and another 8 clock cycles are needed to transmit the data to the pc so this means 16 clock cycles in all. With a 20Mhz clock, 1 clock cycle = 0.05us so 16 clock cycles means 0.8us. Is the sampling frequency then 1/8 clock cycles = 250kHz ?
Alternatively, if I were to read the state change on a pin for a TTL input(0 and 5 only) then is the sampling frequency = 1 clock cycle =0.05us = 20Mhz ?
Thank you for taking the time to read my post. Have a pleasant day.
Comments
Attached file is from a google search of "AD0831"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
I can tell you that it reads very fast depending how long you rountine is and whether or not use any pauses in you routine if you are going to use a LCD
Display you do have to put little pause because they·are so fast that then LCD Display can not keep up I am just using pause 100 and that works great
It still is very fast· as fast as an volt meter is··When it is ·read voltage changes
I hope this helps
This is the link where I working on a project using the ADC 0831 Chip
http://forums.parallax.com/showthread.php?p=743395
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 8/17/2008 4:16:37 AM GMT
Quick Facts
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com