ComputerVoltageSources group photo

Yahoo Groups archive

ComputerVoltageSources

Index last updated: 2026-04-28 22:42 UTC

Message

Re: Input Flavors

2006-03-13 by djbrow54

I probably started this and I'm having second thoughts.  The issue 
with stretching the pulse is that you want to detect a trigger only 
once.  So, having detected it with a stretched pulse, you now need to 
ignore it until it goes away.  My initial thought was that you could 
assign the AtomPro pins appropriately such that you could use one of 
the hardware level interrupts.  I'm assuming these are edge and not 
level.  However, if they are level, then you have the same issue.  In 
thinking about this, I'm starting to come to the conclusion that you 
can detect triggers via timer interrupts.  

I general run my timer interrupt at 1 mS.  Most of my triggers are at 
least this wide (Is this a true statement in general?).  Assuming 
triggers are at least 2 mS, it should be pretty simple to sample the 
digital input and look for a state change in a timer interrupt 
routine.  This state change could then set a global variable that a 
trigger had occurred.  The software could poll the variable and decide 
what to do with it whenever.  If you need immediate action, you can 
always do this inside of the timer interrupt routine.

I think I can code this up in a pretty minimal overhead mechanism.  I 
should have thought of it earlier as I already have interrupt routines 
for input averaging the analog inputs.

This is probably a simpler solution that would work and maintain code 
compatibility and minimal hardware.

Dave

--- In ComputerVoltageSources@yahoogroups.com, "Grant Richter" 
<grichter@...> wrote:
>
> It seems like we could just put a simple RC pulse strecher on the 
triger input.
> 
> That should allow enough time for detection with a software scan.
> 
> There is always goin to be some latency. 5-10 milliseconds is not a 
lot.
> 
> Or do we really need to generate an interupt from the trigger input 
jack itself?

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.