PIC18F2331 MICROCHIP [Microchip Technology], PIC18F2331 Datasheet - Page 177

no-image

PIC18F2331

Manufacturer Part Number
PIC18F2331
Description
28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High Performance PWM and A/D
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F2331-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F2331-I/SP
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
FIGURE 16-11:
16.2.6
The velocity pulse generator, in conjunction with the
IC1 and the synchronous TMR5 (in synchronous
operation), provides a method for high accuracy speed
measurements at both low and high mechanical motor
speeds. The Velocity mode is enabled when the VELM
bit is cleared (= 0) and QEI is set to one of its operating
modes (see Table 16-6).
To optimize register space, the input capture channel
one (IC1) is used to capture TMR5 counter values.
Input capture buffer register, CAP1BUF, is redefined in
Velocity Measurement mode, VELM = 0, as the
Velocity Register buffer (VREGH, VREGL).
 2003 Microchip Technology Inc.
Note 1: POSCNT register is shown in QEI x4 Update mode (POSCNT increments on every rising and every falling edge of
2: When INDX Reset pulse is detected, POSCNT is reset to ‘
3: IC2QEI is enabled for one T
4: Position counter is loaded with ‘0000h’ (i.e., Reset) on the next QEA or QEB edge when INDX is high.
5: Position counter is loaded with MAXCNT value (e.g., 1527h) on the next QEA or QEB edge following the INDX
6: IC2QEIF must be cleared in software.
QEA
QEB
count (+/-)
POSCNT
MAXCNT
INDX
IC2QEIF
UP/DOWN
VELOCITY MEASUREMENT
Position
counter load
QEA and QEB input signals)
MAXCNT when POSCNT = 0 (when decrementing), which occurs on the next QEA or QEB edge. Similar Reset
sequence occurs for the reverse direction except that the INDX signal is recognized on its falling edge. The Reset
is generated on the next QEA or QEB edge.
falling edge input signal detect).
(1)
QEI MODULE RESET TIMING WITH THE INDEX INPUT
+1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1
MAXCNT=1527
CY
Note 2
Q1
Q4
clock cycle.
Forward
(4)
(3)
PIC18F2331/2431/4331/4431
Note 6
Preliminary
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
Note 2
Q1
TABLE 16-6:
Q4
QEIM<2:0>
(5)
0
(3)
’ on the next QEA or QEB edge. POSCNT is set to
001
010
101
110
Reverse
x2 Velocity Event mode. The velocity
pulse is generated on every QEA
edge.
x4 Velocity Event mode. The velocity
pulse is generated on every QEA and
QEB active edge.
VELOCITY PULSES
Velocity Event Mode
DS39616B-page 175

Related parts for PIC18F2331