EasyManua.ls Logo

ST ST10F276E - Figure 80. Core Timer T3 in Incremental Interface Mode; Table 36. GPT1 Core Timer T3 (Incremental Interface Mode) Input Edge Selection

ST ST10F276E
564 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
The general purpose timer units UM0404
222/564 DocID13284 Rev 2
To ensure that a transition of the count input signal which is applied to T3IN is correctly
recognized, its level should be held high or low for at least 8 CPU clock cycles before it
changes.
Timer 3 in incremental interface mode
Incremental interface mode for the core timer T3 is selected by setting bit-field T3M in
register T3CON to ‘110b’. In incremental interface mode the two inputs associated with timer
T3 (T3IN T3EUD) are used to interface to an incremental encoder. T3 is clocked by each
transition on one or both of the external input pins which gives 2-fold or 4-fold resolution to
the encoder input
(see
Figure 4 on page 41
)
.
Bit-field T3I in control register T3CON selects the triggering transitions (see
Table 36). In this
mode the sequence of the transitions of the two input signals is evaluated and generates
count pulses as well as the direction signal.
So T3 is modified automatically according to the speed and the direction of the incremental
encoder and its contents, therefore, always represent the encoder’s current position.
The incremental encoder can be connected directly to the MCU without external interface
logic. In a standard system, however, comparators will be employed to convert the
encoder’s differential outputs (as A and A
) to digital signals (as A) digital signals. This
greatly increases noise immunity.
The third encoder output ‘T0 T0
’ which indicates the mechanical zero position, may be
connected to an external interrupt input and trigger a reset timer T3 (for example, via PEC
transfer from ZEROS)
(see Figure 81)
.
Figure 80. Core timer T3 in incremental interface mode
Table 36. GPT1 core timer T3 (incremental interface mode) input edge selection
T3I Triggering Edge for Counter Increment/Decrement
000 None. Counter stops
001 Any transition (rising or falling edge) on T3IN
010 Any transition (rising or falling edge) on T3EUD
011 Any transition (rising or falling edge) on T3 input (T3IN or T3EUD)
1XX Reserved. Do not use this combination
edge detect
phase detect
T3
MUX
T3IR
T3OTL
T3R
T3OUT
T3OE
XOR
Up/Down
T3UD
T3EUD
T3IN
P3.6
P3.4
P3.3

Table of Contents

Related product manuals