完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我在C程序中使用了DSPIC30F2010 ICC,但是在用PICtiT2烧掉集成电路时,它显示了“一些配置词不是HEX文件”。如果有人知道正确的配置词,请回答我。谢谢。
以上来自于百度翻译 以下为原文 i make c program for dspic30f2010 ic.but while burning the ic with pickit2 its showing "some configuration words not hex file"this error.if anyone know the correct configure words please reply me. thanks |
|
相关推荐
9个回答
|
|
你的程序中有哪些配置设置?你看过数据表,以确保它们实际上在你的设备(我假设你已经复制了代码从其他地方,可能是另一个MCU -这是一个常见的原因,这种类型的错误)?苏珊
以上来自于百度翻译 以下为原文 What configuration settings do you have in your program? Have you looked in the data sheet to make sure that they are actually there for your device (I am assuming that you have copied the code from somewhere else and probably for another MCU - this is a common cause of this type of error)? Susan |
|
|
|
是的,源代码中的第二个字指定了配置错误的配置位。;)
以上来自于百度翻译 以下为原文 Ahhh yes, it's that second word in the source line specifying your config bits that has the error... ;) |
|
|
|
大家好,我想用DSPIC30F2010和16X1 LCD制作交流电压测量程序。但是在我的LCD中有一些错误,它只显示8个字符。2、如何使用MikROC PROM将模拟输入连接到我的DSPIC.AM。这里是我的代码。//LCD模块连接SDSIT LCDYRS在LATD00BIT;SB。它在LATD1BIT上,LCDEXD4在LATE00BIT;SIT LCDYD5在LaTe1BIT;SIT LCDYD6在LATE2LITE;SITE LCDY7 D7在TrISD01BIT;StIdD01BIT的SCD-LCDYRNEX方向;TISIS1LY位的SIT LCDYNEX方向;TISE11BIT的SIT LCDY4DY方向;TISE11BIT上的SCD-LCDY-D5Y方向;TISESE2Y上的SIT LCDY-D6-方向在TISE33BIT;//端LCD模块连接;SunSchar char;无符号int ADCXRD;char *文本;长TLUN;空主机(){ADPCFG= 0xMUN;LCDGIN();ADCON2BITS VCFG= 0B00;;//VREF是AVDD和AvsAdCON2BIT.CHPS= 0B11;//转换CH0&CH1 ADPCFGBIT。S.PCFG1=0;LCDY-CMD(O-LCDA CURSORIOXOFF);//发送命令到LCD(光标关闭)LCDOXOUT(1,1,TXT1);//打印字符串A在LCD上,第一行,第一列DelaySMS(2000);LCDY-CMD(Y-LCDA清除);而(1){ADCYRD=ADC1AULL(10);//从第二通道LCDIOUT(1,1“模拟电压”)获得ADC值;Tlong=(long)ADCyRD**5000;//将ADC读数转换为毫伏TLY= TLIN/4011;// 0…1023 -gt;0~5000 0MV CH=TLIN/1000;/ /提取伏特数字LCDYCHR(1,12,48 +CH);/ /在第二行写入ASCII数字,第九列LCDYCHRYCP(“:”);CH=(TLU/100)%10;/ /提取0.1伏数字LCDYCHRYCP(48 + CH);/ /写入ASCII数字在光标点CH=(TLU/ 10)% 10;/ /提取0.01伏数字LCDYCHRYCP(48 +CH);/ /在光标点LCDIOUT(1,13,“230”)写入ASCII数字;LCDY-CURYCP(“V”);}请帮助我。谢谢。
以上来自于百度翻译 以下为原文 HELLO EVERYONE, i am trying to make program for ac voltage measuring by using dspic30f2010 and 16x1 lcd. but there are some errors 1-in my lcd it showing only 8 characters. 2-how to connect analog input to my dspic. am using mikroc pro. here is my code. // LCD module connections ***it LCD_RS at LATD0_bit; ***it LCD_EN at LATD1_bit; ***it LCD_D4 at LATE0_bit; ***it LCD_D5 at LATE1_bit; ***it LCD_D6 at LATE2_bit; ***it LCD_D7 at LATE3_bit; ***it LCD_RS_Direction at TRISD0_bit; ***it LCD_EN_Direction at TRISD1_bit; ***it LCD_D4_Direction at TRISE0_bit; ***it LCD_D5_Direction at TRISE1_bit; ***it LCD_D6_Direction at TRISE2_bit; ***it LCD_D7_Direction at TRISE3_bit; // End LCD module connections unsigned char ch; unsigned int adc_rd; char *text; long tlong; void main() { ADPCFG = 0x0000; Lcd_Init(); ADC1_Init(); ADCON2bits.VCFG = 0b00; //voltage ref is AVDD & AVSS ADCON2bits.CHPS = 0b11; //converts CH0 & CH1 ADPCFGbits.PCFG1=0; LCD_Cmd(_LCD_CURSOR_OFF); // send command to LCD (cursor off) LCD_Out(1,1,txt1); // print string a on LCD, 1st row, 1st column Delay_ms(2000); Lcd_Cmd(_LCD_CLEAR); while (1) { adc_rd = ADC1_read(10); // get ADC value from 2nd channel LCD_Out(1,1,"analog voltage"); tlong = (long)adc_rd * 5000; // convert adc reading to milivolts tlong = tlong / 4011; // 0..1023 -> 0-5000mV ch = tlong / 1000; // extract volts digit LCD_Chr(1,12,48+ch); // write ASCII digit at 2nd row, 9th column LCD_Chr_CP(':'); ch = (tlong / 100) % 10; // extract 0.1 volts digit LCD_Chr_CP(48+ch); // write ASCII digit at cursor point ch = (tlong / 10) % 10; // extract 0.01 volts digit LCD_Chr_CP(48+ch); // write ASCII digit at cursor point LCD_Out(1,13,"230"); LCD_Chr_CP('V'); } } please help me. thanks. |
|
|
|
在你的第一篇文章中,你忽略了这个重要的细节,这一点在你的XC16论坛上特别混乱。你解决了配置问题吗?在这个源代码中没有配置比特,你使用哪一个精确的LCD?不是所有的“16X1 LCD”都是一样的。“模拟输入”是什么?什么电压范围?什么阻抗?
以上来自于百度翻译 以下为原文 You left out this vital detail in your first post, which is particularly confusing as you posted in the "XC16" forum. Have you solved your config bit problem? There are no config bits shown in this source code. Which precise LCD are you using? Not all "16x1 LCds" are the same. What is the "analog input"? i.e. what voltage range? What impedance? |
|
|
|
是的,我解决了我的配置问题。模拟输入是正常的230交流电压。我想测量电压。LCD是1601A。
以上来自于百度翻译 以下为原文 yes i solved my configuration problem. the analog input is normal 230 ac voltage. i want to measure the voltage. lcd is 1601A. |
|
|
|
你的代码不会编译的第一个错误,你使用的是TXTX1变量,除非你在别的地方声明,并且没有提到它。BY8字符,你的意思是你的LCD只显示:“模拟V”?你说你使用的是一个16X1的LCD,这个命令是:LCDIOUT(1,1,“模拟电压”);在你打印你的值之前,在你的LCD上打印16个字符中的14个,在你清除屏幕的地方没有任何地方,这意味着所有其他的打印字符都会重写。这是从12号开始的。你没有更多的字符作为这个命令:LCDIOUT(1,13,“230”);ANDLCD-CHRYCP(“V”);将再次从13到16的位置。
以上来自于百度翻译 以下为原文 The first error your code will not compile, you are using the txt1 variable which is not declared unless you declared it somewhere else and did not mention it her. By 8 characters you mean your LCD is displaying only: "analog v"? You said you are using a 16x1 LCD, this command: LCD_Out(1,1,"analog voltage"); will print 14 out of 16 characters on your lcd alone before your print your values and there is nowhere in your while(1) loop where you are clearing your screen, it means all other printed characters will be overwriting this from position 12. and you don't have more characters left as this command: LCD_Out(1,13,"230"); and LCD_Chr_CP('V'); will overwiting everything again from position 13 to 16. |
|
|
|
你不能直接读取230个VAC。你必须把它缩小到VDD和VSS之间的范围,这也可能需要一个偏移,或者校正AC。然后也过滤得到一个平均的DC值,或者通过一系列读数计算真正的RMS或平均值。
以上来自于百度翻译 以下为原文 You can't read 230 VAC directly. You must scale it down to the range between Vdd and Vss, which may also require an offset, or rectification of the AC. Then also either filtering to get an average DC value, or computing true RMS or average over a series of readings. |
|
|
|
另外,你不能只使用交流电源的一侧作为接地参考。最安全的解决方案是使用降压变压器,既可以降低电压,又可以使输出的一侧连接到直流基准。
以上来自于百度翻译 以下为原文 Plus you can't just use one side of the AC mains as a ground reference. The safest solution is to use a step down transformer, both to reduce the voltage, and to let you tie one side of the output to a DC reference. |
|
|
|
为了节省答案中的重复努力,在HTTPS://www. EdabARD.COM/StHeTrave.PHP中也讨论了这个问题。t=366363苏珊
以上来自于百度翻译 以下为原文 To save duplicated effort in the answers, this is also discussed in https://www.edaboard.com/showthread.php?t=376363 Susan |
|
|
|
只有小组成员才能发言,加入小组>>
5160 浏览 9 评论
1998 浏览 8 评论
1927 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3170 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2225 浏览 5 评论
727浏览 1评论
612浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
501浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
626浏览 0评论
524浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 07:53 , Processed in 1.519269 second(s), Total 93, Slave 76 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号