| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
PIC18F4331 Datasheet(PDF) 175 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC18F4331 Datasheet(HTML) 175 Page - Microchip Technology |
|
175 / 396 page ![]() 2003 Microchip Technology Inc. Preliminary DS39616B-page 173 PIC18F2331/2431/4331/4431 16.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 (QEIM2:QEIM0 = 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 (QEIM2:QEIM0 = 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 16-10) If the encoder is traveling in the reverse direction and the value of POSCNT reaches 00h, POSCNT is loaded with the contents of MAXCNT register on the next clock edge. An interrupt event is triggered on the next TCY after the load operation (see Figure 16-10). The value of the position counter is not affected during QEI mode changes, nor when the QEI is disabled altogether. 16.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 (QEIM2:QEIM0 = 010 or 110) • A POSCNT rollover (FFFFh to 0000h) in Period mode only (QEIM2:QEIM0 = 010 or 110) • An index pulse detected on INDX. The interrupt timing diagrams for IC2QEIF are shown in Figure 16-10 and Figure 16-11. When the direction has changed, the direction change Interrupt flag (IC3DRIF) is set on the following TCY clock (see Figure 16-10). If the position counter rolls over in Index mode, the ERROR bit will be set. 16.2.5 QEI SAMPLE TIMING The quadrature input signals, QEA and QEB, may vary in quadrature frequency. The minimum quadrature input period TQEI is 16TCY. The position count rate, FPOS, is directly proportional to the rotor’s RPM, line count D and QEI Update mode (x2 vs. x4); that is, The maximum position count rate (i.e., 4x QEI Update mode, D = 1024) with FCY = 10 MIPS is equal to 2.5 MHz, which corresponds to FQEI of 625 kHz. Figure 16-9 shows QEA and QEB quadrature inputs 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. F POS 4D RPM ⋅ 60 ------------------------ = |
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes All Rights Reserved©Alldatasheet.com |
| 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 |