数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

PIC16F1507-E/SS. 数据表(PDF) 149 Page - Microchip Technology

部件名 PIC16F1507-E/SS.
功能描述  20-Pin Flash, 8-Bit Microcontrollers
PDF  278 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  MICROCHIP [Microchip Technology]
网页  http://www.microchip.com
标志 MICROCHIP - Microchip Technology

PIC16F1507-E/SS. 数据表(HTML) 149 Page - Microchip Technology

Back Button PIC16F1507-E/SS. Datasheet HTML 145Page - Microchip Technology PIC16F1507-E/SS. Datasheet HTML 146Page - Microchip Technology PIC16F1507-E/SS. Datasheet HTML 147Page - Microchip Technology PIC16F1507-E/SS. Datasheet HTML 148Page - Microchip Technology PIC16F1507-E/SS. Datasheet HTML 149Page - Microchip Technology PIC16F1507-E/SS. Datasheet HTML 150Page - Microchip Technology PIC16F1507-E/SS. Datasheet HTML 151Page - Microchip Technology PIC16F1507-E/SS. Datasheet HTML 152Page - Microchip Technology PIC16F1507-E/SS. Datasheet HTML 153Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 149 / 278 page
background image
 2011-2015 Microchip Technology Inc.
DS40001586D-page 149
PIC16(L)F1507
19.1
PWMx Pin Configuration
All PWM outputs are multiplexed with the PORT data
latch. The user must configure the pins as outputs by
clearing the associated TRIS bits.
19.1.1
FUNDAMENTAL OPERATION
The PWM module produces a 10-bit resolution output.
Timer2 and PR2 set the period of the PWM. The
PWMxDCL and PWMxDCH registers configure the
duty cycle. The period is common to all PWM modules,
whereas the duty cycle is independently controlled.
All PWM outputs associated with Timer2 are set when
TMR2 is cleared. Each PWMx is cleared when TMR2
is equal to the value specified in the corresponding
PWMxDCH (8 MSb) and PWMxDCL<7:6> (2 LSb) reg-
isters. When the value is greater than or equal to PR2,
the PWM output is never cleared (100% duty cycle).
19.1.2
PWM OUTPUT POLARITY
The output polarity is inverted by setting the PWMxPOL
bit of the PWMxCON register.
19.1.3
PWM PERIOD
The PWM period is specified by the PR2 register of
Timer2. The PWM period can be calculated using the
formula of Equation 19-1.
EQUATION 19-1:
PWM PERIOD
When TMR2 is equal to PR2, the following three events
occur on the next increment cycle:
•TMR2 is cleared
• The PWM output is active. (Exception: When the
PWM duty cycle = 0%, the PWM output will
remain inactive.)
• The PWMxDCH and PWMxDCL register values
are latched into the buffers.
19.1.4
PWM DUTY CYCLE
The PWM duty cycle is specified by writing a 10-bit
value to the PWMxDCH and PWMxDCL register pair.
The PWMxDCH register contains the eight MSbs and
the PWMxDCL<7:6>, the two LSbs. The PWMxDCH
and PWMxDCL registers can be written to at any time.
Equation 19-2 is used to calculate the PWM pulse width.
Equation 19-3 is used to calculate the PWM duty cycle
ratio.
EQUATION 19-2:
PULSE WIDTH
EQUATION 19-3:
DUTY CYCLE RATIO
The 8-bit timer TMR2 register is concatenated with the
two Least Significant bits of 1/FOSC, adjusted by the
Timer2 prescaler to create the 10-bit time base. The
system clock is used if the Timer2 prescaler is set to 1:1.
Figure 19-2 shows a waveform of the PWM signal when
the duty cycle is set for the smallest possible pulse.
FIGURE 19-2:
PWM OUTPUT
Note:
Clearing the PWMxOE bit will relinquish
control of the PWMx pin.
Note:
The Timer2 postscaler is not used in the
determination of the PWM frequency. The
postscaler could be used to have a servo
update rate at a different frequency than
the PWM output.
Note:
The PWMxDCH and PWMxDCL registers
are double buffered. The buffers are
updated when Timer2 matches PR2. Care
should be taken to update both registers
before the timer match occurs.
PWM Period
PR2
 1
+
 4TOSC 
=
(TMR2 Prescale Value)
Note:
TOSC = 1/FOSC
Note:
The Timer2 postscaler has no effect on
the PWM operation.
Pulse Width
PWM x DCH :PWMxDCL<7:6>

=
T OSC
 (TMR2 Prescale Value)
Note:
TOSC = 1/FOSC
Duty Cycle Ratio
PW M xDC H:PWMxDCL<7:6>

4 PR2
1
+

-----------------------------------------------------------------------------------
=
Pulse Width
TMR2 = PR2
TMR2 =
0
TMR2 = PWMxDC
FOSC
PWM
Q1
Q2
Q3
Q4
Rev. 10-000023A
7/30/2013



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


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
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