完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,我有一个PIC18F46k80单片机的项目,它有一个内部EEPROM。每次我编译程序并运行(程序)应用程序,MPLAB X(版本3.45)都会删除我在环境的EE数据存储器窗口中导入的EEprom值。如果我没有打开,这无关紧要。点击ICD3的项目比例中的“擦除所有之前的程序”框。总是,EEPROM值都被重置为0xFF、0xFF、0xFF、0xFF、0xFF、0xFF、0xFF,怎么可能?有什么想法吗?谢谢。我已经测试了MPLABX版本,3.45,3.40和3.26都有同样的问题。
以上来自于百度翻译 以下为原文 Hello I have project with a PIC18F46k80 microcontroller which has an internal EEPROM. Each time I compile the program and Run( program ) the aplication, The MPLAB X( version 3.45) delete the EEprom values that I have imported on the EE Data Memory window of the enviroment. It doesn`t matter if I uncheck the box "Erase All Before Program" on the project Proporties of the ICD3 in this case. always, the EEPROM values are all reset to 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, how is it possible? any idea? Thanks in advanced David.- p.d I have tested MPLABX versions, 3.45, 3.40, and 3.26 all with the same problem. |
|
相关推荐
10个回答
|
|
您可能想在ICD3设置的下拉列表中签出“内存到程序”的选择。在EEPROM中有一些明确的设置。
以上来自于百度翻译 以下为原文 You might want to check out the "Memories to Program" selection in the drop down list for the ICD3 settings. There are some explicit settings for EEPROM in there. |
|
|
|
我有18F4620的这个问题直到V3.45被释放…我发现你有To1。在ICD3下,选择手动选择内存到程序2。选择(检查)程序EEPROM3。选择以保存EEPROM4。将EEPROM内存范围设置为保留(对于18F4620,我使用0-3FF),这最终指示ICD3读取该EEPROM范围的内容,然后在编程时将该范围重写回EEPROM。与EEPROM内容的“保存”不完全相同,但最终结果是相同的。
以上来自于百度翻译 以下为原文 I had this issue with my 18F4620 until V3.45 was released... I found you had to 1. under ICD3, select to Manually select memories to program 2. select (check) to program the EEPROM 3. select to Preserve the EEPROM 4. set the EEPROM memory range to preserve (for the 18F4620, I used 0-3FF) This ends up instructing the ICD3 to read the contents of that range of EEPROM, and then it re-writes that range back to EEPROM when it programs. Not quite the same as 'preserving' the EEPROM contents, but the end-result is the same. |
|
|
|
你好,约书亚:内存范围的选择是正确的(检查它),这不是我的问题。问题是编译将Eeprom MPLAB IDE WINDOWS重置为0xFF,在将任何表加载到Eeprom MPLAB IDE WINDOWS上之后。Steve,谢谢您的回答。假设这个解决方案在微控制器的Eeprom上已经写入了一些数据时仍然有效。问题是,如果MPLAB X不允许您这样做,那么您如何将这个值编程到微控制器的内部EEPROM中,因为每次加载这些值并尝试使它运行i在图中,MPLABX环境将此值重置为0xFF。在MPLLAB8上这样做很容易。为什么没有来自微芯片的成员来解决这个问题或回答这类问题?我确信有几个人会想使用MPLAB 8上的这个特性。而且不能用MPLAB IPE加载Eeprom值,这更吓人_mad:谢谢你们,大卫。
以上来自于百度翻译 以下为原文 Hello Joshua: the selection of the memory ranges are correct(check it) and this is not the problem I have. the problem is that compiling resets the Eeprom MPLAB IDE WINDOWS to 0xFF after loading any table on it. Steve, thank you for your answers. I assume this solution works if you have some data already written on the Eeprom of the microcontroller. The question is how do you program this values into the internal EEPROM of the microcontroller if MPLAB X does not let you do it, just because each time I load the values and try to make it run into the Pic , the MPLABX enviroment reset this values to 0xFF. This was easy to do on MPLAB 8. Why there is no Members from microchip solving this issue or answering this kind of questions? I am sure several people will want to use this feature that was working on MPLAB 8. Also is not possible to load Eeprom values with MPLAB IPE which is even more scaring ¡¡¡mad: Thank you all David.- |
|
|
|
如何加载值?在代码中?只是因为每次我加载这些值并试图让它进入PIC
以上来自于百度翻译 以下为原文 How do you load values ? In code ? just because each time I load the values and try to make it run into the Pic |
|
|
|
我猜您正在内存视图表中编辑EEPROM,并希望将这些值编程到PIC的EEPROM中。这是正确的吗?你使用XC8作为编译器吗?我没有用这种方式设置EEPROM值。我相信旧的MPLab 8为您提供了从项目属性或代码中设置默认EEPROM值的选择。我没有调查过MPLab X中是否存在这样的设置。假设您正在使用XC8,我通常使用_u EEPROM_DATA()宏(XC8编译器手册部分5.5.2)设置默认EEPROM值。这允许您在代码中直接设置8字节的EEPROM的默认值。
以上来自于百度翻译 以下为原文 I'm going to guess that you are editing the EEPROM in the memory view table and want to program those values into your PIC's EEPROM. Is this correct? Are you using XC8 as your compiler? I have not set EEPROM values this way. I believe the old MPLab 8 gave you the choice of setting default EEPROM values from the project properties or from the code. I have not investigated whether such a setting exists in MPLab X. Assuming you are using XC8, I generally set default EEPROM values using the __EEPROM_DATA() macro (XC8 compiler manual section 5.5.5.2). This allows you to set default values for EEPROM in blocks of 8 bytes directly in your code. |
|
|
|
MPLAB X与MPLAB 8不同,是一种重要的方法。在MPLAX中,任何被编程的东西都必须来自源代码。窗口中不再设置配置位(或EEPROM字节),并将它们编程到您的设备。这样,在任何编译开始时,MPLAB X中的所有内存缓冲区都将被清除为其默认值,然后编译结果将被加载到内存缓冲区中。这些显示只是反映了内存缓冲区中的内容。构建之后,只需读取EEPROM内存以更新MPLAB X内存缓冲区(并显示)。还要确保在ICD3设置中保留EEPROM。
以上来自于百度翻译 以下为原文 MPLAB X differs from MPLAB 8 in an important way. In MPLAB X anything that gets programmed must come from the source code. No more setting config bits (or the EEPROM bytes) in the window and programming them to your device. As such, at the start of any compilation all the memory buffers in MPLAB X will be cleared to their default values, and then the results of the compilation will be loaded into the memory buffers. The displays simply reflect what is in the memory buffers. After the build, just do a read of EEPROM memory to update the MPLAB X memory buffers (and display). Also make sure to have Preserve EEPROM selected in the ICD3 settings. |
|
|
|
因此,如果有人需要改变EPROM中的原因来模拟各种测试条件,可以在MPLABX中完成吗?IPE?或者你需要为每个程序编写一个特殊的版本吗?
以上来自于百度翻译 以下为原文 So if someone needs to change cause in the eprom to simulate various test condition can it be done in MPLabX? IPE? Or do you need to program a special version for each? |
|
|
|
Y.EEPROMYDATA()对存储在哪里的内容非常具体。
以上来自于百度翻译 以下为原文 __EEPROM_DATA(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07); __EEPROM_DATA(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F); //__EEPROM_DATA(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07); __EEPROM_DATA(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x55); // Testing address 7 = 0x55 __EEPROM_DATA(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F); __EEPROM_DATA() is very specific about what gets stored where. |
|
|
|
好的,我知道如何修改校准数据会令人沮丧。这让我们回到了IPE。导入一个十六进制文件,启用高级模式,查看-gt;显示内存,并在组合框中选择EEPROM。我认为你可以从那里编辑。只是测试了输出了一些编辑值的HEX文件,然后导入了我编辑的值。
以上来自于百度翻译 以下为原文 OK, I see how modifying calibration data can be frustrating. This brings us back to the IPE. Import a hex file, enable advanced mode, View -> Show Memory, and select EEPROM in the combobox. I think that you can edit from there. Just tested exporting a hex file with some edited values and it imported with my edited values saved. |
|
|
|
这很有用。OPs问题在校准之后他不能保存EEPROM,因此当他试图调试时,数据将被擦除。但现在是固定的。不幸的是,过去更容易做到。
以上来自于百度翻译 以下为原文 That is useful. The OPs Issue was after the calibration he could not preserve the EEPROM Therefore the data would be erased when he tried to debug. But that is now fixed. Unfortunately it was easier to do in the past. |
|
|
|
只有小组成员才能发言,加入小组>>
5158 浏览 9 评论
1997 浏览 8 评论
1926 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3169 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2222 浏览 5 评论
724浏览 1评论
607浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
495浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
621浏览 0评论
520浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-19 18:35 , Processed in 1.501966 second(s), Total 96, Slave 80 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号