Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!ogicse!zephyr.ens.tek.com!gvgpsa!gold!grege From: grege@gold.GVG.TEK.COM (Gregory Ebert) Newsgroups: sci.electronics Subject: Re: Z-80 NMI Message-ID: <850@gold.GVG.TEK.COM> Date: 13 Mar 90 20:06:35 GMT References: <5539@bgsuvax.UUCP> Distribution: usa Organization: Grass Valley Group, Grass Valley, CA Lines: 22 In article <5539@bgsuvax.UUCP> nandan@bgsuvax.UUCP (rajesh Nandan) writes: >Just a baffling situation-help me solve the problem > >If the Z-80 is executing "executable" codes the NMI works & forces a jump to >0066H but when I make it "HANG" by jumping to a "nonexecutable" part of code >the NMI DOESN'T work even though the RTC(58167) chip connected pulls the pin >low. ie:- the NMI doesn't work if it has hung. The Z-80 might be executing a block instruction with a huge block count (ie LDIR w/ BC=0000). NMI will not break into an instruction. Maybe your SP got trashed - NMI routine executed OK, but it can't return to the right place; this might 'look' like NMI isn't working. The last thing to check is the NMI pulse width. NMI is falling-edge triggered, but I'm sure that the Z-80 needs to sample NMI low at the end of the current instruction; 'glitching' NMI won't work. If NMI is stuck-low, the routine at 0066h will get executed. Even if you do a RETN, the next NMI won't occur until NMI has gone high. I know from experience that NMI works perfectly when all of the laws are obeyed. For what it's worth, I've been using the Z-80 for 10+ years and I always have/always will love this critter.