beautypg.com

FUJITSU MB91460 SERIES FR60 User Manual

Page 773

background image

757

Chapter 36 Input Capture

7.Q&A

7.6 How do I measure the pulse width of the input signal?

• "H" Width measurement:

Specify both edges for edge detection.

First detect the rising edge, then detect the falling edge.

Pulse width = {value recorded during falling (input capture register value)

+ “10000h” x Overflow frequency

– value recorded during rising (input capture register value)}

x Count clock width of free-run timer

Example: value recorded during falling = 2320h, Value recorded during rising = A635h,

Overflow frequency = 1, count clock = 125ns

==> pulse width = (2320h+10000h-A635h) x 125ns = 3997.375us

• Cycle measurement:

Specify rising (or falling) for edge detection.

Detect edge 2 times.

Cycle = {Second recorded value (input capture register value)

+ “10000h” x Overflow frequency

– First recorded value (input capture register value)}

x Count clock width of free-run timer