完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
亲爱的先生,请告诉我如何在没有计时器的情况下创建10秒的延迟。我使用PIC16F1516,MPLAB X IDE,高科技C编译器。问候,Manoj
以上来自于百度翻译 以下为原文 Dear sir, Please tell me how to create a delay of 10 sec without timer. I am using PIC16F1516, MPLAB X IDE, HI-TECH C compiler. Regards, Manoj |
|
相关推荐
3个回答
|
|
|
为什么没有计时器?这是最好的方法。你可以只使用内置的y-DelayyMs-()宏,但我不认为它接受一个100000的参数,所以你可以把它称为十圈,记住你的PIC在延迟中什么也不能做(除了服务中断)。R手册。它需要一个“xxTalthFrq”的定义,为什么当它被XC8替换时使用HiTeCH?
以上来自于百度翻译 以下为原文 Why without a timer? That is the best way to do it. You could just the built-in __delay_ms() macro, but I don't think it accepts an argument of 10000 so you could call it ten times in a loop unsigned char loopcount; for (loopcount=10; loopcount !=0; ;--loopcount) __delay_ms(1000); Bear in mind that your PIC can do nothing else (except service interrupts) while it is in the delay. Read about that macro in the user manual. It needs a #define for "_XTAL_FREQ" Why use HiTech C when it has been replaced with XC8? |
|
|
|
|
|
运行PIC在4赫兹,并使用10个NOP指令的延迟。
以上来自于百度翻译 以下为原文 Run the PIC at 4 Hz and use 10 NOP instructions for the delay. |
|
|
|
|
|
嗨,请纠正你的线程标题中的PIC名称,以便以后可以搜索(PIC16F1516)
以上来自于百度翻译 以下为原文 Hi, Please correct the PIC name in your thread title so that it can be searched later ( PIC16F1516 ) Regards |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1123浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1095浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 01:43 , Processed in 1.779788 second(s), Total 74, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1912