| 전자부품 데이터시트 검색엔진 |
|
AN4232 데이터시트(PDF) 13 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4232 데이터시트(HTML) 13 Page - STMicroelectronics |
|
13 / 17 page ![]() DocID024134 Rev 2 13/17 AN4232 Application examples 16 The COMP_OutputBlanking example aims at showing how the blanking feature can be used. In this example, COMP1 is configured as follows: • The non-inverting input is connected to PA1 • The inverting input is connected to VREFINT (1.22V) • The output is available on PA0 • The output is redirected to TIM1 BKIN to generate a break event when the non- inverting input is at a higher voltage than the inverting input (VREFINT) • TIM1 OC5 is used as a blanking source TIM1 is configured as follows: • TIM1 period is APB2 clock / period = 72000000/50000 = 1440 Hz • TIM1 CH2 (PA9) configured in PWM mode with a frequency equal to 1440 Hz and a duty cycle pulse/period = 100 * (37500/50000) = 75% • TIM1 OC5 (internal channel: not available on GPIO) configured in PWM mode with a frequency equal to 1440 Hz and a high level equal to pulse/period = 2000/72000000 = 27.7 microseconds • A break event is generated at a high polarity (when the non-inverting input is at a higher voltage than the inverting input) Note: In STM32CubeF3 firmware package this example is available in the Projects\STM32303C_EVAL\Examples\COMP\COMP_OutputBlanking and the Projects\STM32303E_EVAL\Examples\COMP\COMP_OutputBlanking folders. 2.5 Humidity measurement The analog comparators can be connected internally to input capture of embedded timers. This feature makes it easy to measure the capacitance values using the charge/discharge method. This “Humidity measurement” application is based on the HS1100/HS1101 capacitive relative humidity sensor available in the STM32303C-EVAL and STM32303E- EVAL evaluation boards. Note: The application source code is available in the Project\STM32F30x_StdPeriph_Examples\ COMP\COMP_Hygrometer folder in the STM32F30x_DSP and standard peripherals library package, stm32f30x_dsp_stdperiph_lib. In STM32CubeF3 firmware package this example is available in the Projects\STM32303C_EVAL\Examples\COMP\COMP_Hygrometer and the Projects\STM32303E_EVAL\Examples\COMP\COMP_Hygrometer folders. The capacitance measurement is performed using the variation of RxC time constant. A square signal generated by TIM4 is passed through a charge resistance to charge/discharge the capacitive sensor. The voltage on the sensor (Uc) is derived from the equation below: Uc = VDD x (1–(–t/(RxC)) where: –VDD is the MCU power supply – R is the charge resistance – C is the capacitance of the sensor. |
|
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 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 |