📄 scope.1
字号:
.\" This file Copyright (C) 1994-95 Jeff Tranter.\" (Jeff_Tranter@Mitel.COM).\" It may be distributed under the GNU Public License, version 2, or.\" any higher version. See section COPYING of the GNU Public license.\" for conditions under which this file may be redistributed..TH SCOPE 1 "6 Oct 1995" "Linux" "User Commands".SH NAMEscope \- Software Oscilloscope.SH SYNOPSISscope -r<rate> -m<mode> -c<colour> -d<dma divisor> -t<trigger> -p -l-g -v -i<file> -j<joystick-device>.SH DESCRIPTION.B Scopeis a simple software emulation of an oscilloscope. It graphicallydisplays voltage as a function of time. The input is via a soundcard using the kernel sound device /dev/dsp.The svgalib library is used to implement a real-time waveformdisplay..PP.SH "COMMAND\-LINE OPTIONS".TP 0.5i.B -r <rate>Specify the sampling rate in samples per second. The upper and lowerlimits depend on the sound card you have; the default is8000..TP 0.5i.B -m <mode>Sets the graphics to use. The modes are listed in the svgalib headerfile "vga.h". The default mode is 4 -- 640x480 with 16 colours. Ifyou select a graphics mode with a vertical resolution of less than 255you may not be able to display the entire waveform. Don't use graphicsmodes that are not supported by your monitor..TP 0.5i.B -c <colour>Sets the trace colour. The colours available depend on the graphicsmode selected. The default is 2 -- green (just like a realoscilloscope)..TP 0.5i.B -d <dma divisor>Sets the divisor for DMA buffer size. Valid numbers are 1, 2, or 4.The kernel sound driver will divide it's DMA buffer by this factor.The default value of 4 usually gives the fastest display rate..TP 0.5i.B -t <trigger>Sets the trigger level. The scope will wait until it receives a signalgreater than this level. It should be in the range 0 .. 255. Thedefault is to run without waiting for a trigger. Note that the top ofthe display is 0, the bottom is 255, and the midpoint is 128.You cannot quit using "Q" while waiting for a trigger (use Control-Cinstead). You cannot change the trigger level unless it was enabledfrom the command line..TP 0.5i.B -p (point mode).TP 0.5i.B -l (line mode)These options are mutually exclusive. In point mode (-p) the graph isshown as individual data points. In line mode (-l) the points arejoined using lines. Line mode gives a better display, but is somewhatslower than point mode. The default is line mode..TP 0.5i.B -gEnables a graticule (a frame around the waveform). This slows down thedisplay a little bit. If trigger is enabled, a small tick mark isshown on the graticule corresponding to the trigger level..TP 0.5i.B -vRuns.B scopein verbose mode. Extra information is displayed on standardoutput..TP 0.5i.B -i <file>Instructs.B scopeto read data from a file rather than /dev/dsp. The input must be aseries of raw, unsigned, 8-bit, linear sound data bytes. A utilitysuch as.B Soxcan be used to convert sound files to this format. The sampling rateand DMA divisor options are meaningless if the option is used. If youwant, you can plot non-sound data from a file such as /vmlinux..TP 0.5i.B -j <joystick-device>Instructs.B scopeto read data from a joystick device rather than /dev/dsp. Only thevertical axis is used and the values are scaled by an arbitrary value..PP.SH "RUN\-TIME CONTROLS".PPWhile the program is running, it accepts the following single key commands:.PPq/Q - quit the program.PPR/r - increase/decrease sampling rate 10%.PPT/t - increase/decrease trigger level 10 units.PPl/p - go to line/point mode.PPC/c - increment/decrement colour used.PPG/g - enable/disable graticule.PP<space> - pause the display until another key is pressed.PPD/d - write screen dump in X bitmap format to file scope.xbm.SH EXAMPLES.TP 0.5i.B scope -r 44000 -l -vThis runs.B scopeat a 44kHz sampling rate, in line mode, with verbose output..SH PORTABILITY.B Scopewas written specifically for Linux, and uses the Linux sound driverand svgalib plotting routines. Obviously you need a sound card, VGAgraphics, and the Linux kernel sound drivers..SH BUGS/LIMITATIONS.PPThis should be considered ALPHA software. It was basically writtenfor fun rather than as a useful tool. It has a few known bugs, and itreally needs a better user interface. Unfortunately, adding anythingto the display (controls, etc...) would slow it down considerably.Because it uses svgalib,.B scopemust be run as root or setuid to root.The display will probably not be able to keep up at higher samplingrates, depending on your sound card, graphics card, and processorspeed. No floating point math is used, so a math coprocessor doesn'tmake any difference.You have to use an external mixer program to select the input sourcedevice, level, etc... (if you use a microphone the default shouldwork).When displaying data from a file,.B Scopedoes not know what the sampling rate is. The data is graphed as fastas possible. If this is too fast, you need to upgrade to a slowercomputer.I can think of a bunch of enhancements that might be fun to add: 16bit and stereo sampling, single shot mode, envelope mode, spectrumanalyzer (FFT) mode, graphical controls (mouse), graticule, andstorage mode (with waveform save/load), but it would probably run tooslowly..SH AUTHOR.B Scopewas written by Jeff Tranter (Jeff_Tranter@Mitel.COM) and is releasedunder the conditions of the GNU General Public License. See the fileCOPYING and notes in the source code for details.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -