Measure frequency and duty cycle of external input signal
Simulink Support Package for Arduino Hardware / Common
The Input Capture block measures the frequency and duty cycle of the external input signal on the digital pin of the Arduino®hardware board. The block utilizes the timer counters available on the Arduinohardware board along with the interrupt service routines to compute the frequency and duty cycle of the external input signal.
|Arduino Board Architecture||Maximum Measurable Frequency||Measurable Duty Cycle Range|
Frequency— Frequency of external input signal
The block outputs the frequency of the external input signal in Hertz.
Duty Cycle— Duty cycle of external input signal
The block outputs the duty cycle of the external input signal as a percentage.
Input capture pin number— Pin to which external input signal is connected
48(default) | scalar
Enter the Arduino hardware board pin number to which the external input signal is connected.
Do not assign the same pin number to multiple blocks within a model.
To know more on how to assign pins or to view the fixed pins for the Input Capture block, see Arduino Pin Mapping for Timer Dependent Blocks.
Sample Time— Time interval at which external input signal is read
0.1(default) | scalar
Enter the time interval in seconds at which the block reads the external input signal from the specified pin number.