SETFREQ command

JPB33

Senior Member
I hope I can ask a very basic question.

Speaking as someone who hasnt had success with the SETFREQ command is there any way easy to check the clock speed after using the setting? I tried it but the bread boarded circuit I was playing with didnt seem to respond any faster, I also believe that it alters the timing of other functions like pause?

Thanks
 

hippy

Technical Support
Staff member
Easiest way is to check by flashing a LED. At default frequency the following will give one second on, one second off ...

Code:
Symbol LED = C.0
Do
  Toggle LED
  pause  1000
Loop
 

Goeytex

Senior Member
I hope I can ask a very basic question.

Speaking as someone who hasnt had success with the SETFREQ command is there any way easy to check the clock speed after using the setting? I tried it but the bread boarded circuit I was playing with didnt seem to respond any faster, I also believe that it alters the timing of other functions like pause?
Speed is relative. Because a circuit does not seem to respond faster doesn't mean that the processor is not running faster. I doubt you can tell by the seat of the pants the difference between a 100us response and a 200us response. And it depends upon what you mean by response. What is the Picaxe responding to?

Success with a command or function is sometimes based upon understanding. What Picaxe Chip are you referring to? How have you been unsuccessful? If a Picaxe with a crystal or a resonator you must use Setfreq EMxx. If no resonator then Setfreq Mxx.

If you are looking for easy then as hippy suggests, flash and LED with PAUSE 1000 between each on/off. At the default frequency, it will be on 1 sec and off 1 sec. Then using setfreq as appropriate for you Picaxe Chip, double the frequency with setfreq. The led should then flash twice as fast.

Tell us what Picaxe chip you are using and if it has a resonator, and show us your code and we can possibly help further.
 
Top