поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

RM0312 датащи(PDF) 134 Page - STMicroelectronics

номер детали RM0312
подробное описание детали  STM8TL5xxx microcontroller family
PDF  275 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

RM0312 датащи(HTML) 134 Page - STMicroelectronics

Back Button RM0312 Datasheet HTML 130Page - STMicroelectronics RM0312 Datasheet HTML 131Page - STMicroelectronics RM0312 Datasheet HTML 132Page - STMicroelectronics RM0312 Datasheet HTML 133Page - STMicroelectronics RM0312 Datasheet HTML 134Page - STMicroelectronics RM0312 Datasheet HTML 135Page - STMicroelectronics RM0312 Datasheet HTML 136Page - STMicroelectronics RM0312 Datasheet HTML 137Page - STMicroelectronics RM0312 Datasheet HTML 138Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 134 / 275 page
background image
16-bit general purpose timer (TIM2/TIM3)
RM0312
134/275
DocID022352 Rev 3
The TIMx_CCRi registers can be programmed with or without preload registers using the
OCiPE bit in the TIMx_CCMRi register.
In output compare mode, the update event UEV has no effect on the OCiREF and OCi
output. The timing resolution is one count of the counter. Output compare mode can also be
used to output a single pulse.
Procedure:
1.
Select the counter clock (internal, external, prescaler).
2.
Write the desired data in the TIMx_ARR and TIMx_CCRi registers.
3.
Set the CCiIE bit if an interrupt request is to be generated.
4.
Select the output mode as follwos:
Write OCiM = 0b011 to toggle OCi output pin when CNT matches CCRi
Write OCiPE = 0 to disable preload register
Write CCiP = 0 to select active high polarity
Write CCiE = 1 to enable the output
5.
Enable the counter by setting the CEN bit in the TIMx_CR1 register.
The TIMx_CCRi register can be updated at any time by software to control the output
waveform, provided that the preload register is not enabled (OCiPE=’0’, else TIMx_CCRi
shadow register will be updated only at the next update event UEV). An example is given in
Figure 56.
Figure 56. Output compare mode, toggle on OC1
17.5.7
PWM mode
Pulse Width Modulation mode allows you to generate a signal with a frequency determined
by the value of the TIMx_ARR register and a duty cycle determined by the value of the
TIMx_CCRi register.
The PWM mode can be selected independently on each channel (one PWM per OCi output)
by writing 0b110 (PWM mode 1) or 0b111 (PWM mode 2) in the OCiM bits in the
TIMx_CCMRi register. You must enable the corresponding preload register by setting the
OCiPE bit in the TIMx_CCMRi register, and optionally enable the auto-reload preload
register (in up-counting or center-aligned modes) by setting the ARPE bit in the TIMx_CR1
register.
As the preload registers are transferred to the shadow registers only when an update event
occurs, before starting the counter, you have to initialize all the registers by setting the UG
bit in the TIMx_EGR register.
OC1REF=OC1
TIMx_CNT
B200
B201
0039
TIMx_CCR1
003A
Write B201h in the CC1R register
Match detected on OCR1
Interrupt generated if enabled
003B
B201
003A



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


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
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