Maker Pro
Maker Pro

AVR interrupt: how long a pulse do I need?

D

Dr. O

Jan 1, 1970
0
I'm generating a pulse on the interrupt line of a AVR processor. When I
checked the datasheet to find out exactly how long a pulse I need for an
interrupt to be recognized as such I couldn't find it!

I assume that an interrupt has a similar timing to that of a normal digital
I/O port but I couldn't find any timing diagrams of that either. The setup
and hold time for the digital I/O are completely lacking from the
documentation.

Can anyone fill me in on this? Thanks in advance.
 
U

Unbeliever

Jan 1, 1970
0
Dr. O said:
I'm generating a pulse on the interrupt line of a AVR processor. When I
checked the datasheet to find out exactly how long a pulse I need for an
interrupt to be recognized as such I couldn't find it!

I assume that an interrupt has a similar timing to that of a normal digital
I/O port but I couldn't find any timing diagrams of that either. The setup
and hold time for the digital I/O are completely lacking from the
documentation.

Can anyone fill me in on this? Thanks in advance.

Hey Doc,
For the Atmega16, at least, that depends on what sort of interrupt you
have, how fast your I/O clock is running and (sometimes) whether the AVR's
asleep or not. According to the datasheet, the AVR recognises its edge
triggered external interrupts on an edge of the I/O clock (not sure which
edge). This means that for an edge triggered interrupt, assuming the
interrupt is asynchronous, a pulse > 1 I/O clock should do the job. If
you've used a level triggered interrupt, the data sheet says that even when
the I/O clock isn't running this will be triggered by being sensed low for
two cycles of the watchdog clock (nominal period 1 uS). Reading between the
lines I'd suggest that if not in sleep mode, two cycles of the I/O clock
would be used instead.
This info *is* in the data sheet, though strewn hither and yon and well
hidden in places you wouldn't expect it instead of in AC Electrical
Characteristics as it would be in the datasheets of more conventional
manufacturers.
This may be different for the AVR that you're using particularly if it's
from a different family (Tiny for instance).

HTH
 
Top