Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

PIC18LF4331-E/ML Datasheet(PDF) 168 Page - Microchip Technology

Part # PIC18LF4331-E/ML
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-E/ML Datasheet(HTML) 168 Page - Microchip Technology

Back Button PIC18LF4331-E/ML Datasheet HTML 164Page - Microchip Technology PIC18LF4331-E/ML Datasheet HTML 165Page - Microchip Technology PIC18LF4331-E/ML Datasheet HTML 166Page - Microchip Technology PIC18LF4331-E/ML Datasheet HTML 167Page - Microchip Technology PIC18LF4331-E/ML Datasheet HTML 168Page - Microchip Technology PIC18LF4331-E/ML Datasheet HTML 169Page - Microchip Technology PIC18LF4331-E/ML Datasheet HTML 170Page - Microchip Technology PIC18LF4331-E/ML Datasheet HTML 171Page - Microchip Technology PIC18LF4331-E/ML Datasheet HTML 172Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 168 / 392 page
background image
PIC18F2331/2431/4331/4431
DS39616D-page 168
 2010 Microchip Technology Inc.
FIGURE 17-13:
VELOCITY MEASUREMENT TIMING(1)
17.2.6.2
Velocity Postscaler
The velocity event pulse (velcap, see Figure 17-12)
serves as the TMR5 capture trigger to IC1 while in the
Velocity mode. The number of velocity events are
reduced by the velocity postscaler before they are used
as the input capture clock. The velocity event reduction
ratio can be set with the PDEC<1:0> control bits
(QEICON<1:0>) to 1:4, 1:16, 1:64 or no reduction (1:1).
The velocity postscaler settings are automatically
reloaded from their previous values as the Velocity
mode is re-enabled.
17.2.6.3
CAP1REN in Velocity Mode
The TMR5 value can be reset (TMR5 register
pair = 0000h) on a velocity event capture by setting
the CAP1REN bit (CAP1CON<6>). When CAP1REN
is cleared, the TMR5 time base will not be reset on
any velocity event capture pulse. The VELR register
pair, however, will continue to be updated with the
current TMR5 value.
QEB
QEA
cnt_reset(3)
TMR5(2)
velcap
BCF T5CON, VELM
VELR(2)
1529
1537
vel_out
Old Value
Forward
Q1
Q1
IC1IF(4)
Q1
Instr.
Execution
MOVWF QEICON(5)
BCF PIE2, IC1IE
BSF PIE2, IC1IE
CAP1REN
Note 1:
Timing shown is for QEIM<2:0> = 101, 110 or 111 (x4 Update mode enabled) and the velocity postscaler divide ratio
is set to divide-by-4 (PDEC<1:0> = 01).
2:
The VELR register latches the TMR5 count on the “velcap” capture pulse. Timer5 must be set to the Synchronous Timer
or Counter mode. In this example, it is set to the Synchronous Timer mode, where the TMR5 prescaler divide ratio = 1
(i.e., Timer5 Clock = TCY).
3:
The TMR5 counter is reset on the next Q1 clock cycle following the “velcap” pulse. The TMR5 value is unaffected
when the Velocity Measurement mode is first enabled (VELM = 0). The velocity postscaler values must be
reconfigured to their previous settings when re-entering Velocity Measurement mode. While making speed
measurements of very slow rotational speeds (e.g., servo-controller applications), the Velocity Measurement mode
may not provide sufficient precision. The Pulse-Width Measurement mode may have to be used to provide the
additional precision. In this case, the input pulse is measured on the CAP1 input pin.
4:
IC1IF interrupt is enabled by setting IC1IE as follows: BSF PIE2, IC1IE. Assume IC1E bit is placed in the PIE2
(Peripheral Interrupt Enable 2) register in the target device. The actual IC1IF bit is written on the Q2 rising edge.
5:
The post decimation value is changed from PDEC = 01 (decimate by 4) to PDEC = 00 (decimate by 1).
Reverse



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