⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cc1000.html

📁 tinyos中文手册,是根据tinyos系统自带手册翻译过来的,虽然质量不好,但是对英文不强的人还是有用的
💻 HTML
📖 第 1 页 / 共 2 页
字号:
    <td width="14%">Compile time: </td>
    <td width="94%"> <tt>-DCC1K_DEF_PRESET=&lt;Index&gt; </tt></td>
  </tr>
</table>

<p>Th<tt>e CC1K_Params[]</tt> table in <tt>CC1000Const.h</tt> defines  specific operating 
parameters for a given frequency/datarate combination. The table resides in 
flash memory to minimize RAM footprint. The control path function 
<tt>CC1000Control.TunePreset()</tt> takes a given index in this table, sets 
the register values and calibrates the device. Defining the compiler flag 
<tt>CC1K_DEF_PRESET=N</tt> sets the default preset index to use when compiling the 
application. For example:</p>

<p>&nbsp;&nbsp;&nbsp; bash% <tt>CFLAGS=-DCC1K_DEF_PRESET=2 make mica2</tt></p>

<p>will build an application using preset #2 from the preset table.&nbsp; You 
can alternatively put the compiler flags as a part of your custom build 
environment.</p>

<p>The TinyOS-1.1 distribution comes with some pre-packaged presets 
defined in <tt>CC1000Const.h</tt>. Use the <tt>channelgen</tt> tool to generate additional presets 
if desired. <br>
NOTE:
When using preset tuning, ALL of the preset parameters are programmed in the 
device, including the modem control registers.</p>

<p><u><i>Using</i> <tt>channelgen</tt></u></p>

<p>To build the tool, change to the <tt>tools/src/CC1000</tt> directory and type '<tt>make</tt>' at 
the command prompt.</p>

<p>SYNOPSIS</p>

<blockquote>

<p><tt><b>channelgen</b> [options] FREQUENCY</tt></p>

</blockquote>

<p>DESCRIPTION</p>

<p>The <b><tt>channelgen</tt></b> tool generates CC1000 channel information for the given 
desired <tt>FREQUENCY</tt>. The application emulates the <tt>TuneManual()</tt> component function 
of the radio stack and implements the same calculation engine. It can be used to 
determine what actual frequency the radio will use given a desired frequency 
and/or to generate a preset table entry. By default, <b><tt>channelgen</tt></b> provides only 
actual channel information. </p>

<p>OPTIONS</p>

<blockquote>

<p><b><tt>-p</tt></b> Print C-style preset table entry.</p>

</blockquote>

</blockquote>

<p>The <tt>CC1000Control</tt> interface provides additional functions to control various functions 
of the radio at runtime. Users should refer to documentation comments in 
the file <tt>CC1000Control.nc</tt>.</p>

<p><b><i><a name="Messaging"></a>- Messaging</i></b></p>

<p>The component <tt>CC1000RadioC</tt> exports the BareSendMsg and ReceiveMsg 
interfaces. Their function the same as that for the original MICA stack and can 
be directly connected to components using these interfaces. </p>

<p><i><b><a name="Low Power"></a>- Low Power Operation</b></i></p>

<p>The data path provides a method of altering the duty cycle state of the radio 
to meet power constraints of the application and/or power source. 
<tt>CC1000RadioIntM</tt> exports individual commands to set and determine the present 
duty cycle mode for both the receiving and transmitting side of the data path.&nbsp;&nbsp; 
The functions are summarized in Table 1.&nbsp; The associated listening states 
are summarized in Table 2.&nbsp; </p>

<p>Note that BOTH the receiver and transmitter must be in the same mode to 
communicate.</p>

