Using a function generator with Picaxe

Russel Lawrence

New Member
Hi all,

I have a function generator that i can use to represent something moving at a certain speed (i.e. a certain frequency that the funtion is oscillating at). I was wondering what sort of command would be useful to put into the programme editor so that it can tell how fast the frequency is and what to do when it reached a certain value.

i.e if its oscillating at 50Hz then flash yellow but when its oscillating at 100Hz or more then flash red.

Would the count command be possible?
 

hippy

Ex-Staff (retired)
COUNT is one option giving the number of signal pules in a time frame, and PULSIN is another, giving the length of or between the signals. As the frequency is proportionate to signal duration either can be used.

The advantage of PULSIN over COUNT is that you don't have to wait a long time to determine a result with desired accuracy.
 
Top