[M251] Using TIMER Capture to Get Frequency of a Signal

Post Reply
chhsieh3
Posts: 307
Joined: 13 Mar 2020, 09:08

06 Jun 2023, 16:34

  • Application: This sample code uses M251 TIMER capture function to get frequency of an input signal.
  • BSP Version: M251_M252_M254_M256_M258_Series_BSP_CMSIS_V3.02.001
  • Hardware: NuMaker-M251SD Ver1.1
This sample code uses TIMER2 to capture the input signal frequency and duty cycle through the capture function, and TIMER0 to output digital signal through the PWM function. The input signal frequency range is 20 ~ 80 kHz. Connect these two pins to confirm the capture frequency and duty cycle. Finally, use a UART to show the result.

You can download the sample code at https://www.nuvoton.com/resource-downlo ... 3107561657
Nuvoton

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 10 guests