Teensy 4.0 digital interrupt threshold

Status
Not open for further replies.

goolav

New member
Hi, im using a teensy 4.0 connected to a sensor that gives a digital output, it works fine with a short cable but with a longer one im getting around 0.15v pk2pk noise which seems to be triggering my interrupt routine.

ive done abit of searching but cant find any information as what the minimum voltage change the teensy regards as a change, does anyone know this or even better - how to modify this threshold?

many thanks in advance

andrew

teensy.PNG
 
Logic levels are a product of the hardware and can't be changed, additionally, when you find the appropriate datasheet you'll be given a voltage below which a 0 is guaranteed and a voltage above which a 1 is guaranteed. Between the two is known as the uncertainty region as it's - you guessed it - uncertain.

If your signal is triggering the interrupt due to noise, you either need to deal with this in hardware or in software. Do you get random triggers during a logic low or multiple triggers during a transition?
 
@goolav - no code is shown to see pinMode in use and the interrupt pin setup.

See this post that may apply: T4-0-ISR-Rising-Edge-Voltage-Trigger-Level
> and that is followed by posts with notes on hysteresis that limits transitions between HIGH and LOW without some measurable change in the voltage above/below the transition point.

Also on that thread is note to try asm("dsb"); to assure the interrupt isn't double triggering and notes on multiple triggers that @Edward refers to.
 
> 0.15v pk2pk noise which seems to be triggering

Note that depending on measurement system bandwidth, the actual voltage peak might be much higher. Analog filtering helps.
 
Status
Not open for further replies.
Back
Top