嗨,输入捕捉模块,和定时器为它选择,一起工作!当捕获触发发生时,输入捕获模块记录定时器值的“快照”。可能有一些不同的可用模式,但是对于基本情况来说,计时器将继续运行,而不管捕获事件。您使用定时器中断和捕获值的设计都是明智的。当定时中断和捕获中断被同时触发或非常接近时,仍然可能有一些情况引起混乱。在消息1中的示例情况下,输入捕获寄存器将捕获值65000并保持该值,即使在提姆之前未处理来自捕获模块的中断。呃已经翻滚了。在ISR中测试中断标志和调用中断处理函数的顺序可能会有所不同。输入捕获寄存器将保持值不变,直到下一个捕获事件。一些PIC设备在硬件中有一个FIFO缓冲器,具有2个或更多捕获值。这可能是有用的,当试图测量短脉冲。这个问题是在DSIC33william hill官网
中发布的。所有的DSIC33设备都有16位定时器,主要是在32位模式下使用两个定时器的能力,但是许多DSIC3F设备不可能做32位捕获。这使得一些特殊情况对程序员来说是一个挑战,就像在软件中计算计时器中断一样。迈西尔
以上来自于百度翻译
以下为原文
Hi,
Input Capture module, and the timer that is selected for it, work together!
The Input Capture module record a 'snapshot' of the Timer value, when the capture trigger happen.
There may be some different modes available, but for the basic case, Timer shall continue running regardless of capture events.
Your design of using both Timer interrupts, and Capture values is sensible.
There may still be some cases causing confusion, when Timer interrupt and Capture interrupt are triggered at same time, or very close.
In the example case in message #1, Input Capture register will catch value 65000 and keep that, even if interrupt from capture module isn't processed before the Timer have rolled over.
Sequence of testing interrupt flags, and calling interrupt handling functions in ISR, may make a difference.
Input Capture register will keep the value unchanged, until the next capture event.
Some PIC devices have a FIFO buffer, in hardware, with 2 or more capture values. This may be useful when trying to measure short pulses. (shorter than time used by your interrupt processing).
This question is posted in dsPIC33F forum.
All dsPIC33 devices have 16 bit timers, mostly with some ability to use two timers together in 32 bit mode,
but many dsPIC33F devices do not have a possibility to do 32 bit capture. This leave some of the special cases as challenges to the programmer, same as when counting timer interrupts in software.
Mysil
嗨,输入捕捉模块,和定时器为它选择,一起工作!当捕获触发发生时,输入捕获模块记录定时器值的“快照”。可能有一些不同的可用模式,但是对于基本情况来说,计时器将继续运行,而不管捕获事件。您使用定时器中断和捕获值的设计都是明智的。当定时中断和捕获中断被同时触发或非常接近时,仍然可能有一些情况引起混乱。在消息1中的示例情况下,输入捕获寄存器将捕获值65000并保持该值,即使在提姆之前未处理来自捕获模块的中断。呃已经翻滚了。在ISR中测试中断标志和调用中断处理函数的顺序可能会有所不同。输入捕获寄存器将保持值不变,直到下一个捕获事件。一些PIC设备在硬件中有一个FIFO缓冲器,具有2个或更多捕获值。这可能是有用的,当试图测量短脉冲。这个问题是在DSIC33william hill官网
中发布的。所有的DSIC33设备都有16位定时器,主要是在32位模式下使用两个定时器的能力,但是许多DSIC3F设备不可能做32位捕获。这使得一些特殊情况对程序员来说是一个挑战,就像在软件中计算计时器中断一样。迈西尔
以上来自于百度翻译
以下为原文
Hi,
Input Capture module, and the timer that is selected for it, work together!
The Input Capture module record a 'snapshot' of the Timer value, when the capture trigger happen.
There may be some different modes available, but for the basic case, Timer shall continue running regardless of capture events.
Your design of using both Timer interrupts, and Capture values is sensible.
There may still be some cases causing confusion, when Timer interrupt and Capture interrupt are triggered at same time, or very close.
In the example case in message #1, Input Capture register will catch value 65000 and keep that, even if interrupt from capture module isn't processed before the Timer have rolled over.
Sequence of testing interrupt flags, and calling interrupt handling functions in ISR, may make a difference.
Input Capture register will keep the value unchanged, until the next capture event.
Some PIC devices have a FIFO buffer, in hardware, with 2 or more capture values. This may be useful when trying to measure short pulses. (shorter than time used by your interrupt processing).
This question is posted in dsPIC33F forum.
All dsPIC33 devices have 16 bit timers, mostly with some ability to use two timers together in 32 bit mode,
but many dsPIC33F devices do not have a possibility to do 32 bit capture. This leave some of the special cases as challenges to the programmer, same as when counting timer interrupts in software.
Mysil
举报