完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
您好,我使用proteus 8.5.1)为MC8编译器编写一个LCD,ADC(用于LDR和电位器),PIC16F87所需要的WAtiUS和PrimaMaR语句?2)编译器从HiTeC C、MPLAB XC8中选择什么样的变量,除了AdC和LCD之外,它们中的任何一个都不支持任何功能?
以上来自于百度翻译 以下为原文 Hi I am using Proteus 8.5. 1) What include and pragma statement needed for MC8 Compiler to program an LCD, ADC (For LDR and Potentiometer), PIC16F877 ? 2) What difference does the compiler choice from Hitech C, MPLAB xC8 aside from some variable types, are there any functions that are not supported by any of them with regards to ADC and LCD? |
|
相关推荐
9个回答
|
|
高科技是由Microchip购买的,改名为XC8XC8不再包括外围图书馆(HealthEng科技从来没有)。Microchip希望你使用MCC NOW.MC8?那是什么
以上来自于百度翻译 以下为原文 Hi-Tech was bought by Microchip an renamed XC8. XC8 no longer includes The Peripheral Libraries ( Hi-Tech Never Did). Microchip expects you to use MCC now. MC8? what is that |
|
|
|
|
|
|
|
在这里的各种论坛上也有很多例子……这不是一个非常复杂的任务,HD44 780控制器实际上不是非常复杂的设备……在时间上有点棘手,但在其他方面相当简单(先慢一点,加速后加速)。在R/W模式中使用控制器而不是只写允许您读取控制器状态并避免使用任意延迟(除非在初始设置期间)。
以上来自于百度翻译 以下为原文 There have been numerous examples offered on the various forums here also.....AND it is not a very complicated task, the HD44780 controllers are actually not very complex devices...... a bit tricky on timing sometimes but otherwise fairly simple (run it slow at first, speed it up after yo get it going). Using the controller in a R/W mode instead of write-only allows you to read the controller status and avoid the use of arbitrary delays (except during initial set-up). |
|
|
|
1)下列保险丝是否包括正确的保险丝?2)是否需要包括PIC16F87.H&GT?3)这个PIC必须设置哪些保险丝?
以上来自于百度翻译 以下为原文 1) Is the following fuses and include correct then? 2) Do I need to include 3) Which fuses must always be set for this pic? #pragma config FOSC = HS // Oscillator Selection bits (HS oscillator) #pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled) #pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled) #pragma config BOREN = ON // Brown-out Reset Enable bit (BOR enabled) #pragma config LVP = ON // Low-Voltage (Single-Supply) In-Circuit Serial Programming Enable bit (RB3/PGM pin has PGM function; low-voltage programming enabled) #pragma config CPD = OFF // Data EEPROM Memory Code Protection bit (Data EEPROM code protection off) #pragma config WRT = OFF // Flash Program Memory Write Enable bits (Write protection off; all program memory may be written to by EECON control) #pragma config CP = OFF // Flash Program Memory Code Protection bit (Code protection off) #include |
|
|
|
只有你有一个高速晶体连接到PIC(即4MHz或更快),如果你需要LVP上。我认为有99%的可能性你不需要LVP,应该把它打开。不。XC.H自动地在所需的文件中拉取它们。所有的都是。是的,你可以摆脱其中的一些缺陷,但是你必须考虑它,所以你不妨把它们设置成你想要的。
以上来自于百度翻译 以下为原文 Only if you have a high-speed crystal attached to the PIC (i.e. 4Mhz or faster) and if you require LVP on. I think it is 99% likely you do NOT need LVP, and should turn it off. No. xc.h pulls in the required file automatically. All of them. Yes, you can get away with defaults for some of them, but you have to think about it, so you may as well just set them how you want them. |
|
|
|
嗨,非常感谢你的回复。所以我删除了下面的语句:{ PrimaMaMatg配置文件FoC=HSand更改LVP语句::2)我在哪里得到延迟库?3)PIC16F87没有LCD库吗?4)什么是STDIO?H,什么时候需要它?
以上来自于百度翻译 以下为原文 Hi, thanks very much for your reply. So I remove the following statement: #pragma config FOSC = HS and change LVP statement to: #pragma config LVP = OFF 1) Is that correct? 2) Also where do I get the delay library? 3) So there is no LCD library for PIC16F877? 4) What is the stdio.h and when do I need it? |
|
|
|
我并没有告诉你删除它。你必须告诉编译器你使用的是什么振荡器,所以你必须有这一行,但是在结尾有正确的设置。你有水晶吗?PIC没有内部振荡器,所以您需要ONE,并将LVP语句更改为:2)我在哪里得到延迟库?它是在XC8编译器中构建的。查看用户指南中的“Sy-DelayySMS())3,因此PIC16F87没有LCD库吗?4)正确。它没有库函数。什么是STDIO?H,什么时候需要它?它是“标准I/O”。在嵌入式世界中没有标准的I/O,所以你很少需要它。
以上来自于百度翻译 以下为原文 I didn't tell you to remove it. You must tell the compiler what oscillator you are using, so you MUST have that line, but with the correct setting on the end. Do you have a crystal? That PIC does not have an internal oscillator, so you need one. and change LVP statement to: #pragma config LVP = OFF Good 1) Is that correct? 2) Also where do I get the delay library? It's built in to the XC8 compiler. Look in the user guide for "__delay_ms()" 3) So there is no LCD library for PIC16F877?4) Correct. There is no library function for it. What is the stdio.h and when do I need it? It is "standard I/O". There is no standard I/O in the embedded world, so you very rarely need it. |
|
|
|
我建议你通过XC8用户指南的第3.4和3.5段来阅读,你可以浏览一些高级主题,但是你会发现大部分问题的答案。
以上来自于百度翻译 以下为原文 I would suggest you read right through sections 3.4 and 3.5 of the XC8 user guide. You can skim over some advanced topics in there, but you will find answers to most of your questions. |
|
|
|
1)下列保险丝是否包括正确的保险丝?-它们根据应用程序不同而变化)我是否需要包括PIC16F87.H&GT?-OFR XC8& lt;XC.H.Gt;所有YO都需要它包括适当的芯片头。3)对于PIC必须始终设置哪些保险丝?-GT;它们根据应用程序的不同而不同,除非你有一个需要它的程序员。
以上来自于百度翻译 以下为原文 1) Is the following fuses and include correct then? -> They vary based on Application 2) Do I need to include 3) Which fuses must always be set for this pic? -> They vary based on Application #pragma config LVP = OFF //unless you have a Programer that requires it. |
|
|
|
只有小组成员才能发言,加入小组>>
5160 浏览 9 评论
1998 浏览 8 评论
1927 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3170 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2225 浏览 5 评论
729浏览 1评论
613浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
503浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
628浏览 0评论
526浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 12:01 , Processed in 1.404884 second(s), Total 95, Slave 78 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号