Article View: alt.msdos.programmer
Article #692Re: DMA : numder of transfers
From: Jerzy Tarasiuk
Date: Mon, 05 Oct 1992 17:57
Date: Mon, 05 Oct 1992 17:57
22 lines
1643 bytes
1643 bytes
>>>>> On 1 Oct 1992 07:39:13 GMT, mats.astrom@neurofys.uu.se (Mats Astrom) said: Mats> NNTP-Posting-Host: mats.neurofys.uu.se Mats> While doing DMA-transfer it's possible to read the number of transfers done Mats> by reading a specific register of the DMA-circuit. I've manage to do so but Mats> the result seem to be somewhat instable ! The instability is due to reads of Mats> the register in the middle of a transfer, isn't it ???? Mats> Assuming I'm setting up everthing correctly, how do I read the number of Mats> transferred bytes to get the correct value every time ????? Few questions: 1. did you remember to reset hi/lo flip-flop (I/O address 0Ch) before reading the DMA count register ? 2. do you remember the DMA count register contains remaining count, not count transferred and it goes down to -1 ? 3. why read registers many times (the repeat)? read once: port[DmaRstFF]:=0; l1:=port[DmaCntReg]; h1:=port[DmaCntReg]; l2:=port[DmaCntReg]; h2:=port[DmaCntReg]; IF h1<>h2 THEN cnt:=(h1 SHL 8)+l1 ELSE cnt:=(h2 SHL 8)+l2; Let me know if it gives stable results (i.e. still going down). Jerzy Tarasiuk
Technical Details
Message-ID:
<JT.92Oct5185747@fizyk1.fuw.edu.pl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jtReferences:
<mats.astrom.22.0@neurofys.uu.se>Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jt From: jt@fuw.edu.pl (Jerzy Tarasiuk) Subject: Re: DMA : numder of transfers In-Reply-To: mats.astrom@neurofys.uu.se's message of 1 Oct 1992 07:39:13 GMT Message-ID: <JT.92Oct5185747@fizyk1.fuw.edu.pl> Sender: news@fuw.edu.pl Nntp-Posting-Host: fizyk1 Organization: Warsaw University Physics Dept. References: <mats.astrom.22.0@neurofys.uu.se> Date: Mon, 5 Oct 1992 17:57:47 GMT Lines: 22