?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: TI ADS7870 SPI A/D Converter Driver (ads7870.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>TI ADS7870 SPI A/D Converter Driver (ads7870.c)<br>
<small>
[<a class="el" href="group__driver__hw.html">Drivers (for external hardware)</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="ads7870_8h.html">ads7870.h</a>"</span> 
</pre></div> <dl compact><dt><b>Overview</b></dt><dd>This library provides high-level functions for accessing the Texas Instruments ADS7870 I2C A/D Converter.</dd></dl>
The basic specs of the ADS7870 are:<ul>
<li>Fast SPI interface (up to 20MHz)</li><li>12-bit results</li><li>8 single-ended or 4 differential input channels</li><li>Programmable gain stage (1,2,4,5,8,10,16,20x gains)</li><li>Software or hardware triggered conversion</li><li>4-bit auxiliary digital I/O lines (controlled via serial interface)</li><li>Up to 50KHz conversion rate</li><li>External reference or internal 2.5V, 2.048V, 1.15V reference</li><li>NOTE: use pin-compatible ADS7871 for 14-bit results </li></ul>

<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="ga6" doxytag="ads7870::ADS7870_CS_PORT"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADS7870_CS_PORT</b>&nbsp;&nbsp;&nbsp;PORTB</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga7" doxytag="ads7870::ADS7870_CS_DDR"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADS7870_CS_DDR</b>&nbsp;&nbsp;&nbsp;DDRB</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga8" doxytag="ads7870::ADS7870_CS_PIN"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADS7870_CS_PIN</b>&nbsp;&nbsp;&nbsp;PB0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga9" doxytag="ads7870::ADS7870_CONVERT"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADS7870_CONVERT</b>&nbsp;&nbsp;&nbsp;0x80</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga10" doxytag="ads7870::ADS7870_REG_READ"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADS7870_REG_READ</b>&nbsp;&nbsp;&nbsp;0x40</td></tr>

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

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga12" doxytag="ads7870::ADS7870_REG_16BIT"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADS7870_REG_16BIT</b>&nbsp;&nbsp;&nbsp;0x20</td></tr>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga57" doxytag="ads7870::ADS7870_CH_0"></a>
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_0</b>&nbsp;&nbsp;&nbsp;0x08</td></tr>

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

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

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

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

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

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

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

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

<tr><td class="memItemLeft" nowrap align="right" valign="top">s16&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ads7870.html#ga1">ads7870Convert</a> (u08 channel)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">s16&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ads7870.html#ga2">ads7870ConvertDiff</a> (u08 channel)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">s16&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ads7870.html#ga3">ads7870ConvertRaw</a> (u08 channel)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">u08&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ads7870.html#ga4">ads7870ReadReg</a> (u08 reg)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ads7870.html#ga5">ads7870WriteReg</a> (u08 reg, u08 value)</td></tr>

</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga1" doxytag="ads7870.h::ads7870Convert"></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">s16 ads7870Convert           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u08&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>channel</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>
Begin single-ended conversion on given logical channel#0-7, and return result. <dl compact><dt><b>Note:</b></dt><dd>Result is returned left-justified. </dd></dl>

<p>
Definition at line <a class="el" href="ads7870_8c-source.html#l00056">56</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga2" doxytag="ads7870.h::ads7870ConvertDiff"></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">s16 ads7870ConvertDiff           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u08&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>channel</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>
Begin differential conversion on given channel pair, and return result. <dl compact><dt><b>Note:</b></dt><dd>Result is returned left-justified. </dd></dl>

<p>
Definition at line <a class="el" href="ads7870_8c-source.html#l00064">64</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga3" doxytag="ads7870.h::ads7870ConvertRaw"></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">s16 ads7870ConvertRaw           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u08&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>channel</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>
Begin conversion on given raw channel#, and return result. <dl compact><dt><b>Note:</b></dt><dd>Result is returned left-justified. </dd></dl>

<p>
Definition at line <a class="el" href="ads7870_8c-source.html#l00072">72</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga0" doxytag="ads7870.h::ads7870Init"></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">u08 ads7870Init           </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>
Initialize the ADS7870 chip. Returns: TRUE if successful, FALSE if unsuccessful (chip not responding). 
<p>
Definition at line <a class="el" href="ads7870_8c-source.html#l00032">32</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga4" doxytag="ads7870.h::ads7870ReadReg"></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">u08 ads7870ReadReg           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u08&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>reg</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>
Read value from ADS7870 register. 
<p>
Definition at line <a class="el" href="ads7870_8c-source.html#l00093">93</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga5" doxytag="ads7870.h::ads7870WriteReg"></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 ads7870WriteReg           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u08&nbsp;</td>
          <td class="mdname" nowrap> <em>reg</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>u08&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Write value into ADS7870 register. 
<p>
Definition at line <a class="el" href="ads7870_8c-source.html#l00108">108</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.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