DPRG
DPRG List  



[DPRG] Frequency Counter Question

Subject: [DPRG] Frequency Counter Question
From: Earl Bollinger earlwbollinger at comcast.net
Date: Sun Sep 28 22:02:01 CDT 2003

I think I've been messing with this too much and need to step back for a
while and take a break.

But anyway. I have a MCU hooked up to a couple of SN74HC590 binary
counter IC's that are connected to that they can count up to 65535
counts (255x255).
If I feed a digital signal into them at say One MHZ for example and I
start and stop the counters for 10 milliseconds, about what should the
count in the counters be? 
I would assume that if we have 1us = 1 count, then 10us = 10 counts,
100us = 100 counts, 1000us (1 msec) = 1000 counts, and 10ms should =
10000 counts.
Then 2mhz should have a count of 20,000 and 100khz should have a count
of 1,000.
But then the big question is....
Does this sound right or have I gone insane at the moment?
I amgetting something like 49,652 for a count at 1mhz (really really
close though something like 1.00034565mhz). Maybe I have the timers set
wrong.
Or do I?

What I am doing? I built up a spiffy little homemade 5hz to 20mhz
function generator (using a Dallas MAX038 chip) so I could play with
some ceramic piezo transducers (you know the 100khz to 3.5mhz ones).
Then I figured it would be neat to have the function generator with it's
own frequency counter built in as well. Makes it easier to dial in
different frequencies. Thus I hooked up a couple of 590 binary counters
to a Atmel 8535 MCU running at 8mhz. Then I take one of the timers and
set it to go on and off for a predetermined time, such as 10ms, and let
the counters go and count the clocks from the function generator. I am
also using a serial LCD unit with one of those nifty Sharp 40x2 LCD
backlight panels, that has yellow green characters, that you can see for
a lot of different angles.

Anyway there is a guy on the internet at
http://www.myplace.nu/avr/countermeasures/index.htm that did pretty much
the same thing, except he used a Atmel 2313 MCU with LED digits. But in
his circuit he is basing his count on 4096 (which seems odd, since you
can setup a timer for things like 10ms, 100ms, etc). But then he takes
the count and converts it to BCD and then displays it, which doesn't
make any sense to me.

Thanks for ay hints,
Earl




More information about the DPRG mailing list