🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.intel
Article #986

Re: How do i determine the clock frequency on a 80xxx?

#986
From: Kevin Todd Schmidt
Date: Tue, 29 Sep 1992 20:03
19 lines
1235 bytes
47@unpcs1.cs.unp.ac.za (menglund) writes:

>I am wanting to know how to determine a machines clock frequency dynamically
>within a program. (eg: 8MHz, 16MHz ect).

The way I do it is to measure the time it takes to execute a big block
of NOP's.  You may need to loop around the block a few times to get
an accurate measurement.  Then, based on the number of NOP's executed
you can calculate the clock speed since you know the number of clocks
needed for a NOP to execute.

If you have any questions let me know.

Kevin
-- 
Jet Propulsion Laboratory | schmke@cco.caltech.edu
4800 Oak Grove Dr.        | schmidt@spc5.jpl.nasa.gov
M/S 525-3684              |
Pasadena, CA  91109       |
Technical Details
Message-ID: <1aacqcINNhs@gap.caltech.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!know!cass.ma02.bull.com!think.com!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!nntp-server.caltech.edu!schmke
References: <47.1.717776998@unpcs1.cs.unp.ac.za>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!know!cass.ma02.bull.com!think.com!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!nntp-server.caltech.edu!schmke
From: schmke@cco.caltech.edu (Kevin Todd Schmidt)
Newsgroups: comp.sys.intel
Subject: Re: How do i determine the clock frequency on a 80xxx?
Message-ID: <1aacqcINNhs@gap.caltech.edu>
Date: 29 Sep 92 20:03:24 GMT
References: <47.1.717776998@unpcs1.cs.unp.ac.za>
Organization: California Institute of Technology, Pasadena
Lines: 19
NNTP-Posting-Host: sandman.caltech.edu