gotwols@warper.jhuapl.edu (Bruce Gotwols) (02/24/90)
I recently acquired an analog to digital (A/D) board which uses DMA to transfer the digitized data to an IBM AT. In a short note in the instruction manual it warned that data may be sporadically lost on machines with either EGA or VGA screens if the user writes to the screen while DMA is in progress. The claim is that the act of writing to the screen (on EGA and CGA only) involves using the processors Non Maskable Interrupt (NMI), and since the NMI has higher priority than DMA it may keep things tied up long enough that the next A/D sample comes in before the last one is safely stored in memory. Can anyone out there confirm that writing to the EGA and VGA screens involves using the NMI? If this is true, under what conditions is the NMI used? (Surely it isn't necessary to invoke the Non Maskable Interrupt just to write a character to the screen?) I would be interested to hear of any other experiences people have had using DMA to transfer A/D data to memory. I'm particularly interested in experiences using the higher numbered DMA channels (>3) that are available on the AT but not the original PC or PC/XT. Thanks, Bruce Gotwols -- Bruce L. Gotwols Johns Hopkins University, Applied Physics Lab., Laurel MD 20723 Internet: gotwols@warper.jhuapl.edu (128.244.176.48)
phil@pepsi.amd.com (Phil Ngai) (02/27/90)
The NMI situation on VGA adaptors is this: many cards do not provide full hardware support for backwards compatibility. Instead, they detect if a CGA type access is done and put out an NMI. They then emulate the access using VGA BIOS code. This is why NMI is used. If you are only doing VGA access, NMI should not (I think) get asserted. I don't know what happens if you do a CGA access on an EGA adaptor. -- Phil Ngai, phil@amd.com {uunet,decwrl,ucbvax}!amdcad!phil When guns are outlawed, only governments will have guns.
jt19840@tut.fi (Tuomi Jyrki Juhani) (03/01/90)
In article <4781@aplcen.apl.jhu.edu> gotwols@warper.jhuapl.edu (Bruce Gotwols) writes: >I recently acquired an analog to digital (A/D) board which uses DMA to transfer >the digitized data to an IBM AT. In a short note in the instruction manual >it warned that data may be sporadically lost on machines with either EGA or VGA >screens if the user writes to the screen while DMA is in progress. The claim is >that the act of writing to the screen (on EGA and CGA only) involves using the >processors Non Maskable Interrupt (NMI), and since the NMI has higher >priority than DMA it may keep things tied up long enough that the next A/D >sample comes in before the last one is safely stored in memory. > Writing to the EGA and VGA screens definitely does not involve NMI. What the A/D board maker probably meant that the CRT controller in an EGA uses two (2) out of five (5) memory cycles for screen refresh in low resolution modes and 4/5 memory cycles in high resolution modes. That is screen memory of course. So when user program writes to screen buffer, it gets only 1 out of 5 or 3 out of 5 memory cycles. I'm no H/W expert so I don't really understand how that would affect the A/D board's DMA capability. Anyone care to comment on that? With CGA and MDA cards it is possible to generate an NMI by writing to the 6845 MODE register, so that CRTC will be reprogrammed by the interrupt service routine. Weird, isn't it? -- Jyrki Tuomi Internet: jt19840@tut.fi UUCP: ..mcvax!tut!jt19840
topgun@chaos.cs.brandeis.edu (Chandra Bajpai) (03/01/90)
In article <4781@aplcen.apl.jhu.edu> gotwols@warper.jhuapl.edu (Bruce Gotwols) writes: >screens if the user writes to the screen while DMA is in progress. The claim is >that the act of writing to the screen (on EGA and CGA only) involves using the >processors Non Maskable Interrupt (NMI), and since the NMI has higher >priority than DMA it may keep things tied up long enough that the next A/D >sample comes in before the last one is safely stored in memory. > >Can anyone out there confirm that writing to the EGA and VGA screens involves >using the NMI? If this is true, under what conditions is the NMI used? >(Surely it isn't necessary to invoke the Non Maskable Interrupt just to write a I read a Chips & Tech application note that said that they use NMI to signal a program is writing to video controller addresses and switch mode modes automatically (It doesn't happen by magic!)