delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/13/11:58:18

From: pavenis AT lanet DOT lv
To: gdemont AT my-deja DOT com, djgpp AT delorie DOT com
Date: Fri, 13 Oct 2000 16:56:05 +0200
MIME-Version: 1.0
Subject: Re: Fine timing
Message-ID: <39E73EA5.23380.139A4FD@localhost>
In-reply-to: <8s6ug4$ebr$1@nnrp1.deja.com>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--Message-Boundary-1411
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

On 13 Oct 2000, at 12:17, gdemont AT my-deja DOT com wrote:

> 
> Nice! And is it possible to read the 1024ths of second from port 70h
> without using an interrupt ? In that case it would simplify dramatically
> things. For the moment I program the PIT, take Int 8 and repair the BIOS
> time that would go wrong otherwise by reading the values from port 70h!
> I works, but is not so nice and needs not forgetting to reset the
> normal state a the end - especially when an unhandled Ada exception
> has occured.

You should program RTC to generate interrupts. 

I have used RTC periodic interrupts with DJGPP for periodic data 
acquisition from  ADC. I'm adding an example in attachment (sorry for 
binary attachment)

Andris


--Message-Boundary-1411
Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  rtctest.zip
     Date:  13 Oct 2000, 16:52
     Size:  3238 bytes.
     Type:  ZIP-archive

--Message-Boundary-1411
Content-type: Application/ZIP; name="rtctest.zip"
Content-disposition: attachment; filename="rtctest.zip"
Content-transfer-encoding: X-UUencode

begin 660 rtctest.zip
M4$L#!!0``@`(`!B$;RB?@FM!>0(``.@'```&``D`8VUO<RYH550%``$PN\\X
ME91O3Z-`$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S?\7)SE%WW_`%!+`0(6`!0``@`(`!B$;RB?@FM!>0(``.@'
M```&``D```````$`(`````````!C;6]S+FA55`4``3"[SSA02P$"%@`4``(`
M"`#4=BLIS%M$>'P&``#V&```!@`)```````!`"````"F`@``<G1C+F-C550%
M``$P\KPY4$L!`A8`%``"``@`TW8K*5E;K*-?`@``00<```4`"0```````0`@
K````3PD``')T8RYH550%``$N\KPY4$L%!@`````#``,`M@```-H+```````@
`
end

--Message-Boundary-1411--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019