8052所能测的最高频率
下面一段话是在网上摘录下来的,开了之后终于解开了我的频率计为何不能准确的测480KHz以上的信号了。
The 8052 microcontroller has internal timers (T0, T1, and T2 if you are using an 8052), but they are limited to the speed of your microcontroller, which is in turn limited to the speed of your crystal. If you have a standard Intel 8052 running with a 12MHZ crystal, your timers will be incremented 1,000,000 times per second (1MHZ). Since you are counting high/low transitions and the source must remain high or low for at least one cycle, the theoretical maximum resolution for such a configuration would be 500,000 (500Khz). Tricks and external components may be used to measure higher frequency events.
如果8052单片机的晶振频率为12MHz的话,那么计数器最大计数为1MHz,但是由于8052单片机在测频率的时候,至少需要两个时钟周期,理论上所能测得频率的最高至为500Khz.
难怪我改了定时器的定时时间为10ms,都不济于事,本以为是计数器变量溢出了,那就把1s改为10ms,那不就不会溢出了,结果还是不行,看了看网上的资料,终于明白了,若真要测480KHz的信号,那就只能拿个频率更高的晶振了。。
不知这样的理解是否合理,还望各位多多指点。