Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

PIC18LF4331 Datasheet(PDF) 164 Page - Microchip Technology

Part # PIC18LF4331
Description  28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High-Performance PWM and A/D
PDF  392 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC18LF4331 Datasheet(HTML) 164 Page - Microchip Technology

Back Button PIC18LF4331 Datasheet HTML 160Page - Microchip Technology PIC18LF4331 Datasheet HTML 161Page - Microchip Technology PIC18LF4331 Datasheet HTML 162Page - Microchip Technology PIC18LF4331 Datasheet HTML 163Page - Microchip Technology PIC18LF4331 Datasheet HTML 164Page - Microchip Technology PIC18LF4331 Datasheet HTML 165Page - Microchip Technology PIC18LF4331 Datasheet HTML 166Page - Microchip Technology PIC18LF4331 Datasheet HTML 167Page - Microchip Technology PIC18LF4331 Datasheet HTML 168Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 164 / 392 page
background image
PIC18F2331/2431/4331/4431
DS39616D-page 164
 2010 Microchip Technology Inc.
17.2.3.3
Reset and Update Events
The position counter will continue to increment or dec-
rement until one of the following events takes place.
The type of event and the direction of rotation when it
happens determines if a register Reset or update
occurs.
1.
An index pulse is detected on the INDX input
(QEIM<2:0> = 001).
If the encoder is traveling in the forward direc-
tion, POSCNT is reset (00h) on the next clock
edge after the index marker, INDX, has been
detected. The position counter resets on the
QEA or QEB edge once the INDX rising edge
has been detected.
If the encoder is traveling in the reverse direc-
tion, the value in the MAXCNT register is loaded
into POSCNT on the next quadrature pulse
edge (QEA or QEB) after the falling edge on
INDX has been detected.
2.
A POSTCNT/MAXCNT period match occurs
(QEIM<2:0> = 010).
If the encoder is traveling in the forward direc-
tion, POSCNT is reset (00h) on the next clock
edge when POSCNT = MAXCNT. An interrupt
event is triggered on the next TCY after the Reset
(see Figure 17-10)
If the encoder is traveling in the reverse
direction and the value of POSCNT reaches
00h, POSCNT is loaded with the contents of the
MAXCNT register on the next clock edge. An
interrupt event is triggered on the next TCY after
the load operation (see Figure 17-10).
The value of the position counter is not affected during
QEI mode changes, nor when the QEI is disabled
altogether.
17.2.4
QEI INTERRUPTS
The position counter interrupt occurs and the interrupt
flag (IC2QEIF) is set, based on the following events:
• A POSCNT/MAXCNT period match event
(QEIM<2:0> = 010 or 110)
• A POSCNT rollover (FFFFh to 0000h) in Period
mode only (QEIM<2:0> = 010 or 110)
• An index pulse detected on INDX
The interrupt timing diagrams for IC2QEIF are shown in
Figure 17-10 and Figure 17-11.
When the direction has changed, the direction change
interrupt flag (IC3DRIF) is set on the following TCY
clock (see Figure 17-10).
If the position counter rolls over in Index mode, the
QERR bit will be set.
17.2.5
QEI SAMPLE TIMING
The quadrature input signals, QEA and QEB, may vary
in quadrature frequency. The minimum quadrature
input period, TQEI, is 16 TCY.
The position count rate, FPOS, is directly proportional to
the rotor’s RPM, line count D and QEI Update mode (x2
versus x4); that is,
EQUATION 17-1:
The maximum position count rate (i.e., x4 QEI
Update mode, D = 1024) with FCY = 10 MIPS is equal
to 2.5 MHz, which corresponds to FQEI of 625 kHz.
Figure 17-9 shows QEA and QEB quadrature input
timing when sampled by the noise filter.
Note:
The number of incremental lines in the
position encoder is typically set at D = 1024
and the QEI Update mode = x4.
FPOS = 4D • RPM
60



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com