完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
具有XC8 V 1.33的MPLABX 3.55工作良好(我知道这个版本包含n个PLIB)MPLABX 3.55,XC8 V 1.41没有工作(我安装了PLIB:“外围图书馆- FPIC18-V2.00 RC3- Windows安装程序”),我试着用其他代替路径:“包括”:程序文件 Microchip xC8v1.41in它不工作。我也得到这个错误:C:Microchip xC8v1.41包含/PLIB USART.H:32:错误:(141)无法打开包含文件“pCONFIG.H”:没有这样的文件或指导我试图使用MPLABX和XC8的最后版本。我能做些什么来修复它?“谢谢”我的计算机使用Windows 81-代码来测试:{定义“有用”或“掩码”,包括:“USART.H”无符号CHAR RXDATA(25);未签名的CHAR TXDATA[] =“MychChIPUSAT”;无效主(空){无符号char CONFIG=0,SPBRG=0,BAdCONFIG=0,i=0;CluteUsAt();/关闭以前的U/ART,/UN 8.17。iPIC18F外设库帮助文档USAT示例// 1268 ///3//-----配置USAT ---CONFIG = UARTARGTXIN IOXOFF USAARTH RXIN tiOXOFF USAARTH ASYNCHCHY MODE USAARTH EUTAREZY比特UASARTH CONTROXRX USAARTH BRGHYLL;//SPBRG需要根据振荡器频率改变-SPRBRG=51//8MHz的振荡器频率和波特率为2400。OpenSART(CONFIG,SPBRG);//API为需要的参数配置UART;BUDCONFIG=BUDY88BITSURGATE BaUdAutoXOFF;BUDUSAT(BAUDCONFIG);//--USAT传输(BuyUsAtter());/ /检查Usart是否忙或NoPTPUSAT((char))TXDATA);/ /发送String //USAT接收-GETSUBART((CHAR *)RXDATA,24);/ /接收数据到24字节(BuyUsAtter());/检查Usart是否忙或NoPoT SUSTART((CHAR*)RXDATA);/ /回送接收到HoSTOLCEUSTART()的数据;而(1);/ /程序结束}
以上来自于百度翻译 以下为原文 mplabx 3.55 with xc8 v 1.33 works fine (I know this versión includes Plib) mplabx 3.55 with xc8 v 1.41 doesnt work (I installed Plib: "peripheral-libraries-for-pic18-v2.00rc3-windows-installer"), I tried with other instead of path: #include "usart.h" #include "C:Program FilesMicrochipxc8v1.41include/plibusart.h" doesnt work. I got this error too: C:Program FilesMicrochipxc8v1.41include/plibusart.h:32: error: (141) can't open include file "pconfig.h": No such file or directory I'm trying to use the last versions of Mplabx and xc8. What can I do for fix it?, thanks My computer use Windows 8.1 Code to Test: #define USE_OR_MASKS #include #include "usart.h" unsigned char Rxdata[25]; unsigned char Txdata[] = "MICROCHIP_USART"; void main(void) { unsigned char config=0,spbrg=0,baudconfig=0,i=0; CloseUSART(); //turn off usart if was previously on //8.17 Universal PIC18F Peripheral Library Help Document USART Examples //1268 //8 //-----configure USART ----- config = USART_TX_INT_OFF | USART_RX_INT_OFF | USART_ASYNCH_MODE | USART_EIGHT_BIT | USART_CONT_RX | USART_BRGH_LOW; //-----SPBRG needs to be changed depending upon oscillator frequency------- spbrg = 51; //At 8Mhz of oscillator frequency & baud rate of 2400. OpenUSART(config, spbrg); //API configures USART for desired parameters baudconfig = BAUD_8_BIT_RATE | BAUD_AUTO_OFF; baudUSART (baudconfig); //------USART Transmission ---- while(BusyUSART()); //Check if Usart is busy or not putsUSART((char *)Txdata); //transmit the string //---USART Reception --- getsUSART((char *)Rxdata,24); //Recieve data upto 24 bytes while(BusyUSART()); //Check if Usart is busy or not putsUSART((char *)Rxdata); //echo back the data recieved back to host CloseUSART(); while(1); //end of program } |
|
相关推荐
5个回答
|
|
是的,我检查过,PLIB存在于XC8 1.41(我安装),因为它没有来。这个XC8我的程序不工作。用XC8 1.33 PLIB也存在我的程序IT工作。简历:PLIB是在BOTXC8 V1.33和1.41,但在最后一个不工作。
以上来自于百度翻译 以下为原文 yes, I checked and plib exists in xc8 1.41 (I installed) because it didnt come with it. with this xc8 my program doesnt work. With Xc8 1.33 plib too exists and my program it Works. resume: plib is in both Xc8 v1.33 and 1.41 but in the last one doesnt work. Im using PIC18F4550 |
|
|
|
我已经告诉过你那些不规则的斜线了
以上来自于百度翻译 以下为原文 I already told you about the wonky slashes in #include "C:Program FilesMicrochipxc8v1.41include/plibusart.h" try changing it to just #include |
|
|
|
除了SLASH的混合(推荐使用“//”)之外,您可能需要向编译器中添加//IOPL/PLIB文件夹,包括路径设置。(所有PLIB头包括这个pCONFIG.H到DeTeRead模块版本)
以上来自于百度翻译 以下为原文 Beside the mix of the slash's (would recommend to use the "/" always) you possibly have to add the /include/plib folder to your compiler include path settings. (all the plib headers include this pconfig.h to dertermine the module versions) |
|
|
|
我做了你告诉我的每件事,但都不起作用,…
以上来自于百度翻译 以下为原文 I did every thing thay you told me but it doesn't work, ..... |
|
|
|
这里不清楚,你在回答谁,或者你做了什么。
以上来自于百度翻译 以下为原文 It is unclear here, who you are answering, or what you have done. |
|
|
|
只有小组成员才能发言,加入小组>>
5171 浏览 9 评论
2001 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3176 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
737浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
635浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 08:11 , Processed in 1.526056 second(s), Total 87, Slave 70 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号