Is clock speed constant??
krazyideas
Posts: 119
Hello
I'm useing a 5 MHz crystal with
_clkmode······= xtal1 + pll16x·
_xinfreq······· = 5_000_000
and I just want to know if I can use clock cycles for referance to timing some time sensitive intervols in my program?
I was sure I could but then I started reading a bunch of stuff in the manule till I became unsure.
Thanks
Ps useing this clock cycle ( 80MHz I do belive) 384_000_000 clocks·is about 8 seconds is it not???
I'm useing a 5 MHz crystal with
_clkmode······= xtal1 + pll16x·
_xinfreq······· = 5_000_000
and I just want to know if I can use clock cycles for referance to timing some time sensitive intervols in my program?
I was sure I could but then I started reading a bunch of stuff in the manule till I became unsure.
Thanks
Ps useing this clock cycle ( 80MHz I do belive) 384_000_000 clocks·is about 8 seconds is it not???
Comments
Yes, you can; check out page 184 (CNT) of the manual; it explains how to synchronize an event.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
This post is a work of art. Variations in spelling and grammar are intentional, artistic endeavors that add value to all of mankind.
For larger time periods (like seconds) the CLKFREQ function returns the number of clocks in one second. Eight seconds would be CLKFREQ * 8
The advantage of using CLKFREQ is that it's adjusted when _clkmode and _xinfreq are changed.
I'm not an expert in PLL's but it seems like there would be some linear relationship between crystal error and clock speed?
Jim-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 10/24/2008 10:37:16 PM GMT