Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: Timer as counter...

2006-05-25 by brendanmurphy37

--- In lpc2000@yahoogroups.com, Mukund Deshmukh <betacomp_ngp@...> 
wrote:
> Well, my plan was to use the timer at 0.9 mil sec (max freq being 
1Khz), and
> average out the reading at 100 mil sec, so that I don't over flow 
the 8 bit
> counter.

Why not use 32-bit counters? 

If you use a 5 kHz timer, you can easily count both phase changes, 
with plenty of safety margin for a maximum 1 kHz signal.

Every 500 interrupts (i.e. 100 ms) the frequency of each channel is 
then:

F = (c / 2 * 10) or F = c * 5

where F is frequency in Hz, c is count of phase changes in the last 
100 ms period.

Brendan

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.