有类似 pic c 的文档吗?
我正在使用 Microchip 的 c 语言 和 PIC 处理器学习微控制器编程,但某些预处理器指令对我来说并不明显。
例如:
#fuses NOWDT
我尝试寻找此类说明的文档,但失败了。
如有帮助,将不胜感激。
I am learning microcontroller programming using the c language and the PIC processor from Microchip, but there are certain preprocessor directives that are not obvious to me.
For Example:
#fuses NOWDT
I have tried looking for the documentation for such instructions but i have failed.
Help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
该预处理器指令似乎对于CCS C编译器来说是特殊的,并列在手册。
That preprocessor directive appears to be special to the CCS C compiler, and is listed in the manual.
NOWDT
表示看门狗定时器已禁用。NOWDT
必须在库文件之一中定义。NOWDT
指向 MCPU 配置字中的位。NOWDT
mean watchdog timer disabled.NOWDT
must be defined in one of library files.NOWDT
point to bit in MCPU config word.#fuses
指令是 CCS 编译器所独有的。NOWDT
表示看门狗定时器被禁用。 (看门狗定时器可以帮助您处理 C 代码中导致应用程序挂起的问题。我们的想法是,您经常重置看门狗定时器“踢看门狗”,以避免它自动重置。它就像一个为您的程序“保持活力”。)这是CCS 手册。值得打印出来并放在办公桌上。查找有关
#fuses
的部分以查看部分列表。编译器附带的完整保险丝列表位于文本文件中。这取决于你的芯片。
例如: http://www.ccsinfo.com/forum/viewtopic.php? t=42945
您还可以通过阅读特定处理器的规格表来了解可能可用的保险丝及其用途。 CCS 编译器和处理器规格表之间的确切术语有所不同。你必须稍微解读一下它。
The
#fuses
directive is unique to the CCS compiler.NOWDT
means that the watchdog timer is disabled. (A watchdog timer is what helps you deal with problems in your C code that cause your app to hang. The thinking is that you reset the watchdog timer 'kick the watch dog' every so often to avoid it from automatic resets. It's like a "Keep Alive" for your program.)Here's the CCS manual. It's worth printing out and keeping on your desk. Look for the section on
#fuses
to see a partial list.The full list of fuses comes with the compiler in a text file. It is dependent on your chip.
For example: http://www.ccsinfo.com/forum/viewtopic.php?t=42945
You can also get a sense of what fuses are probably available and what they do by reading the spec sheet for your particular processor. The exact terms will differ between the CCS compiler and the processor spec sheet. You'll have to decipher it a little bit.