Count, basic math, and create a frequency though programming?
EPhantom125
Posts: 4
I'm a highschool student and I need to make a stamp program to count the ripples in a·variable frequency for a certain ammount of time, then have it count again, find the difference in the numbers from the·frequencies. do a little bit more math. and put a clock signal out based on the math done before for the period of time that it counts the variable frequency... I know, a lot... any help?
basicly I need to know...:
how to make it count
how to make it remember values
How to make it do math
and how to make it create a clock signal of a certain frequency
thankyou for your help
basicly I need to know...:
how to make it count
how to make it remember values
How to make it do math
and how to make it create a clock signal of a certain frequency
thankyou for your help
Comments
To count ripples, you will need to change the input signal to a series of pulses which the Stamp can count with a COUNT statement. Do some research on the web on "sine wave to square wave"
To make it remember values, you'll have to learn about variables and assignment (LET) statements from the manual
To make it do math, you'll have to learn about arithmetic operators from the manual. For some kinds of complex math, there's good material on the www.emesystems.com website. Look under "app-notes".
To create a clock signal of a certain frequency, it depends on the frequency. You can use the HIGH and LOW statements with a PAUSE statement. You'll have to read the sections in the manual on these statements. You can also use the FREQOUT statement for some frequencies.
Does the input signal have to be a square wave, or can I just put a diodebefore the input pin taking off negitive voltage?
What I need the program to do, is to make it so I can get a time when the clock signal goes high so many times... the only reason why I am changing to this is because the previous method was· not efficient enough. (I'm having a hard time searching the manual to find the peices of script that I need)
Again, thank you for your help
Edit: I'm wondering if I can make it faster by making it tell me how long a clock signal is high for... any ideas?
Post Edited (EPhantom125) : 4/11/2008 4:48:23 PM GMT