本,
你所附的项目被修改了。所做的更改如下:
1)时钟设置为1兆赫
2)周期设置为10000
3)定时器分辨率设置为16位
4)增加了一个ISR组件,它连接到计时器组件的CAPUTIOXOUT终端。
操作:
1)当触发CopTraceOUT时,在ISR中设置标志并将定时器计数重置为10000。
2)在主要功能中,标志被标记。如果设置,则读取捕获值。
3)由于定时器是向下计数器,从10000减去捕获值,以在微秒(时钟为1 MHz)获得测量周期。
4)测量值显示在LCD上,标志被重置。
在这种情况下可以测量的最大周期是10000 US(100Hz信号)。
该项目是附加的。
当做
频率测量
256.5 K
以上来自于百度翻译
以下为原文
Ben,
The project you had attached is modified. The changes done are as follows:
1) The clock is set to 1 MHz
2) The period is set to 10000
3) The Timer resolution is set to 16 bits
4) An ISR Component is added which is connected to the capture_out terminal of the Timer component.
Operation:
1) A flag is set and Timer Count is reset to 10000 in the ISR when the capture_out is triggered.
2) In the main function, the flag is plooed. If set, then the captured value is read.
3) Since the Timer is a down counter, the captured value is subtracted from 10000 to obtain the measured period in micro seconds (as the clock is 1 MHz).
4) The measured value is displayed on LCD and the Flag is reset.
The max period that can be measured in this case is 10,000uS (100Hz signal).
The project is attached.
Regards
本,
你所附的项目被修改了。所做的更改如下:
1)时钟设置为1兆赫
2)周期设置为10000
3)定时器分辨率设置为16位
4)增加了一个ISR组件,它连接到计时器组件的CAPUTIOXOUT终端。
操作:
1)当触发CopTraceOUT时,在ISR中设置标志并将定时器计数重置为10000。
2)在主要功能中,标志被标记。如果设置,则读取捕获值。
3)由于定时器是向下计数器,从10000减去捕获值,以在微秒(时钟为1 MHz)获得测量周期。
4)测量值显示在LCD上,标志被重置。
在这种情况下可以测量的最大周期是10000 US(100Hz信号)。
该项目是附加的。
当做
频率测量
256.5 K
以上来自于百度翻译
以下为原文
Ben,
The project you had attached is modified. The changes done are as follows:
1) The clock is set to 1 MHz
2) The period is set to 10000
3) The Timer resolution is set to 16 bits
4) An ISR Component is added which is connected to the capture_out terminal of the Timer component.
Operation:
1) A flag is set and Timer Count is reset to 10000 in the ISR when the capture_out is triggered.
2) In the main function, the flag is plooed. If set, then the captured value is read.
3) Since the Timer is a down counter, the captured value is subtracted from 10000 to obtain the measured period in micro seconds (as the clock is 1 MHz).
4) The measured value is displayed on LCD and the Flag is reset.
The max period that can be measured in this case is 10,000uS (100Hz signal).
The project is attached.
Regards
举报