📄 manual_dsccountersetrate.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html lang="en"><head><title>DscCounterSetRate - Universal Driver Documentation</title><meta http-equiv="Content-type" content="text/html; charset=iso-8859-1"><meta name="robots" content="index,follow"><link rel="shortcut icon" href="/favicon.ico"><link rel="stylesheet" href="/dscud/style/wikiprintable.css"><script type="text/javascript" src="/dscud/style/wikibits.js"></script><style type='text/css'><!--a.new, #quickbar a.new { color: #CC2200; }#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }#article { margin-left: 152px; margin-right: 4px; }//--></style></head><body bgcolor='#FFFFFF'><div class='titlebox'><h1 class='pagetitle'>DscCounterSetRate</h1><span class='subtitle'>Universal Driver Documentation</span></div><div class='navbox'><a href="manual_Main_Page.html" class='printable' title ="Main Page">Main Page</a> || <a href="manual_Table_of_Contents.html" class='printable' title ="Table of Contents">Table_of_Contents</a> || <a href="http://www.diamondsystems.com/">Diamond Systems Website</a></div></div><div class='bodytext'>Sets the output frequency of the counter/timers dedicated to A/D sample rate timing. On all Diamond-MM boards, counters 1 and 2 are used together (2 x 16 bits) for A/D timing, and this function will program both counters such that the output of counter 2 is as close as possible to the selected rate. On Prometheus, counter 0 (24 bits) is used for A/D timing.
<p>
Note that not all rates are possible with complete precision. Each rate is set by programming the counter(s) with the divisor(s) resulting from the calculation (Input Clock) / Rate. On Diamond-MM boards, Input Clock is usually 10MHz. In each case a best fit is determined. However because of the integer math used, any errors resulting from truncation of the divisor to an integer value will cause the actual rate to differ from the desired rate.
If rate < 1.0 then the function returns DE_INVALID_PARM.
<p>
This function works on all boards with 82C54 counter/timer chips. <a href="manual_Quartz-MM.html" class='printable' title ="Quartz-MM">Quartz-MM</a> uses a different counter/timer chip and has separate functions for programming.
<p>
<h2><a name="Function_Definition">Function Definition</a></h2>
<p>
BYTE dscCounterSetRate(<a href="manual_DSCB.html" class='printable' title ="DSCB">DSCB</a> board, float rate);
<p>
<h2><a name="Function_Parameters">Function Parameters</a></h2>
<p>
<table border=1><tr ><TH>Name</TH><TH>Description</TH></tr><tr ><TD>board</TD><TD>The handle of the board to operate on</TD></tr><tr ><TD>rate</TD><TD>Desired rate for the A/D counter/timer circuit</TD></tr></table><p>
<h2><a name="Return_Value">Return Value</a></h2>
<p>
Error code or 0.
<p></div><p><em> <br> This page was last modified 11:59, 12 Feb 2004.<br>Copyright (c) 2004 Diamond Systems. All Rights Reserved.</em><!-- Time since request: 0.15 secs. --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -