完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
海都。我用的是PIC16F87A单片机。通常情况下,我通过编写(13)位来编写μ-CONFIG(0x3F3A);在MPLAB IDE V866中的程序中。但不幸的是,我在程序中编写了一个.0ff3a。我错过了在F3A之前给出3。我的问题是,如果我们没有设置配置位(在我的程序第十二和第十三位中没有提到),MCU将默认使用什么????谁能在经过PIC16F87A配置位之后给我最好的解决方案?
以上来自于百度翻译 以下为原文 Hai all. I am using PIC16F877A mcu. Normally i configure (13 bits) by writing __CONFIG(0x3F3A); in the program in MpLab IDE V8.66 . But unfortunately i wrote __CONFIG(0xF3A); in the program. I missed to give 3 before F3A. My question is, what mcu will take by default if we didn't set configuration bits ( in my program 12th & 13th bit not mentioned)???? Can anyone give me the best solution after go through the PIC16F877A Configuration Bits ? |
|
相关推荐
14个回答
|
|
HI,配置位存储在Flash程序存储器中,因此如果配置存储器字未被编程,那么这些位将具有值1,例如0x3FFF具有指定的值:Y-A CONFIG(0x0F3A),指定2个高位位,并且将被编程为值0。这意味着位13 CP:Flash编程。M内存代码保护是活动的。这意味着它不可能验证或读取程序内存内容,这是一个问题吗?有没有什么原因你不能再次编程芯片?在数据表中:DS9582C页144有一些冲突的信息,寄存器号和图例为未使用的/未实现的位指定U-0,未实现位的位字段描述表示:未实现:读取为1。目前推荐的方法是在编译器安装目录中使用Mysil的PrimaMaungCyfg关键字=参数文件。
以上来自于百度翻译 以下为原文 Hi, Configuration bits are stored in Flash Program Memory, so if a configuration memory word is not programmed, those bits will have value 1, e.g. 0x3FFF With the value specified: __CONFIG(0x0F3A) the 2 upper bits are specified, and will be programmed with value 0. this means that bit 13 CP: Flash Program Memory Code Protection is active. This should mean that it should Not be possible to Verify or Read back Program Memory contents, is this a problem? Is there any reason you cannot program the chip again? In the Datasheet: DS39582C-page 144 there are some conflicting information, the register figure and the legend specify U-0 for the unused/unimplemented bits, bit field descriptions for the unimplemented bits say: Unimplemented: Read as 1. The directive __CONFIG(value) is obsolete and no longer recommended. The currently recommended method is use of #pragma config keyword = parameter Documentation is in Compiler installation directory. Regards, Mysil |
|
|
|
谢谢您的回复。是的,它告诉我错误和我无法重新编程。但是正如你所说,如果我们没有提到任何东西,它将采取1种方式,代码保护被禁用。所以,这没有问题。那么为什么会发生错误呢?(错误——“下列内存区域未能正确编程:程序内存地址:00000000期望值:0000120a接收值:00000000编程失败”)
以上来自于百度翻译 以下为原文 Thank you sir for the reply. Yeah, it shows me error & i am unable to re-programme. But as you said if we didn't mention anything it will take 1 means , code protection is disabled. So, there is no problem in that. Then why error occurs? (Error- "The following memory regions failed to program correctly: Program Memory Address: 00000000 Expected Value: 0000120a Received Value: 00000000 Programming failed") |
|
|
|
现在我才知道它已经过时了。我是这个嵌入式世界的新手,但我觉得与配置语言相比,价值很容易。BCZ我不知道如何使用这个配置。你能解释一下如何使用它吗?你能告诉我如何使用3*3Aa值的方法来配置吗?我读的语用方法不是完全的。它被读取保护。不是吗?这种方法的优点和缺点是什么?请给我深度回答,先生。TQ:)
以上来自于百度翻译 以下为原文 Now only i get to know that it's obsolete. I'm newbie to this embedded world. But i feel like __CONFIG(value) is easy compared to #pragma. Bcz i don't know how to configure by using this. Can you explain how to use it? can you show me how to configure using #pragma method, for 3F3A value? I read #pragma method is not for all. Bcz it's read protected. Isn't? What are the advantage & dis advantage of this method? Kindly give me the depth answer sir.. Tq :) |
|
|
|
注意,这里相同的人问的问题几乎相同:http://www..hip.com/for./m956911.aspx还注意:您在这里非常错误。是的,您DID指定了那些位。您为_u CONFIG宏提供一个完整的14位值。省略前导“3”意味着您提供的值是0x0F3a,所以前导数字是“0”,而不是“未指定”。
以上来自于百度翻译 以下为原文 Note, this is almost the same question asked by the same person here: http://www.microchip.com/forums/m956911.aspx Also note: You are very much mistaken here. Yes you DID specify those bits. You are providing a complete 14 bit value to the __CONFIG macro. Omitting the leading "3" means the value you supplied is 0x0F3a, so the leading digit is "0", not "not specified". |
|
|
|
|
|
|
|
是的,先生。你绝对正确。现在我对你的回答感到满意。还有其他选项可以恢复MCU吗?它不起作用(不能写字)。它显示了最初设置的配置位的错误BCZ。错误-“下列内存区域未能正确编程:程序内存地址:00000000预期值:接收值:00000000编程失败”
以上来自于百度翻译 以下为原文 Yes sir. U absolutely Right.. Now i am satisfied with your answer. Is any other option is there to recover mcu?? It's not working (can't write). It shows error bcz of configuration bits initially i set. Error - "The following memory regions failed to program correctly: Program Memory Address: 00000000 Expected Value: 0000120a Received Value: 00000000 Programming failed") |
|
|
|
你必须用编程软件迫使一个完整的芯片擦掉才能再次写入芯片。寻找这样的选项并确保它被启用。
以上来自于百度翻译 以下为原文 You have to force a full chip erase with your programming software to be able to write to the chip again. Look for such an option and ensure that it is enabled. |
|
|
|
|
|
|
|
我使用MPLLISH V866编译程序和PACTIT-3调试器。
以上来自于百度翻译 以下为原文 i am using MplabIDE v8.66 compiler & PicKit-3 debugger.. |
|
|
|
我使用MPLLISH V866编译程序和PACTIT-3调试器。如何擦除全芯片?我不知道怎么办?帮我做…
以上来自于百度翻译 以下为原文 i am using MplabIDE v8.66 compiler & PicKit-3 debugger.. How to erase full chip ? i don't know how t do? Help me to do.. |
|
|
|
尝试寻找“空白”按钮,擦除选项只擦除程序不受保护的部分,而你是受保护的。大多数硬件和软件,实际上可以擦除芯片应该提到的地方,电源应该是15伏特来解决这个问题。试着查看编程设备的数据表。
以上来自于百度翻译 以下为原文 Try to look for "Blank" Button, erase option only erase unprotected parts of the program while your are protected. Most hardware and software that can actually BLANK the chip should mention somewhere the supply should be 15 Volts to fix the problem. Try to look into datasheet of your programming equipment. Look into top left corner of this one (PIC_Flash mikroe) http://www.mikroe.com/img...icflash-screenshot.gif |
|
|
|
p7,你再一次给出一个对PICkit3来说毫无意义的建议。它不使用那个软件,并且它是通过USB供电的,没有单独的电源。
以上来自于百度翻译 以下为原文 p7, once again you are giving advice that means nothing for a PICkit3. It does not use that software, and it is powered via USB, there is no seperate power supply. |
|
|
|
你能把你的手放在像PIC并行端口程序员这样的低级程序员上吗?当一切都失败了,他们没有。你可以建立一个由并联端口连接器和5个电阻器或者一个更强大的一对BJT-s可以做15伏特伎俩…可能是一个小时的工作…如果你认为这是值得的。相信我,我从那些开始,我仍然有一个或两个摆在车间周围“以防万一”:
以上来自于百度翻译 以下为原文 Could you put your hands on some low level programmer like PIC parallel port programmer... When everything else fails they don't. You can build one out of parallel port connector and 5 resistors or a more powerful one with couple of BJT-s which can do the 15 Volt Trick.... its maybe an hour of work... if you think it is worth it. Believe me I started with those and I still have one or two laying around the workshop "just in case" :) |
|
|
|
不仅如此,他的信息是错误的:HTTP://www. McCHIP.COM/FUMMS/FUNDSPOT/95756
以上来自于百度翻译 以下为原文 Not only that, his information is wrong: http://www.microchip.com/forums/FindPost/957456 |
|
|
|
只有小组成员才能发言,加入小组>>
4814 浏览 9 评论
1823 浏览 8 评论
1743 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
2949 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2055 浏览 5 评论
452浏览 1评论
1107浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
355浏览 0评论
260浏览 0评论
LAN9252使用SQI通信,进行数字复位后读BYTE_TEST异常
1777浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-20 00:12 , Processed in 1.173427 second(s), Total 82, Slave 72 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号