Controlling Hz
ghost13
Posts: 133
I'm trying to make my own altimeter for a rocket, but I have a bit of a problem. Right now, it only records about 10 times per second (I just use a loop to keep inputting data from the ADC).
Is there a way to change this rate? Or is it set by the stamp? BTW, I'm using the BS1
THANKS!
Is there a way to change this rate? Or is it set by the stamp? BTW, I'm using the BS1
THANKS!
Comments
Although probably the speed is set by the time it takes to get a value from the ADC.
Don't forget that the BS1 is pretty slow. Unless there are PAUSE statements in the
program, the limiting factor is probably the overall speed of the BS1 and you can't
change that. There may be some ways to slightly optimize your program, but don't
expect to see more than a 10%-25% improvement at best.
My program is attached. My ADC sub method code is directly from the Parallax appnote on the adc I'm using (LTC1298). I never understood that ADC code... maybe that is what is slowing it down.
Thanks for your help!
I guess I'll just have to live with 10-15 readings per second.
Thanks!
If moving up to a faster BasicStamp is possible, it could speed the sample rate some.
Good luck with the project.
David
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
David
There are 10 types of people in this world,...
Those that understand binary numbers, and those that don't!!!