<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C653F9.D332ED10">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:HyphenationZone>21</w:HyphenationZone>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.StylZprvyElektronickPoty17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Norm\00E1ln\00ED tabulka";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=CS link=blue vlink=purple style='tab-interval:35.4pt'>
<div class=Section1>
<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Zdravim</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>,<o:p></o:p></span></font></p>
<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>potrebuji</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> v <span
class=SpellE>PICu</span> vyhodnotit pomoci <span class=SpellE>globalni</span> <span
class=SpellE>promenne</span>, pokles <span class=SpellE>napajeni</span> s <span
class=SpellE>nastavenim</span> hystereze. <span
style='mso-spacerun:yes'> </span><span class=SpellE>Myslite</span>, ze by
tohle mohlo fungovat ? V <span class=SpellE>globalni</span> <span
class=SpellE>promenne</span> g_<span class=SpellE>LowPower</span> by tak byl <span
class=SpellE>vzdy</span> <span class=SpellE>aktualni</span> stav <span
class=SpellE>napajeciho</span> <span class=SpellE>napeti</span> PICe.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>#INT_LOWVOLT<span style='mso-spacerun:yes'>
</span>//procedura pro <span class=SpellE>zpracovani</span> <span class=SpellE>preruseni</span>
<span class=SpellE>pri</span> <span class=SpellE>zmene</span> <span
class=SpellE>napajeciho</span> <span class=SpellE>napeti</span><o:p></o:p></span></font></p>
<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>void</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> <span
class=SpellE>int</span>_<span class=SpellE>low</span>_<span class=SpellE>power</span>(<span
class=SpellE>void</span>){<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'> </span><span
class=SpellE>if</span> (g_<span class=SpellE>LowPower</span>==0) {<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span
style='mso-spacerun:yes'> </span>g_<span
class=SpellE>LowPower</span>=1;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>setup</span>_<span class=SpellE>low</span>_volt_<span
class=SpellE>detect</span>(LVD_TRIGGER_ABOVE|LVD_40 ); //<span class=SpellE>nizke</span>
<span class=SpellE>napeti</span> – <span class=SpellE>nastavi</span> <span
class=SpellE>dalsi</span> <span class=SpellE>preruseni</span> <span
class=SpellE>az</span> <span class=SpellE>pri</span> <span class=SpellE>spravnem</span>
<span class=SpellE>napajeni</span> >4V<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'> </span>}<span
class=SpellE>else</span>{<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span
style='mso-spacerun:yes'> </span>g_<span
class=SpellE>LowPower</span>=0;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>setup</span>_<span class=SpellE>low</span>_volt_<span
class=SpellE>detect</span>(LVD_TRIGGER_BELOW|LVD_36 ); <span class=SpellE>napeti</span>
je OK – <span class=SpellE>nastavi</span> <span class=SpellE>dalsi</span>
<span class=SpellE>preruseni</span> <span class=SpellE>az</span> <span
class=SpellE>pri</span> poklesu <span class=SpellE>napajeni</span> <3.6V<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'> </span>}<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>}<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>void</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> <span
class=SpellE>main</span></span></font><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'>(){<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>
</span>g_<span class=SpellE>LowPower</span>=0;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>
</span><span class=SpellE>setup</span>_<span class=SpellE>low</span>_volt_<span
class=SpellE>detect</span>(LVD_TRIGGER_BELOW|LVD_36 );<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'> </span><span
style='mso-spacerun:yes'> </span><span class=SpellE>while</span> (<span
class=SpellE>true</span>){};<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>}<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Milos</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>
</div>
</body>
</html>