This repository has been archived on 2024-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
Solar-Panel/html/adc_8c.html

353 lines
20 KiB
HTML
Raw Normal View History

2023-03-15 11:55:57 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Solar panel: mcc_generated_files/adc.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Solar panel
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('adc_8c.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">adc.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;xc.h&gt;</code><br />
<code>#include &quot;<a class="el" href="adc_8h_source.html">adc.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="device__config_8h_source.html">device_config.h</a>&quot;</code><br />
</div>
<p><a href="adc_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ab0e0ea1662a8e789547210a2d33127e1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="adc_8c.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize</a> (void)</td></tr>
<tr class="separator:ab0e0ea1662a8e789547210a2d33127e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25c0a0a9fe2bdba070f9945ca641b5e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="adc_8c.html#a25c0a0a9fe2bdba070f9945ca641b5e0">ADC_SelectChannel</a> (<a class="el" href="adc_8h.html#aafc4060027875f8fe46242b0656d7814">adc_channel_t</a> channel)</td></tr>
<tr class="separator:a25c0a0a9fe2bdba070f9945ca641b5e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af96ee69b063edcebc656d0ca0450c12c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="adc_8c.html#af96ee69b063edcebc656d0ca0450c12c">ADC_StartConversion</a> (void)</td></tr>
<tr class="separator:af96ee69b063edcebc656d0ca0450c12c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5c10c1709aeacf08e783c3ea174463b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="adc_8c.html#ad5c10c1709aeacf08e783c3ea174463b">ADC_IsConversionDone</a> (void)</td></tr>
<tr class="separator:ad5c10c1709aeacf08e783c3ea174463b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9650956bd92194e1b9f0bfd5bb2d73dd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="adc_8h.html#ac5362ae65441a5027b4b9b1bf1b573aa">adc_result_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="adc_8c.html#a9650956bd92194e1b9f0bfd5bb2d73dd">ADC_GetConversionResult</a> (void)</td></tr>
<tr class="separator:a9650956bd92194e1b9f0bfd5bb2d73dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81501f9b96aa9bb8dbe63b49d0f8e909"><td class="memItemLeft" align="right" valign="top"><a class="el" href="adc_8h.html#ac5362ae65441a5027b4b9b1bf1b573aa">adc_result_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="adc_8c.html#a81501f9b96aa9bb8dbe63b49d0f8e909">ADC_GetConversion</a> (<a class="el" href="adc_8h.html#aafc4060027875f8fe46242b0656d7814">adc_channel_t</a> channel)</td></tr>
<tr class="separator:a81501f9b96aa9bb8dbe63b49d0f8e909"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46bdd78f96c668432d4ff33115c9dcd9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="adc_8c.html#a46bdd78f96c668432d4ff33115c9dcd9">ADC_TemperatureAcquisitionDelay</a> (void)</td></tr>
<tr class="separator:a46bdd78f96c668432d4ff33115c9dcd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:afd07ad436449919718eb6b73351335f6"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="adc_8c.html#afd07ad436449919718eb6b73351335f6">ADC_InterruptHandler</a> )(void)</td></tr>
<tr class="separator:afd07ad436449919718eb6b73351335f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a81501f9b96aa9bb8dbe63b49d0f8e909" name="a81501f9b96aa9bb8dbe63b49d0f8e909"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81501f9b96aa9bb8dbe63b49d0f8e909">&#9670;&#160;</a></span>ADC_GetConversion()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="adc_8h.html#ac5362ae65441a5027b4b9b1bf1b573aa">adc_result_t</a> ADC_GetConversion </td>
<td>(</td>
<td class="paramtype"><a class="el" href="adc_8h.html#aafc4060027875f8fe46242b0656d7814">adc_channel_t</a>&#160;</td>
<td class="paramname"><em>channel</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>@Summary Returns the ADC conversion value also allows selection of a channel for conversion.</p>
<p>@Description This routine is used to select desired channel for conversion and to get the analog to digital converted value.</p>
<p>@Preconditions <a class="el" href="adc_8h.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize()</a> function should have been called before calling this function.</p>
<p>@Returns Returns the converted value.</p>
<p>@Param Pass in required channel number. "For available channel refer to enum under adc.h file"</p>
<p>@Example <code> uint16_t convertedValue;</code></p>
<p><code> <a class="el" href="adc_8h.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize()</a>;</code></p>
<p><code> conversion = ADC_GetConversion(AN1_Channel); </code> </p>
<p class="definition">Definition at line <a class="el" href="adc_8c_source.html#l00109">109</a> of file <a class="el" href="adc_8c_source.html">adc.c</a>.</p>
</div>
</div>
<a id="a9650956bd92194e1b9f0bfd5bb2d73dd" name="a9650956bd92194e1b9f0bfd5bb2d73dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9650956bd92194e1b9f0bfd5bb2d73dd">&#9670;&#160;</a></span>ADC_GetConversionResult()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="adc_8h.html#ac5362ae65441a5027b4b9b1bf1b573aa">adc_result_t</a> ADC_GetConversionResult </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>@Summary Returns the ADC conversion value.</p>
<p>@Description This routine is used to get the analog to digital converted value. This routine gets converted values from the channel specified.</p>
<p>@Preconditions This routine returns the conversion value only after the conversion is complete. Completion status can be checked using <a class="el" href="adc_8h.html#ad5c10c1709aeacf08e783c3ea174463b">ADC_IsConversionDone()</a> routine.</p>
<p>@Returns Returns the converted value.</p>
<p>@Param None</p>
<p>@Example <code> uint16_t convertedValue;</code></p>
<p><code> <a class="el" href="adc_8h.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize()</a>; <a class="el" href="adc_8h.html#af96ee69b063edcebc656d0ca0450c12c">ADC_StartConversion()</a>;</code></p>
<p><code> while(ADC_IsConversionDone());</code></p>
<p><code> convertedValue = <a class="el" href="adc_8h.html#a9650956bd92194e1b9f0bfd5bb2d73dd">ADC_GetConversionResult()</a>; </code> </p>
<p class="definition">Definition at line <a class="el" href="adc_8c_source.html#l00103">103</a> of file <a class="el" href="adc_8c_source.html">adc.c</a>.</p>
</div>
</div>
<a id="ab0e0ea1662a8e789547210a2d33127e1" name="ab0e0ea1662a8e789547210a2d33127e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0e0ea1662a8e789547210a2d33127e1">&#9670;&#160;</a></span>ADC_Initialize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ADC_Initialize </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Section: ADC Module APIs </p>
<p class="definition">Definition at line <a class="el" href="adc_8c_source.html#l00061">61</a> of file <a class="el" href="adc_8c_source.html">adc.c</a>.</p>
</div>
</div>
<a id="ad5c10c1709aeacf08e783c3ea174463b" name="ad5c10c1709aeacf08e783c3ea174463b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5c10c1709aeacf08e783c3ea174463b">&#9670;&#160;</a></span>ADC_IsConversionDone()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ADC_IsConversionDone </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>@Summary Returns true when the conversion is completed otherwise false.</p>
<p>@Description This routine is used to determine if conversion is completed. When conversion is complete routine returns true. It returns false otherwise.</p>
<p>@Preconditions <a class="el" href="adc_8h.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize()</a> and <a class="el" href="adc_8h.html#af96ee69b063edcebc656d0ca0450c12c">ADC_StartConversion(void)</a> function should have been called before calling this function.</p>
<p>@Returns true - If conversion is complete false - If conversion is not completed</p>
<p>@Param None</p>
<p>@Example <code> uint16_t convertedValue;</code></p>
<p><code> <a class="el" href="adc_8h.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize()</a>; <a class="el" href="adc_8h.html#af96ee69b063edcebc656d0ca0450c12c">ADC_StartConversion()</a>;</code></p>
<p><code> while(!ADC_IsConversionDone()); convertedValue = <a class="el" href="adc_8h.html#a9650956bd92194e1b9f0bfd5bb2d73dd">ADC_GetConversionResult()</a>; </code> </p>
<p class="definition">Definition at line <a class="el" href="adc_8c_source.html#l00097">97</a> of file <a class="el" href="adc_8c_source.html">adc.c</a>.</p>
</div>
</div>
<a id="a25c0a0a9fe2bdba070f9945ca641b5e0" name="a25c0a0a9fe2bdba070f9945ca641b5e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a25c0a0a9fe2bdba070f9945ca641b5e0">&#9670;&#160;</a></span>ADC_SelectChannel()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ADC_SelectChannel </td>
<td>(</td>
<td class="paramtype"><a class="el" href="adc_8h.html#aafc4060027875f8fe46242b0656d7814">adc_channel_t</a>&#160;</td>
<td class="paramname"><em>channel</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>@Summary Allows selection of a channel for conversion</p>
<p>@Description This routine is used to select desired channel for conversion. available</p>
<p>@Preconditions <a class="el" href="adc_8h.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize()</a> function should have been called before calling this function.</p>
<p>@Returns None</p>
<p>@Param Pass in required channel number "For available channel refer to enum under adc.h file"</p>
<p>@Example <code> uint16_t convertedValue;</code></p>
<p><code> <a class="el" href="adc_8h.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize()</a>; ADC_SelectChannel(AN1_Channel); <a class="el" href="adc_8h.html#af96ee69b063edcebc656d0ca0450c12c">ADC_StartConversion()</a>; convertedValue = <a class="el" href="adc_8h.html#a9650956bd92194e1b9f0bfd5bb2d73dd">ADC_GetConversionResult()</a>; </code> </p>
<p class="definition">Definition at line <a class="el" href="adc_8c_source.html#l00082">82</a> of file <a class="el" href="adc_8c_source.html">adc.c</a>.</p>
</div>
</div>
<a id="af96ee69b063edcebc656d0ca0450c12c" name="af96ee69b063edcebc656d0ca0450c12c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af96ee69b063edcebc656d0ca0450c12c">&#9670;&#160;</a></span>ADC_StartConversion()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ADC_StartConversion </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>@Summary Starts conversion</p>
<p>@Description This routine is used to start conversion of desired channel.</p>
<p>@Preconditions <a class="el" href="adc_8h.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize()</a> function should have been called before calling this function.</p>
<p>@Returns None</p>
<p>@Param None</p>
<p>@Example <code> uint16_t convertedValue;</code></p>
<p><code> <a class="el" href="adc_8h.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize()</a>; <br />
<a class="el" href="adc_8h.html#af96ee69b063edcebc656d0ca0450c12c">ADC_StartConversion()</a>; convertedValue = <a class="el" href="adc_8h.html#a9650956bd92194e1b9f0bfd5bb2d73dd">ADC_GetConversionResult()</a>; </code> </p>
<p class="definition">Definition at line <a class="el" href="adc_8c_source.html#l00090">90</a> of file <a class="el" href="adc_8c_source.html">adc.c</a>.</p>
</div>
</div>
<a id="a46bdd78f96c668432d4ff33115c9dcd9" name="a46bdd78f96c668432d4ff33115c9dcd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46bdd78f96c668432d4ff33115c9dcd9">&#9670;&#160;</a></span>ADC_TemperatureAcquisitionDelay()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ADC_TemperatureAcquisitionDelay </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>@Summary Acquisition Delay for temperature sensor</p>
<p>@Description This routine should be called when temperature sensor is used.</p>
<p>@Preconditions <a class="el" href="adc_8h.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize()</a> function should have been called before calling this function.</p>
<p>@Returns None</p>
<p>@Param None</p>
<p>@Example <code> uint16_t convertedValue;</code></p>
<p><code> <a class="el" href="adc_8h.html#ab0e0ea1662a8e789547210a2d33127e1">ADC_Initialize()</a>; <br />
<a class="el" href="adc_8h.html#af96ee69b063edcebc656d0ca0450c12c">ADC_StartConversion()</a>; ADC_temperatureAcquisitionDelay(); convertedValue = <a class="el" href="adc_8h.html#a9650956bd92194e1b9f0bfd5bb2d73dd">ADC_GetConversionResult()</a>; </code> </p>
<p class="definition">Definition at line <a class="el" href="adc_8c_source.html#l00129">129</a> of file <a class="el" href="adc_8c_source.html">adc.c</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="afd07ad436449919718eb6b73351335f6" name="afd07ad436449919718eb6b73351335f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd07ad436449919718eb6b73351335f6">&#9670;&#160;</a></span>ADC_InterruptHandler</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* ADC_InterruptHandler) (void) </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>ADC Generated Driver File</p>
<p>@Company Microchip Technology Inc.</p>
<p>@File Name <a class="el" href="adc_8c.html">adc.c</a></p>
<p>@Summary This is the generated driver implementation file for the ADC driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs</p>
<p>@Description This source file provides implementations for driver APIs for ADC. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 Device : PIC18F97J60 Driver Version : 2.02 The generated drivers are tested against the following: Compiler : XC8 2.36 and above MPLAB : MPLAB X 6.00 Section: Included Files </p>
<p class="definition">Definition at line <a class="el" href="adc_8c_source.html#l00055">55</a> of file <a class="el" href="adc_8c_source.html">adc.c</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_0ad8aa10ae8c15a00cc43e117933779f.html">mcc_generated_files</a></li><li class="navelem"><a class="el" href="adc_8c.html">adc.c</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>