完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
我在2006编写了16F88汇编程序。它使用一个轨道块(这是一个稳定的信号)通过伺服电机将门关闭,并使用定时器中断闪烁灯。现在,我需要使用一个IR信号,将中断(在汽车之间)。我有一个不同的程序,有一个例程,使用计数器来确定列车的终点。大约5秒钟没有变化。问题是新程序是C语言的。我仍然想使用16F88,我是否应该重写旧代码,包括计数器延迟,还是应该在汇编中计算计数器延迟?我是C的新成员,忘了我在大会上的大部分内容。感谢您的帮助,谢谢您,杰伊爷爷。
以上来自于百度翻译 以下为原文 Gentlemen Back in 2006 I wrote a program for the 16F88 in assembly. That used a track block (this is a steady signal) to bring the gates down using servo motors and flash the lights using timer0 interrupt. Now I need to use an IR signal that will be interrupted (between cars). I have a different program that has a routine that uses a counter to determine the end of train. About 5 seconds with no change. The problem is that the new program is in C. I still want to use the 16F88, should I rewrite the old code and include the counter delay or figure out how to do the counter delay in assembly? I am new to C and forgot most of what I new in assembly. Any help will be appreciated, Thank you Grandpa Jay |
|
相关推荐
5个回答
|
|
经销商选择。添加了代码空间,任何语言都可以完成这项工作。
以上来自于百度翻译 以下为原文 Dealers choice. Adding you have the code space either language will do the job. |
|
|
|
在这里你可能会得到比大型汇编程序项目更多的对大型C项目的支持,而且通常用C编写的两个不同程序的块比用汇编程序拼凑起来要容易得多,因为本地化它们的交互要容易得多。老话题从2014:16F88 PWM伺服运动有你的2006汇编代码和我的简单的CCP伺服演示在C.
以上来自于百度翻译 以下为原文 You'll probably get more support here for a big C project than a big assembler project and its generally far easier to patch together chunks of two different programs written in C rather than assembler, because its a lot easier to localise their interactions. I assume this project is related to your old topic from 2014: 16f88 PWM servo movement which has your 2006 assembler code and my simple CCP servo demo in C. |
|
|
|
|
|
|
|
谢谢你提醒我这个老职位。我将开始在C.重写这个程序,这需要一些时间。杰伊
以上来自于百度翻译 以下为原文 Ian Thank you for reminding me of the old post. I will start rewriting the program in C. This will take some time. Jay |
|
|
|
还有,你去年夏天的主题:需要帮助的12F1572PWM1有很多关于火车探测和汽车之间的间隙问题+由于使用红外接收器用于数据而不是波束中断应用而引起的特殊问题。你是使用相同的红外接收器,还是有更多的ap?适当的?如果你使用的是需要调制的,你真的需要一个PIC带有两个CCP模块,因为你需要一个用于伺服,另一个用于产生38KHz(或任何载波频率)IR LED驱动信号,除非你当然想要使用外部脉冲驱动芯片用于LED(例如,LED)CMOS 555方波不稳定),如果需要的PIC门控。也许28引脚PIC16F886是合适的,但增强中档部分至少有两个(E)CCP模块通常是更便宜的,给你更多的选择在较低的引脚数量。
以上来自于百度翻译 以下为原文 Also, your topic from last summer: Need help 12F1572 PWM1 had a lot about the train detection and the gap between cars problem + special problems due to the use of IR receivers intended for data rather than beam break applications. Are you using the same IR receivers, or have you got something more appropriate? If you are using ones that require modulation, you *really* need a PIC with two CCP modules, as you'll need one for the servo and the other for generating the 38KHz (or whatever carrier frequency) IR LED drive signal, unless of course you want to use an external pulsed drive chip for the LED (e.g. CMOS 555 squarewave astable), gated by the PIC if required. Maybe the 28 pin PIC16F886 would be suitable, but the enhanced midrange parts with at least two (E)CCP modules are generally cheaper and give you more options in lower pin counts. |
|
|
|
只有小组成员才能发言,加入小组>>
5178 浏览 9 评论
2003 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3177 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
738浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
636浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-27 00:02 , Processed in 1.290095 second(s), Total 85, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号