Locale Icon
English
  • Forums

    Popular Forums

    • LTspice
    • Video
    • Power Management
    • RF & Microwave
    • Precision ADCs
    • FPGA Reference Designs

    Product Forums

    • Amplifiers
    • Clocks & Timers
    • Data Converters
    • Direct Digital Synthesis (DDS)
    • Energy
    • Interface and Isolation
    • MEMS Inertial Sensors
    • Power Management
    • Processors & DSP
    • Processors & Microcontrollers
    • Switches & Multiplexers
    • Sensors
    • Voltage References
    View All

    Application Forums

    • A2B Audio Bus
    • Audio
    • Automated Test Equipment (ATE)
    • Condition-Based Monitoring
    • Depth, Perception & Ranging Technologies
    • Embedded Vision Sensing Library
    • Motor Control Hardware Platforms
    • Precision Technology Signal Chains Library
    • Video
    • Wireless Sensor Networks Reference Library

    Design Center Forums

    • ACE Evaluation Software
    • ADEF System Platforms
    • Design Tools & Calculators
    • FPGA Reference Designs
    • Linux Software Drivers
    • Microcontroller no-OS Drivers
    • Power Studio Designer
    • Power Studio Planner
    • Reference Designs
    • Robot Operating System (ROS) SDK
    • Signal Chain Power (SCP)
    • Software Interface Tools
    • System Demonstration Platform (SDP) Support
  • Learn

    Highlighted Webinar

    Fast-Track Certification: Leveraging IC Safety App Notes for Functional Safety Designs

    Stop guessing, start certifying. Learn how to use IC safety application notes to streamline your FMEDA and meet IEC 61508 and ISO 13849 standards with...

    Places

    • ADI Academy
    • ADI Webinars
    • EZ Blogs
    • Video Annex
    • Virtual Classroom

    Libraries

    • 3D ToF Depth Sensing Library
    • Continuous-Wave CMOS Time of Flight (TOF) Library
    • Embedded Vision Sensing Library
    • Gigabit Multimedia Serial Link (GMSL) Library
    • Optical Sensing Library
    • Other Products Library
    • Precision Technology Signal Chains Library
    • Software Modules and SDKs Library
    • Supervisory Circuits Library
    • Wireless Sensor Networks Library
  • Community Hub

    Challenge Yourself!

      World Engineering Day Quiz!

      By Kuo-Chang A checkerboard made as a 7 x 7 matrix has a green basic cell placed in its middle as shown in the above structure. Questions: How...

    View All

    What's Brewing

      Read a Blog, Take this Quiz for Another Chance to Win a Gift Card!

      Important: Read the blog first . The quiz questions are all based on the content from the blog: ISO 26262 Essentials: Ensuring Confidence in Your Software...

    View All

    Places

    • Community Help
    • Analog Dialogue Quiz
    • Logic Lounge
    • Super User Program

    Resources

    • EZ Code of Conduct
    • EZ How To Help Articles
    • Getting Started Guide
    • ADI: Words Matter
    • Community Help Videos
    View All
  • ContentZone

    Visit ContentZone

    Search content by industry or technology.
    • Blogs
    • Technical Articles
    • Tutorials
    • Videos
    • Webinars
    Your ADI content all in one place.
    View ContentZone

    The Latest Read

    A Systematic Checklist for RF Transceiver Testing

    RF transceiver bring-up is the initial process of powering, configuring, and verifying a transceiver on new hardware to ensure basic functionality and...

    New Release

    Signal Chain Designer: DC Error Simulation
    Signal Chain Designer: DC Error Simulation

    This video covers the DC error calculation capabilities of Signal Chain Designer. DC error is unique in that often requires calibration and has so many...

    Recent Technical Insights

    Latest Technical Article from Analog.com
    Phase Sync in Digital Phased Arrays Through Direct RF SamplingPart 1: The Basics

    This article presents a methodology to synchronize multiple modular circuit boards, equipped with high speed data converters, to build a concept of a scalable...

EngineerZone
EngineerZone
SigmaDSP Processors & SigmaStudio Dev. Tool
  • Log In
  • User
  • Site
  • Search
OR
Ask a Question
SigmaDSP Processors & SigmaStudio Dev. Tool
  • Processors & DSP
