完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
HI论坛,另一个PK2CMD线程。花了很多时间搜索论坛,但找不到这个问题的答案,我真的开始拉扯我的头发了。我在Mac上使用MPLABX带PICtiT2。我现在正在编写一个PIC16F87的代码,如果我通过MPLABX烧掉PIC,它运行良好。我想开始使用PK2CMD,因为我把大部分的编码时间都用在了终端上。PK2CMD看到正确的部分(PIC16F87),它可以擦除代码,我可以对部分进行编码,并使用-Y命令进行验证。但是,代码不运行,我不知道为什么。我看到了另一个类似的帖子,问题是,当MPLABX看到您没有调试时,您必须确保调试位在配置位中被关闭。这并没有解决这个问题,不幸的是,有没有人能指导我正确的方向,为什么HEX文件在MPLABX编程而不是PK2CMD编程时运行良好?希望有人能保存我的参考文献EpkEnk2CMD版本可执行版本:1.202.00设备文件版本:1.62.00 OS固件版本:ESOION&FFMENNEXON&LVPYOFFORION CONFIGO CONTS2,YORBO4VYBO40V&W.WTTYOFF
以上来自于百度翻译 以下为原文 Hi Forum, Yet another PK2CMD thread. Been spending a lot of time searching the forum but could not find the answer to this issue, and I'm really starting to pull my hair out. I'm on Mac using MPLABX with a Pickit2. I'm currently writing code for a PIC16F887, which runs fine if I burn the pic via MPLABX. I want to start using the PK2CMD since i spend most of my coding time in terminal anyways. PK2CMD sees the correct part (PIC16F887), it can erase code from, I can code the part and verify back using the -y command. But, the code does not run and I can't figure out why. I saw another similar post where the issue was that you have to ensure that debug is off in the config bits as MPLABX helps you out there when it sees you are not debugging. This did not solve the issue unfortunately Is there anyone else that can guide me in the right direction as to why the .hex file runs fine when programmed by MPLABX but not PK2CMD ? Hoping someone can save my sanity For reference PK2CMD version Executable Version: 1.20.00Device File Version: 1.62.00OS Firmware Version: 2.32.00 Config Bits: __CONFIG _CONFIG1, _FOSC_INTRC_NOCLKOUT & _WDTE_OFF & _PWRTE_ON & _MCLRE_ON & _CP_OFF & _CPD_OFF & _BOREN_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF __CONFIG _CONFIG2, _BOR4V_BOR40V & _WRT_OFF |
|
相关推荐
8个回答
|
|
阅读它并将PK2CMD生成的版本与BYMPLAB X生成的版本进行比较,看看有什么不同。
以上来自于百度翻译 以下为原文 Read it back and compare the version produced by PK2CMD to the version produced by MPLAB X and see what are the differences. |
|
|
|
嗨,也许是时候投资一个CIPIT3;=)在MPLAB X包中有一个类似的实用程序,称为IPECMD,它支持所有最近的工具(即,除了PICTIT2和ICD2之外)和PICS;=)。
以上来自于百度翻译 以下为原文 Hi, Maybe time to invest in a Pickit3 ;=) There is a similar utility for Pickit3 in MPLAB X package called IPECMD which supports all recent tools (i.e. except Pickit2 & ICD2) and PICs ;=) Regards |
|
|
|
诺斯盖伊,谢谢!很好的建议。不幸的是,这只会使这个谜团变得更糟。我读了两个版本,并与HEX恶魔比较,这两个文件是相同的。不知何故,PK2CMD和MPLAB都设法向该部分写入完全相同的代码,但它仅在从MPLAB写入时运行。感觉我在这里漏掉了一些明显的东西。我试着在PK2CMD中使用-T命令来打开和关闭PK2电源,也有不同的电压。当从MPLAB编程时,它的行为是意料之中的,但是当我从PK2CMD.PK2CMD- pPIC16F87-FB-HEX-M JNI编码它时,没有生命迹象,我们使用这个命令并且没有错误消息(并且可以用-Y验证代码)。我打开电源后,芯片上没有生命迹象。有人知道我错过了什么吗?
以上来自于百度翻译 以下为原文 NorthGuy, thanks! Great suggestions. Unfortunately it only made the mystery worse. I read both versions back and compared it with Hex Fiend, both files are identical. Somehow both pk2cmd and mplab manages to write the exact same code to the part, but it only runs when written from mplab. feels like i'm missing something obvious here. I tried turning the PK2 supply on and off using the -t command in pk2cmd, also with different voltages. It behaves as expected when programmed from MPLAB, but no life signs when i code it from pk2cmd. pk2cmd -ppic16f887 -fb.hex -m -jn i'm using this command and get no error messages (and can verify the code back with -y). No life signs from the chip after i turn on the supply. Anyone has idea what i'm missing ? |
|
|
|
PK2CMD是否写入配置比特?也许需要一个额外的开关来做它们。(我从来没有用过它,所以我只是推测)。
以上来自于百度翻译 以下为原文 Is pk2cmd writing the config bits? Maybe it needs an extra switch to do them. (I've never used it, so am just speculating) |
|
|
|
谢谢你的建议,但是-M开关确实写了配置比特。可能只选择用于特定区域写入的子命令,但我确实尝试了其中的一些变体,但不幸的是相同的结果。
以上来自于百度翻译 以下为原文 Thanks for the suggestion but the -m switch does write the config bits. It's possible to choose subcommands for writing to specific regions only and I did try quite a few variations of these but same result unfortunately |
|
|
|
只是另一个猜想。你是不是在事后断开程序员?如果不是,PK2CMD可能保持MCLR引脚驱动后编程低,而默认情况下,MPLABX将驱动它高。
以上来自于百度翻译 以下为原文 Just another guess. Are you disconnecting the programmer afterwards? If not, PK2CMD is probably keeping the MCLR pin driven low after programming, whereas by default MPLABX will drive it high. |
|
|
|
谢谢您!!!!终于!再次通过PK2CMD文档,你是在现场。PK2CMD默认使用MCLR作为IO,使用Rel-RT,如自述文件中所描述的,芯片上电并按预期工作!
以上来自于百度翻译 以下为原文 Thank You!!! Finally! Went through the pk2cmd docs again and you were spot on. pk2cmd sees MCLR as an IO by default, using switches -R -T as described in the readme-file the chip powers up and it's working as expected! |
|
|
|
如果它们是相同的,它们必须运行相同。你用PK2断开了吗?如果是的话,试试电源循环,看看是否有帮助。如果不是,这对于MCLR /PGM引脚的空闲状态肯定是个问题。还请注意,PGM应该有下拉,MCLR应该有上拉。
以上来自于百度翻译 以下为原文 If they're identical they must run the same. Are you trying them with PK2 disconnected? If yes, try power-cycling and see if that helps. If not, this must be a problem with the idle state of MCLR/PGM pins. Also note that PGM should have pull-down, MCLR should have pull-up. |
|
|
|
只有小组成员才能发言,加入小组>>
5242 浏览 9 评论
2031 浏览 8 评论
1955 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3207 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2256 浏览 5 评论
778浏览 1评论
668浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
595浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
677浏览 0评论
576浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 15:36 , Processed in 1.570903 second(s), Total 91, Slave 75 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号