CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Maximum frequency for Timer1 counter for 18F series???

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hello188



Joined: 02 Jun 2010
Posts: 74

View user's profile Send private message

Maximum frequency for Timer1 counter for 18F series???
PostPosted: Wed Aug 22, 2012 7:53 am     Reply with quote

Hi.
I am using counter to measure frequency which reflects some other analog quantity. Because I am using counter, if I make the input frequency range greater, a single bit error caused by the nature of counting pulses will be of less percentage of the whole range.

So, what I would like to know is, where in the datasheet I can find the maximum frequency that the timer1 module can accurately count from T1CKI pin? I looked at the timer1 section and DC characteristics section but could not find it.

Thank you.
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Wed Aug 22, 2012 8:52 am     Reply with quote

I found this in the 18Fxx2 data sheet, (electrical characteristics).

Quote:
Ft1 T1CKI oscillator input frequency range DC 50 kHz

50kHz seems impossibly low to me.

Is it meant to be 50MHz?

All the other 18Fxxx parts quote the same value!

Mike
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Wed Aug 22, 2012 9:25 am     Reply with quote

Unless the input clock circuit is somehow dependent on the system clock for example to sample the input signal. I have run into things like that in the past where the "equivalent circuit" in the data sheet skips some of the important details. If the input to the clock is sampled along the same lines as a UART for example, then it could indeed be a low frequency. On the other hand, maybe they simply copied that part of the data sheet to the next one and nobody has noticed it (yet) :-)

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Wed Aug 22, 2012 10:40 am     Reply with quote

Microchip app note AN592 describes a 50MHz frrequency counter with a PIC16C5x, by feeding the unknown signal into the TMR0 input.

Seems strange that PIC18Fxxxs are limited to 50kHz.

The CCS sample code EX_FREQC.C works into the 10's MHz region with a lowly 16F877!

Mike
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 22, 2012 11:02 am     Reply with quote

You're looking at the wrong parameter. You're looking at the Timer1
oscillator max freq. It's for a watch crystal.

For the external clock max frequency, look at "T1CKI input period".
Then convert that period to a frequency.
gaugeguy



Joined: 05 Apr 2011
Posts: 291

View user's profile Send private message

PostPosted: Wed Aug 22, 2012 11:24 am     Reply with quote

You are confusing the oscillator circuit with the timer input circuit.
If you are connecting an external crystal to the timer 1 oscillator pins you are limited to 50kHz. If you are driving the Timer 1 input with an external signal you can get to 20 ns period (50MHz) with the right clock and precaler.
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Wed Aug 22, 2012 3:07 pm     Reply with quote

Quote:
So, what I would like to know is, where in the datasheet I can find the maximum frequency that the timer1 module can accurately count from T1CKI pin? I looked at the timer1 section and DC characteristics section but could not find it.


It appears the answer to your original question is 50MHz.

All the data regarding high/low periods and oscillator frequency is all in the same table under electrical characteristics.

Mike
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group