Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how may I calculate the maximum frequency

Status
Not open for further replies.

micropad

Member
Dear All
Please kindly teach me how may I calculate the maximum frequency that can be count using Timer0 and Timer1 in Counter mode (Timer1 in Asynchronous Counter mode)
Any equation highly appreciated
PIC is 16f877a
Thanks in advance
 
hello

I allready made some test for frequency counter.
I get a pratical limit near from 30Mhz with a PIC16F84 at 4Mhz clock.
The maximum is reached by using internal prescaler of Tmr0 with is 1/256.
theoritical limit is 10+10nS => witch gives 50Mhz
read my notes .. sorry some parts in french.

By adding special divider circuit as MB506 you can multiply by 256 this limit (in theory).
I tested it sucessfuly at 64MHz on a breadboard !!!
I have to do a clean and serious printed board to test it at 1GHz.



;Using TMR0 with External Clock
;paragraph 6.2 specsheet DS30430C page 29
;Therefore, it is necessary for T0CKI to have a
;period of at least 4Tosc (plus a small RC delay) divided
;by the prescaler value. The only requirement on T0CKI
;high and low time is that they do not violate the
;minimum pulse width requirement of 10 ns.
;
;parameter 40 High pulse width 30nS
;parameter 41 Low pulse width 20nS
;parameter 42 periode (Tcy+40)/N N=prescaler
; La valeur du quartz intervient beaucoup sur la periode mini (42)
; si Q=4Mhz avec Tcy= 4/Fosc=> 1µS
; periode mini = (1000+40)/256= ~4nS soit 250Mhz
; si Q=20Mhz periode mini (200 + 40)/256 => < 1nS ! 1Ghz!? pas glop,il y a VIOL!
; En se basant sur les limites (40 et 41)etat H=30ns + etat L=20ns => periode 50nS
; => 20Mhz ! TRES PLAUSIBLE puisque reellement mesuré (avec quartz de 4Mhz)
; En se basant sur les limites absolues (antiviol!) de 10 + 10 ns=> 20nS
; => 50Mhz, ce qui est decrit dans la note ci-dessous

; note microchip AN592.pdf
;The PIC16C5X has one 8-bit timer (Timer0), which can be used with
;an 8-bit prescaler. The prescaler runs asynchronously, hence it can
;count a very high frequency. The minimum rise and fall times of the input
;frequency are speci?ed to be 10 ns, so the fastest clock rate the TMR0
;can count is 50 MHz.
 
Status
Not open for further replies.

Latest threads

Back
Top