AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/misc/freqmet.lha

Mirror:Random
Showing: ppc-morphos icongeneric icon
No screenshot available
Short:Frequency meter for AURA equipped amigas
Author: scaprile at geocities.com
Uploader:scaprile geocities com
Type:util/misc
Architecture:m68k-amigaos
Date:1998-04-12
Download:util/misc/freqmet.lha - View contents
Readme:util/misc/freqmet.readme
Downloads:702

Hi everybody !

This code is a quick hack, I just happened to need a frequency counter and
so I wrote it. Feel free to use it, modify it, and send it back to me ;)
C sources included.

The directory "loop" contains a CPU-hog version, allowing for higher
frequency measures. Just click "GO" and it starts, press the left mouse
button and it returns control back to you.

The "int" directory contains an interrupt driven version, which is highly
affected in accuracy by system load, but lets you run it while still using
your machine. This program uses part of CIA_interval.c code, provided on the
RKRM Devices manual.

The operating principle is easy, I just set up a 1 sec window and count
zero crosses of the incoming signal, then divide by two and display.

The 1 sec window is calculated as an approximation.
A sample rate is defined, then the CIA divisor to get this rate is
calculated. As it often is not an integer number, then the real sample
rate is calculated by doing E/(this number). This is quite often also a
fractional number, so this is a source of inaccuracy, as the total number
of samples in a 1 sec window won't be an integer.
The E clock frequency is taken from SysBase, so this could be another
source of inaccuracy.

As I said before, this is a quick hack and I didn't pay much attention to
accuracy, it shows a 5-10 % accuracy and it works for me. If you write a
better code, please send it.

------------------------------------------------
 AMIGA | Sergio R. Caprile, Bs. As., Argentina  |
   //  |     email: scaprile@geocities.com      |
 \X/   | DSP, Music, Electronics, Tai Chi Chuan |
------------------------------------------------
 http://www.geocities.com/CapeCanaveral/Lab/2885|
------------------------------------------------


Contents of util/misc/freqmet.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 3792   11734  32.3% -lh5- 3172 Jun 22  1997 int/CIA_interval.c
[generic]                 3727    5960  62.5% -lh5- 97a9 Apr  9  1998 int/freq
[generic]                 3928   11735  33.5% -lh5- f4ed Apr  9  1998 int/freq.c
[generic]                   75      90  83.3% -lh5- 7d9e Apr  9  1998 int/freq.lnk
[generic]                 2211    3940  56.1% -lh5- f5df Apr  9  1998 int/freq.o
[generic]                 1535    3953  38.8% -lh5- 5c03 Apr  9  1998 int/freq_gui.c
[generic]                  503    1404  35.8% -lh5- 2ac6 Apr  9  1998 int/freq_gui.h
[generic]                  208     289  72.0% -lh5- 8f61 Apr  9  1998 int/freq_gui_temp.c
[generic]                   39      46  84.8% -lh5- 7529 Apr  9  1998 int/SCOPTIONS
[generic]                 3306    5160  64.1% -lh5- e6f2 Apr  9  1998 loop/freq
[generic]                 1589    4059  39.1% -lh5- 7fba Apr  5  1998 loop/freq_gui.c
[generic]                  525    1532  34.3% -lh5- 676a Apr  5  1998 loop/freq_gui.h
[generic]                  245     378  64.8% -lh5- 2780 Apr  5  1998 loop/freq_gui_temp.c
[generic]                 1988    4873  40.8% -lh5- 1519 Apr  9  1998 loop/freq.c
[generic]                   75      90  83.3% -lh5- 7d9e Apr  9  1998 loop/freq.lnk
[generic]                 1858    3276  56.7% -lh5- ea95 Apr  9  1998 loop/freq.o
[generic]                   39      46  84.8% -lh5- 7529 Apr  9  1998 loop/SCOPTIONS
[generic]                  953    1925  49.5% -lh5- e3df Apr  9  1998 readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        18 files   26596   60490  44.0%            Apr 11  1998
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>