SigmaDSP Processors & SigmaStudio Dev. Tool
Documents Example Project: Using the Stopwatch to Count Successive Samples over a Threshold
  • Q&A
  • File Uploads
  • Members
  • Tags
  • Cancel
  • Documents
  • SigmaDSP YouTube Channel - Dave Thib
  • +AD193x: FAQ
  • +ADAU1401AEBZ: FAQ
  • +ADAU144x: FAQ
  • +ADAU1452: FAQ
  • +ADAU145x: FAQ
  • +ADAU1701: FAQ
  • +ADAU1701MINIZ- FAQ
  • +ADAU1761: FAQ
  • +ADAU1772: FAQ
  • +ADI: FAQ
  • +AN-951: FAQ
  • +bitwise logic: FAQ
  • +Compressor Table Format: FAQ
  • +Creating a simple balance crossfade control: FAQ
  • +Creating constant-dB envelope decay using an existing linear decay algorithm: FAQ
  • +Crossover with more than 3 bands: FAQ
  • +E2PROM: FAQ
  • +EEPROM: FAQ
  • +EVAL DAU144XEBZ: FAQ
  • +EVAL-ADAU1781Z: FAQ
  • +Excluding Cells from the Exported System Files: FAQ
  • +GPIO button: FAQ
  • +GPIOs or Aux ADCs: FAQ
  • +How do I execute a software safeload write?: FAQ
  • +IIR coefficient filter: FAQ
  • +IIR filter: FAQ
  • +Peak Full Range Compressor: FAQ
  • +Preserving "Ear-candy": FAQ
  • +Push Button Volume: FAQ
  • +self-boot EEPROM image: FAQ
  • +Sigma300 Family Products: FAQ
  • +SigmaDSP: FAQ
  • +SigmaStudio: FAQ
  • +single precision VS double precision: FAQ
  • +Stimulus-Probe Capability and Limitations: FAQ
  • -Stopwatch to Count Successive Samples: FAQ
    • Example Project: Using the Stopwatch to Count Successive Samples over a Threshold
  • +Toolbox into the schematic tab: FAQ
  • +USB communications between the PC and SigmaDSP: FAQ
  • +Using Hierarchy Boards to create re-usable code: FAQ
  • New SigmaStudio 3.2.0 beta version available
  • SigmaStudio 3.3 Released
  • SigmaStudio 3.9.2 Beta Available for Download
  • SigmaStudio Rev 3.15.2 Bug Report for SPI EEPROM Write Speed

Example Project: Using the Stopwatch to Count Successive Samples over a Threshold

Example Project: Using the Stopwatch to Count Successive Samples over a Threshold by BrettG

SigmaStudio Example Project: Using the Stopwatch to Count Successive Samples over a Threshold

This example shows how to count the number of samples in a signal that exceed a certain threshold. Three ABCD Logic cells (available in the Basic DSP - Logic library) are used to turn the various flags on and off and to compare signal values to a threshold. DC Input Entry cells are used for the constant values used in the logic comparisons. Attached is an example project, a diagram, and the logic analyzer display of the output of the signal flow.

The red input signal in the example is a simple sine tone.

The blue signal shows the count of the stopwatch. It starts counting once the input signal has exceeded the Threshold value.

The green signal is the output of the last logic cell, which outputs a 1 if the stopwatch has exceeded 3.

This means that the output GPIO will go high if the input signal exceeds a peak amplitude of 0.95 for more than 3 samples.

ThresholdCounter.dspproj.zip
  • Share
  • History
  • More
  • Cancel
 
Related Content
  • Stopwatch to Count Successive Samples: FAQ
    Sara Collins
    Stopwatch to Count Successive Samples: FAQ
  • RE: Low level signal threshold to mute output
    ADIApproved
    Let's see. A peak level of 800 uV would mean a peak-to-peak level of 1600 uV, or 1.6 mV. That's 0.0016 / 3 = 0.0533% of the typical full-scale range of the ADC. Since the full scale maps to 2^24 = ~16...
  • Creating a delay after startup
    Sara Collins
    Creating a delay after startup by BrettG If a delay is required after starting up the SigmaDSP and before audio starts outputting, a stopwatch cell can be used. An example project is attached. For...
 
Related Content
  • Stopwatch to Count Successive Samples: FAQ
    Sara Collins
    Stopwatch to Count Successive Samples: FAQ
  • RE: Low level signal threshold to mute output
    ADIApproved
    Let's see. A peak level of 800 uV would mean a peak-to-peak level of 1600 uV, or 1.6 mV. That's 0.0016 / 3 = 0.0533% of the typical full-scale range of the ADC. Since the full scale maps to 2^24 = ~16...
  • Creating a delay after startup
    Sara Collins
    Creating a delay after startup by BrettG If a delay is required after starting up the SigmaDSP and before audio starts outputting, a stopwatch cell can be used. An example project is attached. For...
analog-devices logo

About Analog Devices

  • Who We Are
  • Careers
  • Newsroom
  • What We Do (Signals+)
  • Investor RelationsExternalLink
  • Quality & Reliability
  • Sales and Distribution
  • What's New on Analog.com
  • Contact Us

Find Help

  • Support
  • Resources
  • WikiExternalLink
  • Analog Dialogue
  • ADI Developer PortalExternalLink

myAnalog

Interested in the latest news and articles about ADI products, design tools, training, and events?

Go to myAnalog
  • Instagram page
  • Twitter page
  • Linkedin page
  • Youtube page
  • Facebook
  • Legal and Risk
  • Accessibility
  • Privacy Policy
  • Privacy Settings
  • Cookie Settings

©2026 Analog Devices, Inc. All Rights Reserved

analog-devices

About Analog Devices

Down Up
  • Who We Are
  • Careers
  • Newsroom
  • What We Do (Signals+)
  • Investor RelationsExternalLink
  • Quality & Reliability
  • Sales and Distribution
  • What's New on Analog.com
  • Contact Us

Find Help

Down Up
  • Support
  • Resources
  • WikiExternalLink
  • Analog Dialogue
  • ADI Developer PortalExternalLink

myAnalog

Interested in the latest news and articles about ADI products, design tools, training, and events?

Go to myAnalog
Instagram page Facebook Twitter page Linkedin page Youtube page
  • Legal and Risk
  • Accessibility
  • Privacy Policy
  • Privacy Settings
  • Cookie Settings

©2026 Analog Devices, Inc. All Rights Reserved