công cụ tìm kiếm bảng dữ liệu linh kiện điện tử
  Vietnamese  ▼
ALLDATASHEET.VN

X  

AN4062 bảng dữ liệu(PDF) 13 Page - STMicroelectronics

tên linh kiện AN4062
Giải thích chi tiết về linh kiện  STM32F0DISCOVERY peripheral firmware examples
PDF  17 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
nhà sản xuất  STMICROELECTRONICS [STMicroelectronics]
Trang chủ  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4062 bảng dữ liệu(HTML) 13 Page - STMicroelectronics

Back Button AN4062 Datasheet HTML 9Page - STMicroelectronics AN4062 Datasheet HTML 10Page - STMicroelectronics AN4062 Datasheet HTML 11Page - STMicroelectronics AN4062 Datasheet HTML 12Page - STMicroelectronics AN4062 Datasheet HTML 13Page - STMicroelectronics AN4062 Datasheet HTML 14Page - STMicroelectronics AN4062 Datasheet HTML 15Page - STMicroelectronics AN4062 Datasheet HTML 16Page - STMicroelectronics AN4062 Datasheet HTML 17Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 13 / 17 page
background image
DocID022897 Rev 3
13/17
AN4062
Peripheral firmware examples description
3.16
TIM PWM input example
Purpose
This example shows how to use the TIM peripheral to measure the frequency and duty
cycle of an external signal.
Description
The TIMxCLK frequency is set to SystemCoreClock, the Prescaler is 0 so the counter clock
is SystemCoreClock. SystemCoreClock is set to 48 MHz for STM32F0xx Devices.
TIM2 is configured in PWM Input Mode: the external signal is connected to TIM2 Channel2
used as an input pin.
To measure the frequency and the duty cycle, we use the TIM2 CC2 interrupt request, so
that the frequency and the duty cycle of the external signal are computed In the
TIM2_IRQHandler routine.
The “Frequency” variable contains the external signal frequency:
TIM2 counter clock = SystemCoreClock,
Frequency = TIM2 counter clock / TIM2_CCR2 in Hz,
The “DutyCycle” variable contains the external signal duty cycle:
DutyCycle = (TIM2_CCR1*100)/(TIM2_CCR2) in %.
The minimum frequency value to measure is 732 Hz (TIM2 counter clock / CCR MAX).
Note:
Connect the external signal to measure the TIM2 CH2 pin (PA.01).
3.17
TIM PWM output example
Purpose
This example shows how to configure the TIM1 peripheral to generate PWM signals with 4
different duty cycles (50%, 37.5%, 25% and 12.5%).
Description
The TIMxCLK frequency is set to SystemCoreClock, the Prescaler is 0 so the counter clock
is SystemCoreClock. SystemCoreClock is set to 48 MHz for STM32F0xx Devices.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


bảng dữ liệu tải về

Go To PDF Page


Link URL



Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không?  [ DONATE ] 

Alldatasheet là   |   Quảng cáo   |   Liên lạc với chúng tôi   |   Chính sách bảo mật   |   Liên kết đến bảng dữ liệu    |   Trao đổi link   |   Tìm kiếm theo nhà sản xuất
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