7979 views|13 replies

49

Posts

0

Resources
The OP

What is the difference between 430 timer capture and compare? [Copy link]

What is the difference between 430 timer capture and compare?
This post is from Microcontroller MCU

Latest reply

Top post, well said :)  Details Published on 2016-9-18 16:33

5001

Posts

11

Resources
2
Capture simply means capturing the count value at the time of an event. For example, when measuring the period of a square wave, the count values corresponding to the two rising edges will be captured. Comparison is to compare the value of the counter with the value of the comparison register, which is generally used for PWM output.
This post is from Microcontroller MCU

Comments

Can it be understood like this: Capture is when the event occurs (such as a jump), and then the count value at the time of the event is recorded. Compare is to set the value in the register first, and then compare the counter value with the value in the register, similar to the timer initial value setting of the 51 microcontroller?  Details Published on 2013-8-5 10:17
Personal signature《MCU工程师炼成记》作者之一

49

Posts

0

Resources
3
Can it be understood like this: Capture is when the event occurs (such as a jump), and then the count value at the time of the event is recorded. Compare is to set the value in the register first, and then compare the value of the counter with the value in the register, similar to the initial value setting of the timer of the 51 microcontroller?
This post is from Microcontroller MCU

Comments

Yes, absolutely correct.  Details Published on 2013-8-5 12:46

4002

Posts

0

Resources
4
Yes, absolutely correct.
This post is from Microcontroller MCU

Comments

Then, do we need to subtract the two jump values recorded in the capture by software to get the pulse width of the test?  Details Published on 2013-8-5 13:27

49

Posts

0

Resources
5
Then, do we need to subtract the two jump values recorded in the capture by software to get the pulse width of the test?
This post is from Microcontroller MCU

Comments

Counting is a periodic cycle. When it reaches a certain value, it will be 0 (such as one-way). Therefore, the result of simple subtraction is the signed value of the difference. Assume that T1 comes first and T2 comes later if (T2>T1) xxx=T2-T1; else xxx=T2+period-T1;  Details Published on 2013-8-5 14:08

4002

Posts

0

Resources
6
Counting is a periodic cycle. When it reaches a certain value, it will be 0 (such as one-way). Therefore, the result of simple subtraction is the signed value of the difference. Assume that T1 comes first and T2 comes later if (T2>T1) xxx=T2-T1; else xxx=T2+period-T1;
This post is from Microcontroller MCU

Comments

Will it be like this: the pulse width is relatively long, first the T1 counter cycles twice and then T2.  Details Published on 2013-8-5 14:32
Will it be like this: the pulse width is relatively long, first the T1 counter cycles twice and then T2.  Details Published on 2013-8-5 14:31

49

Posts

0

Resources
7
Will it be like this: the pulse width is relatively long, first the T1 counter cycles twice and then T2.
This post is from Microcontroller MCU

49

Posts

0

Resources
8
How to determine how many times the counter has cycled
This post is from Microcontroller MCU

Comments

It is possible. The maximum count value is 65535. The 72 MHz main frequency is no more than 1ms. If it is not large enough, period = count * 65536 will do. Count is the count when overflow occurs.  Details Published on 2013-8-5 14:54

4002

Posts

0

Resources
9
It is possible. The maximum count value is 65535. The 72 MHz main frequency is no more than 1ms. If it is not large enough, period = count * 65536 will do. Count is the count when overflow occurs.
This post is from Microcontroller MCU

Comments

Oh, that makes sense.  Details Published on 2013-8-5 15:32

49

Posts

0

Resources
10
Oh, that makes sense.
This post is from Microcontroller MCU

4

Posts

0

Resources
11
Learned
This post is from Microcontroller MCU

70

Posts

4

Resources
12
Learned
This post is from Microcontroller MCU

1

Posts

0

Resources
13
I learned something. Thanks.
This post is from Microcontroller MCU

60

Posts

1

Resources
14
Top post, well said :)
This post is from Microcontroller MCU

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

    EEWorld
    subscription
    account

    EEWorld
    service
    account

    Automotive
    development
    circle

    Robot
    development
    community

    Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
    快速回复 返回顶部 Return list