Id like to ask why a Timer IC is used instead of a Cog. Also like to know if I =wanted to make a speedometer is a Cog with method below less accurate than a Timer IC ?
I enjoyed the artical thanks Jeff.
PUB GoodTimeCount
dT := clkfreq/60
T := cnt
repeat
T += dT
waitcnt(T)
seconds++
millisec := seconds/100
That depends. However, using just the timer IC actually saves a COG and the memory space - the audio buffers are somewhat huge so it's best to be a bit conservative.
How accurate is a COG? It depends on how accurate is the input clock (crystal or MEMS oscillator or just the plain crystal) and how clean is the PLL power input. (decoupling capacitor's extremely important!!!)
With TCXO (temperature-compensated Crystal Oscillator) or TCMO (Temperature-compensated MEMS oscillator), and pretty good decoupling and filtering, it can be extremely accurate, 1 part: 80 in 80 million Hertzs core frequency.
oK, THANKS Doc for the info. For my purposes I am not sure I will ever have to worry about using up a Cog, this gets mentioned a great deal. For me. if I have a Cog ill use it. thanksagain.
Comments
Paul
what puts up the hurdle a lot is the housing of the propeller-chip.
I agree with a DIP40-hosing it would look a bit less cooler but it would be MUCH easier to build
best regards
Stefan
I enjoyed the artical thanks Jeff.
PUB GoodTimeCount
dT := clkfreq/60
T := cnt
repeat
T += dT
waitcnt(T)
seconds++
millisec := seconds/100
How accurate is a COG? It depends on how accurate is the input clock (crystal or MEMS oscillator or just the plain crystal) and how clean is the PLL power input. (decoupling capacitor's extremely important!!!)
With TCXO (temperature-compensated Crystal Oscillator) or TCMO (Temperature-compensated MEMS oscillator), and pretty good decoupling and filtering, it can be extremely accurate, 1 part: 80 in 80 million Hertzs core frequency.
And, you're welcome, mickal.