<div align="center">
  <center>

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="87%" id="AutoNumber2">
  <tr>
    <td width="41%">
    <p align="center"><b>Command Declaration</b></td>
    <td width="59%">
    <p align="center"><b>Description</b></td>
  </tr>
  <tr>
    <td width="41%"><tt>result_t SetListeningMode(uint8_t power)</tt></td>
    <td width="59%">Sets the receiver duty cycle mode.<blockquote>
      <p><i>Parameters:</i> <tt>power</tt> - The index of the desired duty cycle mode.<br>
      <i>Returns:</i> <tt>SUCCESS</tt> if the duty cycle mode was set.</p>
    </blockquote>
    </td>
  </tr>
  <tr>
    <td width="41%"><tt>uint8_t GetListeningMode()</tt></td>
    <td width="59%">Get the current receiver duty cycle setting.<blockquote>
      <p><i>Returns:</i> The index of the present receiver duty cycle mode</p>
    </blockquote>
    </td>
  </tr>
  <tr>
    <td width="41%"><tt>result_t SetTransmitMode(uint8_t power)</tt></td>
    <td width="59%">Set the transmitter duty cycle mode.<blockquote>
      <p><i>Parameters:</i> <tt>power</tt> - The index of the desired duty cycle mode.<br>
      <i>Returns:</i> <tt>SUCCESS</tt> if the duty cycle mode was set.</p>
    </blockquote>
    </td>
  </tr>
  <tr>
    <td width="41%"><tt>uint8_t GetTransmitMode()</tt></td>
    <td width="59%">Get the current transmitter duty cycle mode.<blockquote>
      <p><i>Returns:</i> The index of the present transmitter duty cycle mode.</p>
    </blockquote>
    </td>
  </tr>
</table>

  </center>
</div>

<p align="center"><b>Table 1: Radio data path duty cycle control commands.</b></p>

<p align="center">&nbsp;</p>

<div align="center">
  <center>
  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="65%" id="AutoNumber3">
    <tr>
      <td width="9%" align="center"><b>Mode</b></td>
      <td width="23%" align="center"><b>Duty Cycle %)</b></td>
      <td width="36%" align="center"><b>Max Packet Rate (pkts/sec)</b></td>
      <td width="32%" align="center"><b>Effective Data Rate (kbps)</b></td>
    </tr>
    <tr>
      <td width="9%" align="center">0</td>
      <td width="23%" align="center">100</td>
      <td width="36%" align="center">42.93</td>
      <td width="32%" align="center">12.364</td>
    </tr>
    <tr>
      <td width="9%" align="center">1</td>
      <td width="23%" align="center">35.5</td>
      <td width="36%" align="center">19.69</td>
      <td width="32%" align="center">5.671</td>
    </tr>
    <tr>
      <td width="9%" align="center">2</td>
      <td width="23%" align="center">11.5</td>
      <td width="36%" align="center">8.64</td>
      <td width="32%" align="center">2.488</td>
    </tr>
    <tr>
      <td width="9%" align="center">3</td>
      <td width="23%" align="center">7.53</td>
      <td width="36%" align="center">6.03</td>
      <td width="32%" align="center">1.737</td>
    </tr>
    <tr>
      <td width="9%" align="center">4</td>
      <td width="23%" align="center">5.61</td>
      <td width="36%" align="center">4.64</td>
      <td width="32%" align="center">1.336</td>
    </tr>
    <tr>
      <td width="9%" align="center">5</td>
      <td width="23%" align="center">2.22</td>
      <td width="36%" align="center">1.94</td>
      <td width="32%" align="center">0.559</td>
    </tr>
    <tr>
      <td width="9%" align="center">6</td>
      <td width="23%" align="center">1.00</td>
      <td width="36%" align="center">0.89</td>
      <td width="32%" align="center">0.258</td>
    </tr>
  </table>
  </center>
</div>

<p align="center"><b>Table 2: Duty cycle modes and their corresponding packet 
and data rates.</b></p>

<table border=0 hspace=4 cellspacing=2 width="100%" cellpadding=3>
<tr bgcolor="#e0e0ff">
<td width="100%"><b><font face="arial,helvetica">Updates</font></b></td>
</tr></table>

<p>This page will be updated as new features/fixes are made to the radio stack.</p>

<p>Last updated:
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%m/%d/%Y" startspan -->11/17/2003<!--webbot bot="Timestamp" endspan i-checksum="12605" --></p>

<p></p>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -