29.01.2013 Views

uPD780065 Subseries PUM - Renesas Electronics

uPD780065 Subseries PUM - Renesas Electronics

uPD780065 Subseries PUM - Renesas Electronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

122<br />

CHAPTER 6 16-BIT TIMER/EVENT COUNTER<br />

Figure 6-18. Timing of Pulse Width Measurement Operation by Free-Running Counter<br />

and Two Capture Registers (with Rising Edge Specified)<br />

Count clock<br />

TM0 count value<br />

TI00 pin input<br />

CR01 capture value<br />

CR00 capture value<br />

INTTM01<br />

OVF0<br />

t<br />

0000H 0001H D0 D0 + 1 D1 D1 + 1 FFFFH 0000H D2 D2 + 1 D3<br />

D0<br />

(4) Pulse width measurement by means of restart<br />

When input of a valid edge to the TI00/TO0/P20 pin is detected, the count value of 16-bit timer/counter 0 (TM0)<br />

is taken into 16-bit timer capture/compare register 01 (CR01), and then the pulse width of the signal input to the<br />

TI00/TO0/P20 pin is measured by clearing TM0 and restarting the count (see register settings in Figure 6-19).<br />

The edge specification can be selected from two types, rising and falling edges by bits 4 and 5 (ES00 and ES01)<br />

of the prescaler mode resister 0 (PRM0).<br />

In a valid edge detection, the sampling is performed by a cycle selected by the prescaler mode resistor 0 (PRM0)<br />

and a capture operation is only performed when a valid level is detected twice, thus eliminating noise with a short<br />

pulse width.<br />

Caution If the valid edge of TI00/TO0/P20 pin is specified to be both rising and falling edges, 16-bit<br />

capture/compare register 00 (CR00) cannot perform the capture operation.<br />

Preliminary User’s Manual U13420EJ2V0UM00<br />

D1 D3<br />

(D1 – D0) × t (10000H – D1 + D2) × t<br />

(D3 – D2) × t<br />

D2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!