Pulse Output Mode - Renesas M16C FAMILY Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C FAMILY:
Table of Contents

Advertisement

Under development
Preliminary specification
Specifications in this manual are tentative and subject to change.
R8C/11 Group

12.1.2 Pulse Output Mode

In this mode, the timer counts an internally generated count source, and outputs from the CNTR0 pin
a pulse whose polarity is inverted each time the timer underflows (See "Table 12.3 Pulse Output mode
Specifications"). Figure 12.5 shows TXMR register in pulse output mode.
Table 12.3 Pulse Output Mode Specifications
Item
Count source
Count operation
Divide ratio
Count start condition
Count stop condition
Interrupt request
generation timing
INT1/CNTR
pin function
0
CNTR
pin function
0
Read from timer
Write to timer
Select function
Timer X mode register
b7 b6 b5 b4 b3 b2 b1 b0
0
0
0
Notes:
1. The IR bit in the INT1IC register may be set to "1" (interrupt requested) when the R0EDG bit is rewritten.
Refer to the paragraph 19.2.5 "Changing Interrupt Source" in the Usage Notes Reference Book.
Figure 12.5 TXMR Register in Pulse Output Mode
Rev.0.91
2003 Sep 08
f
, f
, f
, f
1
2
8
32
• Down-count
• When the timer underflows, it reloads the reload register contents before continuing counting
1/(n+1)(m+1)
n: set value of PREX register, m: set value of TX register
Write "1" (count start) to TXS bit in TXMR register
Write "0" (count stop) to TXS bit in TXMR register
• When Timer X underflows [Timer X interruption]
• Rising (R0EDG=0) or falling (R0EDG=1) of CNTR
Pulse output
Programmable I/O port or inverted output of CNTR
Count value can be read by reading TX register.
Same applies to PREX register.
Value written to TX register is written to both reload register and counter.
Same applies to PREX register.
• Inverted pulse output function
The polarity of CNTR0 output pulse can be reversed with TXOCNT bit
_____
• INT1/CNTR
polarity switching function
0
Polarity level at starting of pulse output can be selected with R0EDG bit
Symbol
TXMR
0 1
Bit symbol
Bit name
TXMOD0
Operation mode
select bit 0, 1
TXMOD1
INT1/CNTR
R0EDG
switching bit
Timer X count
TXS
start flag
P3
/CNTR
0
TXOCNT
select bit
TXMOD2
Must set to "0" in pulse output mode
TXEDG
Must set to "0" in pulse output mode
TXUND
Must set to "0" in pulse output mode
page 74 of 184
Specification
Address
After reset
008B
00
16
16
Function
b1 b0
0 1 : Pulse output mode
polarity
0: CNTR
output starts at "H"
0
0
1
1: CNTR
output starts at "L"
0
0 : Stops counting
1 : Starts counting
0 : Port P3
0
0
1 : CNTR
output
0
12.1 Timer (Timer X)
output [INT1 interrupt]
0
0
RW
RW
RW
RW
RW
RW
RW
RW
RW

Advertisement

Table of Contents
loading

This manual is also suitable for:

R8c seriesTiny series

Table of Contents