Input Capture and output compare

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Input Capture and output compare

5,579 次查看
harshitha_chiga
Contributor II

#What does Input capture and output compare means in the actual world.

In the manual S12XEP100 it was said that -

                                                               Input capture function is to detect the transition edge and

                                                               output compare is to generate output signal.

What I understood was for input capture means generating an interrupt and when entering into the ISR counter is incremented and the data transfer takes place. When the counter reaches the described value it will come out of ISR.

Can you tell me weather my assumption is right or wrong? And explain it if possible!!

Thanks in advance

1 回复

5,051 次查看
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi Harshitha,

You are right partly, the input capture is used to capture a timer value (the timer runs continuously). So, in the interrupt service routine is not need a counter. The output compare is used to compare the selected time base value and it also can be used for generating pulses at a set time and a specified length. The most common use can be generating PWM pulses.

It is necessary to mention the input capture channels are composed of four standard input capture registers and four buffered input capture channels, see the reference manual chapter 14.4.1 Enhanced Capture Timer Modes of Operation.

The input capture is used mainly for the period measurements and pulse measurements. If you need just generate the interrupt an event on an input pin, is not need to use input capture.

I hope it helps you.

Best regards,

Diana