完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我与XC8 V137/138有问题,ADC GO位没有被编译器识别……位没有被定义。查看.h包含的文件,在AdCON0寄存器中有一个位,但在任何名称或别名下都没有GooNndobit位定义。我已经检查了PICS 16F1703到1778。所有人都有同样的问题。我从来没有遇到过这个问题,其他PICCHIPSI试图将位定义添加到.h文件,但是编译器然后为头文件张贴其他错误…所以我要么做错了,要么无法编辑页眉。既然ADC是一个关键的选项,有没有其他人听说过这个问题,还是只有我?
以上来自于百度翻译 以下为原文 I am having issues with XC8 v137/138 with the ADC GO bit not being recognized by the compiler...says the bit is not defined. Looking at the .h include files for the chips there is a place for the bit in the ADCON0 register but no GO_nDONE bit definition under any name or alias. I have checked pics 16F1773 thru 1778. All have the same issue. I have never had this problem with other PIC chips I attempted to add the bit definition to the .h file, but the compiler then posts other errors for the header file... so I am either doing it wrong or the header can't be edited. Since the ADC is a key option, has anyone else heard of this problem, or is it just me? |
|
相关推荐
7个回答
|
|
我看不出你为什么不能编辑头文件。你做了什么变化,然后你得到了什么错误?
以上来自于百度翻译 以下为原文 I can't see any reason why you couldn't edit the header file. What change exacty did you make, and what error did you then get? |
|
|
|
在XC8 1.36中,定义是这样的:
以上来自于百度翻译 以下为原文 In XC8 1.36, the definition is there, like this: // bitfield definitions typedef union { struct { unsigned ADON :1; unsigned GO :1; unsigned CHS :6; }; } ADCON0bits_t; |
|
|
|
是的,1.37是一样的。所以你可以简单地使用ADCONbits.GO,没有GoNeNDON或任何类似的东西,比如在其他的PICS的头文件中。
以上来自于百度翻译 以下为原文 Yes it is the same in 1.37. So you use simply ADCONbits.GO, there is no GO_nDONE or anything like that as in some header files for other pics. |
|
|
|
谢谢,AdCONDOWS。去解决这个问题……我以前从来没有遇到过这个问题。至于编辑.h部分头文件,不确定发生了什么,但我必须卸载/重新安装XC8,以便使用1778。h包含文件。不会再那样做了……微笑:
以上来自于百度翻译 以下为原文 Thanks, the ADCON0bits.GO resolved the problem...I had just never run across this issue before. As for editing the .h part header file, not sure what happened there, but I had to uninstall/re-install XC8 in order to use the 1778 .h include file. Won't do that again.....Smile: |
|
|
|
是的,1.37是一样的。所以你可以简单地使用ADCONbits.GO,没有GoNeNDON或任何类似的东西,如在其他的头文件中。GONNDON只会出现在旧的图片上。他们现在认为符号是遗留下来的。
以上来自于百度翻译 以下为原文 Yes it is the same in 1.37. So you use simply ADCONbits.GO, there is no GO_nDONE or anything like that as in some header files for other pics. GO_nDONE would Only appear for older PICs. They consider that notation Legacy now. You can: #define GO_nDONE ADCONbits.GO |
|
|
|
我将提交一张支持票,因为在头文件中已经有很多年的GoeNNDON定义。我可以想象很多代码会被破坏,因为它不包括在内。
以上来自于百度翻译 以下为原文 I would submit a support ticket on this, since there has been a GO_nDONE define for many o years in header files. I can imagine a lot of code that would break because it was not included. Looking at the datasheet it still refers to the bit as GO/nDONE. |
|
|
|
对于PIC18,如果你使用它们,你会得到一个遗留警告。
以上来自于百度翻译 以下为原文 For PIC18 if you use them you get a Legacy warning. |
|
|
|
只有小组成员才能发言,加入小组>>
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:58 , Processed in 3.204473 second(s), Total 89, Slave 72 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号