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.
For more information on the conflicting usage of digital pins for a Simulink® model that uses one or more combination of PWM, Standard Servo Read, Standard Servo Write, Continuous Servo Write, and Input Capture blocks, see the Conflicting Pin Configurations on Arduino Timer section.
Note
The Input Capture block does not support the Arduino Nano 33 BLE Sense board currently.
| Arduino Board Architecture | Maximum Measurable Frequency | Measurable Duty Cycle Range |
|---|---|---|
| AVR | 50KHz | 20% to 80% |
| SAMD | 400KHz | |
| SAM | 400KHz |
Continuous Servo Write | Pin Mapping for Arduino Timer Dependent Blocks | PWM | Standard Servo Read | Standard Servo Write