?lang_form? ?lang_select? ?lang_submit? ?lang_endform?
{HEADER END}
{FILE START}

library

?curdirlinks? - Rev 6

?prevdifflink? - Blame - ?getfile?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Procyon AVRlib: A/D Converter Function Library (a2d.c)</title>
<link href="dox.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>A/D Converter Function Library (a2d.c)<br>
<small>
[<a class="el" href="group__driver__avr.html">Drivers (for AVR peripherals)</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include "<a class="code" href="a2d_8h.html">a2d.h</a>"</span> 
</pre></div> <dl compact><dt><b>Overview</b></dt><dd>This library provides an easy interface to the analog-to-digital converter available on many AVR processors. Updated to support the ATmega128. </dd></dl>

<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga9" doxytag="a2d::ADC_PRESCALE_DIV2"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga9">ADC_PRESCALE_DIV2</a>&nbsp;&nbsp;&nbsp;0x00</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">0x01,0x00 -&gt; CPU clk/2 <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga10" doxytag="a2d::ADC_PRESCALE_DIV4"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga10">ADC_PRESCALE_DIV4</a>&nbsp;&nbsp;&nbsp;0x02</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">0x02 -&gt; CPU clk/4 <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga11" doxytag="a2d::ADC_PRESCALE_DIV8"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga11">ADC_PRESCALE_DIV8</a>&nbsp;&nbsp;&nbsp;0x03</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">0x03 -&gt; CPU clk/8 <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga12" doxytag="a2d::ADC_PRESCALE_DIV16"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga12">ADC_PRESCALE_DIV16</a>&nbsp;&nbsp;&nbsp;0x04</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">0x04 -&gt; CPU clk/16 <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga13" doxytag="a2d::ADC_PRESCALE_DIV32"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga13">ADC_PRESCALE_DIV32</a>&nbsp;&nbsp;&nbsp;0x05</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">0x05 -&gt; CPU clk/32 <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga14" doxytag="a2d::ADC_PRESCALE_DIV64"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga14">ADC_PRESCALE_DIV64</a>&nbsp;&nbsp;&nbsp;0x06</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">0x06 -&gt; CPU clk/64 <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga15" doxytag="a2d::ADC_PRESCALE_DIV128"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga15">ADC_PRESCALE_DIV128</a>&nbsp;&nbsp;&nbsp;0x07</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">0x07 -&gt; CPU clk/128 <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga16" doxytag="a2d::ADC_PRESCALE"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_PRESCALE</b>&nbsp;&nbsp;&nbsp;ADC_PRESCALE_DIV64</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga17" doxytag="a2d::ADC_PRESCALE_MASK"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_PRESCALE_MASK</b>&nbsp;&nbsp;&nbsp;0x07</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga18" doxytag="a2d::ADC_REFERENCE_AREF"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga18">ADC_REFERENCE_AREF</a>&nbsp;&nbsp;&nbsp;0x00</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">0x00 -&gt; AREF pin, internal VREF turned off <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga19" doxytag="a2d::ADC_REFERENCE_AVCC"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga19">ADC_REFERENCE_AVCC</a>&nbsp;&nbsp;&nbsp;0x01</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">0x01 -&gt; AVCC pin, internal VREF turned off <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga20" doxytag="a2d::ADC_REFERENCE_RSVD"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga20">ADC_REFERENCE_RSVD</a>&nbsp;&nbsp;&nbsp;0x02</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">0x02 -&gt; Reserved <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga21" doxytag="a2d::ADC_REFERENCE_256V"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga21">ADC_REFERENCE_256V</a>&nbsp;&nbsp;&nbsp;0x03</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">0x03 -&gt; Internal 2.56V VREF <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga22" doxytag="a2d::ADC_REFERENCE"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_REFERENCE</b>&nbsp;&nbsp;&nbsp;ADC_REFERENCE_AVCC</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga23" doxytag="a2d::ADC_REFERENCE_MASK"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_REFERENCE_MASK</b>&nbsp;&nbsp;&nbsp;0xC0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga24" doxytag="a2d::ADC_MUX_MASK"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_MUX_MASK</b>&nbsp;&nbsp;&nbsp;0x1F</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga25" doxytag="a2d::ADC_CH_ADC0"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_ADC0</b>&nbsp;&nbsp;&nbsp;0x00</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga26" doxytag="a2d::ADC_CH_ADC1"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_ADC1</b>&nbsp;&nbsp;&nbsp;0x01</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga27" doxytag="a2d::ADC_CH_ADC2"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_ADC2</b>&nbsp;&nbsp;&nbsp;0x02</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga28" doxytag="a2d::ADC_CH_ADC3"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_ADC3</b>&nbsp;&nbsp;&nbsp;0x03</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga29" doxytag="a2d::ADC_CH_ADC4"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_ADC4</b>&nbsp;&nbsp;&nbsp;0x04</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga30" doxytag="a2d::ADC_CH_ADC5"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_ADC5</b>&nbsp;&nbsp;&nbsp;0x05</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga31" doxytag="a2d::ADC_CH_ADC6"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_ADC6</b>&nbsp;&nbsp;&nbsp;0x06</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga32" doxytag="a2d::ADC_CH_ADC7"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_ADC7</b>&nbsp;&nbsp;&nbsp;0x07</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga33" doxytag="a2d::ADC_CH_122V"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga33">ADC_CH_122V</a>&nbsp;&nbsp;&nbsp;0x1E</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">1.22V voltage reference <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga34" doxytag="a2d::ADC_CH_AGND"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga34">ADC_CH_AGND</a>&nbsp;&nbsp;&nbsp;0x1F</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">AGND. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga35" doxytag="a2d::ADC_CH_0_0_DIFF10X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_0_0_DIFF10X</b>&nbsp;&nbsp;&nbsp;0x08</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga36" doxytag="a2d::ADC_CH_1_0_DIFF10X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_1_0_DIFF10X</b>&nbsp;&nbsp;&nbsp;0x09</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga37" doxytag="a2d::ADC_CH_0_0_DIFF200X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_0_0_DIFF200X</b>&nbsp;&nbsp;&nbsp;0x0A</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga38" doxytag="a2d::ADC_CH_1_0_DIFF200X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_1_0_DIFF200X</b>&nbsp;&nbsp;&nbsp;0x0B</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga39" doxytag="a2d::ADC_CH_2_2_DIFF10X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_2_2_DIFF10X</b>&nbsp;&nbsp;&nbsp;0x0C</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga40" doxytag="a2d::ADC_CH_3_2_DIFF10X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_3_2_DIFF10X</b>&nbsp;&nbsp;&nbsp;0x0D</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga41" doxytag="a2d::ADC_CH_2_2_DIFF200X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_2_2_DIFF200X</b>&nbsp;&nbsp;&nbsp;0x0E</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga42" doxytag="a2d::ADC_CH_3_2_DIFF200X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_3_2_DIFF200X</b>&nbsp;&nbsp;&nbsp;0x0F</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga43" doxytag="a2d::ADC_CH_0_1_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_0_1_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x10</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga44" doxytag="a2d::ADC_CH_1_1_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_1_1_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x11</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga45" doxytag="a2d::ADC_CH_2_1_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_2_1_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x12</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga46" doxytag="a2d::ADC_CH_3_1_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_3_1_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x13</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga47" doxytag="a2d::ADC_CH_4_1_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_4_1_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x14</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga48" doxytag="a2d::ADC_CH_5_1_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_5_1_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x15</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga49" doxytag="a2d::ADC_CH_6_1_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_6_1_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x16</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga50" doxytag="a2d::ADC_CH_7_1_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_7_1_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x17</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga51" doxytag="a2d::ADC_CH_0_2_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_0_2_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x18</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga52" doxytag="a2d::ADC_CH_1_2_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_1_2_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x19</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga53" doxytag="a2d::ADC_CH_2_2_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_2_2_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x1A</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga54" doxytag="a2d::ADC_CH_3_2_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_3_2_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x1B</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga55" doxytag="a2d::ADC_CH_4_2_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_4_2_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x1C</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga56" doxytag="a2d::ADC_CH_5_2_DIFF1X"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADC_CH_5_2_DIFF1X</b>&nbsp;&nbsp;&nbsp;0x1D</td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga0">a2dInit</a> (void)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga1" doxytag="a2d::a2dOff"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga1">a2dOff</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Turn off A/D converter. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga2">a2dSetPrescaler</a> (unsigned char prescale)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga3">a2dSetReference</a> (unsigned char ref)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga4" doxytag="a2d::a2dSetChannel"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga4">a2dSetChannel</a> (unsigned char ch)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">sets the a2d input channel <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga5" doxytag="a2d::a2dStartConvert"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga5">a2dStartConvert</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">start a conversion on the current a2d input channel <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga6" doxytag="a2d::a2dIsComplete"></a>
u08&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga6">a2dIsComplete</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return TRUE if conversion is complete <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned short&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga7">a2dConvert10bit</a> (unsigned char ch)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__a2d.html#ga8">a2dConvert8bit</a> (unsigned char ch)</td></tr>

</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga7" doxytag="a2d.h::a2dConvert10bit"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">unsigned short a2dConvert10bit           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ch</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Starts a conversion on A/D channel# ch, returns the 10-bit value of the conversion when it is finished. 
<p>
Definition at line <a class="el" href="a2d_8c-source.html#l00087">87</a> of file <a class="el" href="a2d_8c-source.html">a2d.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga8" doxytag="a2d.h::a2dConvert8bit"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">unsigned char a2dConvert8bit           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ch</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Starts a conversion on A/D channel# ch, returns the 8-bit value of the conversion when it is finished. 
<p>
Definition at line <a class="el" href="a2d_8c-source.html#l00103">103</a> of file <a class="el" href="a2d_8c-source.html">a2d.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga0" doxytag="a2d.h::a2dInit"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void a2dInit           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Initializes the A/D converter. Turns ADC on and prepares it for use. 
<p>
Definition at line <a class="el" href="a2d_8c-source.html#l00033">33</a> of file <a class="el" href="a2d_8c-source.html">a2d.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga2" doxytag="a2d.h::a2dSetPrescaler"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void a2dSetPrescaler           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>prescale</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the division ratio of the A/D converter clock. This function is automatically called from <a class="el" href="group__a2d.html#ga0">a2dInit()</a> with a default value. 
<p>
Definition at line <a class="el" href="a2d_8c-source.html#l00055">55</a> of file <a class="el" href="a2d_8c-source.html">a2d.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga3" doxytag="a2d.h::a2dSetReference"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void a2dSetReference           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ref</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Configures which voltage reference the A/D converter uses. This function is automatically called from <a class="el" href="group__a2d.html#ga0">a2dInit()</a> with a default value. 
<p>
Definition at line <a class="el" href="a2d_8c-source.html#l00061">61</a> of file <a class="el" href="a2d_8c-source.html">a2d.c</a>.    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:09 2006 for Procyon AVRlib by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>
{FILE END}
{FOOTER START}

Powered by WebSVN v2.8.3