Searching \ for '[PIC]: Building a "counter" w/PIC16F628' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/time.htm?key=count
Search entire site for: 'Building a "counter" w/PIC16F628'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Building a "counter" w/PIC16F628'
2001\08\09@162447 by Dan Michaels

flavicon
face
Bob.A wrote:
>Mike,
>
>In many respects the F628 is just a better F84. There have already been a
>few threads on the gotcha's when subbing the former for the latter.
>
..........
>> place....  Anyways, I've been gearing up for quite some time on a project
>> that will use a digital frequency readout.  I've seen alot of existing
>> plans/code  for frequency counters with displays that use pre-scalers.
.......


Mike, the biggest advantage of the new 'F628 over the old '84 is
the presence of Timer1, which can be used for external counting with
16-bit resolution. The '84 contains only 8-bit Timer0, which can
be used in conjunction with the prescaler to do 16-bit counts,
but you have to play some games to do it. See Mchp appnote AN592.

With the 'F628, Timer1 in conjunction with the prescaler can give
you much more range and resolution.

However, if you look in the datasheet for the 'F628, Table 17-7,
you will find info that is almost totally inscrutable. It indicates
that Timer1 will count to about 16 mhz, 1/60nsec, in aynchronous
mode. In fact, when using the prescaler, it will count much faster
than this. Personally, I think the datasheet is wrong, and the
prescaler can go at least 50 mhz, 1/20nsec, like for Timer0.

At any rate, if you use an external prescaler ahead of the PIC,
you can really fly. I use a 74AC74 [which is good to ~180 mhz,
IIRC] in one app, and count to over 120 mhz.

- dan michaels
http://www.oricomtech.com
==========================

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2001\08\09@195432 by Mike Kendall

flavicon
face
Dan,
     On the 74AC74 [which is good to ~180 mhz,
> IIRC], how far down can you count using the pre-scaler?  I was advised
that many prescalers do not count down very low because of capacitance
effects internal to the prescaler itself.  If this is the case, my immediate
thought is to have the prescaler switch in at a specified frequency, sort of
a low and high range.  The program would of course have to account for the
prescaler being present on some frequencies and not present on others.  In
my app, there will be different ranges and higher range could be toggled in
with a switch allowing the prescaler to be used.  Has anyone done this, or
is  there a need for this?
Regards,
Mike
{Original Message removed}

2001\08\10@104844 by Dan Michaels

flavicon
face
At 06:59 PM 8/9/01 -0000, you wrote:
>Dan,
>      On the 74AC74 [which is good to ~180 mhz,
>> IIRC], how far down can you count using the pre-scaler?  I was advised
>that many prescalers do not count down very low because of capacitance
>effects internal to the prescaler itself.
..........


The 74AC74 is just a flip-flop - I hooked up 2 stages to get /4.
This allowed me to count to 4x over what Timer1 could take directly.
The prescaler I was referring to is the one in the PIC, ahead of
Timer1. For commercial prescalers [external chips], you will have
to check the particular specs.

Most fast parts have a problem with slow input transitions - when
the slow signal is passing thru the threshold voltage, noise
riding on the signal will lead to false triggering, but you can
add hysteresis or use a schimt trigger part [eg, 74AC14] to deal
with this. If you want Mostly, I have been talking about counting
"digital" pulses. If you want your counter to deal with analog
signals, that is an entirely different breed of animal. [in
which case you might want to spend $99, and buy one off the
shelf].

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\08\10@114440 by Dan Michaels

flavicon
face
Mike,

The problem here is you are not simply dipping a grid, you
are interfacing a 200+ Mhz tiny RF signal to a digital chip.
That is why I mentioned the real crux of this project is in
"RF design/layout/matching/amplification/sensing/etc" - taking
that tiny signal and converting successfully to 0-5v.

Once you have picked up and amplified the "sine", then you
can use an analog prescaler and/or schmitt trigger to square
up for presentation to the PIC. The PIC can probably accept a
sinewave ok, as long as it is large enough [about +/-2v], shifted
into the range 0-5v, and slews fast enough so that noise doesn't
cause false counts.

AN592 talks about using Timer0 of the '84 for counting. I mentioned
it mainly for reference. The '628 is probably too new to find much
specifically about using it. However, the Timer1 module is the same
as on the '74/'76/'77/'874/'876/'877, so you can look at those
chips.

Also, I don't know anything about the el cheapo programmer and
the '628. Again, the '628 is so new, not everything out there
supports it.

- dan
===============


At 10:43 PM 8/9/01 -0000, you wrote:
{Quote hidden}

>{Original Message removed}

2001\08\10@195647 by Larry Williams

flavicon
face
If you need a decent freq counter, check radio shack. They have on that is discontinued and is now reduced down to $49.95.  I bought one just because it was cheap( even cheaper since my wife gets 25% off) and today it got its first use on top of a 380 foot tower checking freqs in a tower top microwave transceiver.  Good to either 1.3 or 1.6 ghz. Don't remember for sure. Has seperate switch position for ttl level / rf
{Quote hidden}

> >{Original Message removed}

2001\08\11@110602 by John Ferrell

flavicon
face
Not on the web site...
I would have to take that one too!

John Ferrell
6241 Phillippi Rd
Julian NC 27283
Phone: (336)685-9606
Dixie Competition Products
NSRCA 479 AMA 4190  W8CCW
"My Competition is Not My Enemy"



{Original Message removed}

2001\08\11@222545 by Larry Williams

flavicon
face
Every store had at least one or two in stock. Check the local store.
They can tell you how many are at which stores any where in the country.
One of the guys at work wanted one after seeing mine and every store in
town still had one except the store where she worked. stock number
22-306

John Ferrell wrote:
{Quote hidden}

> {Original Message removed}

2001\08\14@235728 by Andrew E. Kalman

flavicon
face
Re:

>If you need a decent freq counter, check radio shack. They have on
>that is discontinued and is now reduced down to $49.95.  I bought
>one just because it was cheap( even cheaper since my wife gets 25%
>off) and today it got its first use on top of a 380 foot tower
>checking freqs in a tower top microwave transceiver.  Good to either
>1.3 or 1.6 ghz. Don't remember for sure. Has seperate switch
>position for ttl level / rf

Thanks for this heads-up. After buying one and testing it against our
SRS DS345, I went ahead and bought two more -- a nice unit, to say
the least.
--

 ______________________________________
  Andrew E. Kalman, Ph.D.   .....aekKILLspamspam.....pumpkininc.com

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...