Timer Practice — Compare and Hardware Frequency Divider
00:05:50
|
22 NOV 2024
The MSPM0 MCU timer's comparison feature detects the edges of a pulse and automatically records the number of edges, generating interrupts when a specified number is reached. This example will use PA21 to produce a square wave signal with a variable frequency duty cycle of 50%. The edge of the square wave signal is acquired by PA18 with the square wave signal frequency as the comparison value, resulting in a comparison interruption of the cycle.