首页|嵌入式系统|显示技术|模拟IC/电源|元件与制造|其他IC/制程|消费类电子|无线/通信|汽车电子|工业控制|医疗电子|测试测量
首页 > 分享下载 > 测试测量 > 使用PIC16C5X的频率计数器

使用PIC16C5X的频率计数器

资料介绍
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 specified to be 10 ns, so the fastest clock
rate the TMR0 can count is 50 MHz. The prescaler must
be used when measuring high frequency. Since the
prescaler can be configured as a divide by 256 counter,
the maximum resolution at which the input frequency
can be measured is 16-bits. However, the prescaler
cannot be directly read like a file register. This applica-
tion note depicts a unique method by which the user
can “extract” the 8-bit value in the prescaler, whereby
the resolution of the measurement is 16-bits with the
high 8-bits in TMR0 and the low 8-bits in the prescaler.
AN592
Frequency Counter Using PIC16C5X
TMR0 is congured to measure the input frequency, at
Author: Stan D’Souza T0CKI of the PIC16C54. The input frequency is “gated”
Microchip Technology Inc. for a precise duration of time. Before starting this pre-
cise “gate”, TMR0 is cleared (which also clears the
INTRODUCTION prescaler), and the RA2 pin is congured as an input.
The precise “gate” is
使用PIC16C5X的频率计数器
本地下载

评论