Question on Arduino Interrupts, rsp Interrupt-sampling

Friends, I need some enlightenment :confused: :

Field of action: Arduino Mega 256, thus Atmel AVR, 8bit

I intend to use a very short pulse to trigger an external interrupt (FALLING, if that makes a difference). In fact it may theoretically shorter than a clock-cycle on the Arduino. Now the datasheet does not go in depth about exactly how the INTwhatever is detected. For RISING/FALLING it says something like detecting a state change in between samples. Now, ideally this may be a flip-flop, thus capturing any whatsoever (reasonably) short pulse or it might just be a port-sample (storing the latest sample and applying some boolean logic) being limited to one or more clock-cycles of the AVR, thus requiring the pulse to last a certain minimum of clock-cycles.

This is important to me, as I want to keep the circuit as simple as possible, another flip-flop in hardware would mean another chip (TTL or GAL), which I'd love to avoid.

Regarding the use: I intend to implement a Z80-shield for the old ones amoungst us, so we can play with a very nice and speedy real CP/M-toy. I thought about wiring the IOREQ directly to the INTwhatever in FALLING mode. Thus, with a simple I/O-command from the Z80, I could alert the Arduino. If I had to make the Arduino more sensible, this would mean to implement a mono-flop or waste another pin for the reset of a flip-flop (ok, I might use the M1 cycle to reset it). Now depending on the type of "master-CPU" that I would attach, it might be on e.g. a 50 MHz (eZ80, maybe). That would mean a cycle is about a third of an Arduino cycle and that might be so fast that it happens all in between cycles of a polling interrupt controller. Then it would not be detected at all!

Yes you are right, I could experiment on this and just find out on my own, but I do not have a signal generator, so this process would be lengthy and after all ... this is a very basic question on the AVR, isn't it? I am surprised that the datasheet hasn't been more specific at this point (or did I just miss it?).

Best regards and thank in advance for any hint (or pointer on a forum-post or article or doc, I searched but did not come up with anything that filled my gaps).

The pin change interrupts trigger if a pin "toggles", but it's all synchronous with the clock so that would have the problem you suggest.

The INTx interrupts can be triggered by a "falling or rising edge or a low level". I haven't looked bu I assume that's an option set in a control register somewhere.

So it would appear that the external interrupts will be suitable, but it's all in the wording, I would also have thought that "toggling" was edge detecting as well but if you look at the diagram (15-1) on page 113 of the 2560 data sheet if clearly shows that the input is clocked into a SR by the system clock. Unfortunately there is no such diagram for the external INT pins and I can't see anything in the electrical characteristics section.

BTW, I cut my teeth on the Z80 and designed many boards with them (and later chips like the 64180, Z8, Z800 etc).

I've always liked the idea of doing a retro Z80 board with an AVR/ARM as a controller and EPROM emulator that could grab the bus and load code into RAM etc etc. It would be a fun project that's for sure.

You can still buy all the old IO chips as well.