[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] external interrupt use

From: Erik Christiansen
Subject: Re: [avr-gcc-list] external interrupt use
Date: Tue, 24 Feb 2004 16:42:00 +1100
User-agent: Mutt/1.3.28i

On Mon, Feb 23, 2004 at 06:59:01PM -0800, Jamie Morken wrote:
> Is there a simple way to detect the 6 signals rising/falling
> edges with 4 interrupts and some additional circuitry?

Jamie, do you have IC0, IC1, or similar additional interrupt inputs,
that can be turned to general use, with a little effort? Even the
analogue comparator input can be shanghaied. (Ability to detect both
rising/falling edges may be a problem, though.)

> I have thought about using diodes to AND some of the signals but this
> only works for positive edges I think.

Yes, and a steady state low will mask any other edges. You'll need to AC
couple the logic, if using discretes. Better would be to feed each line
to both inputs of an exor gate, one directly, the other via a series
resistor and capacitor to ground. Each exor gate will then emit a brief
pulse on either input edge. Feed them all into a big or gate, and you're
done. (Use exnors instead, and a nand will do the or. Wide nands are
more common.)

If you keep the RC time constant short, it'll minimise masking of very
short pulses an individual input, and merging of two separate interrupts
pulses into one. Oh, it'll also keep the (presumably CMOS) gate dissipation
down, and avoid any tendency to oscillate.

Now the admission. I haven't built it all and tried it. (But the exor +
RC trick is pretty old.)


avr-gcc-list mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]