完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我试图解决MPLabX与一个PICtiT3调试器设备一起使用的问题。PIC设备是一个PIC18F420,具有4MHz的外部晶体时钟连接和工作。程序建立OK和ApPARAS来编程目标,但是,我尝试调试目标,我得到以下信息:设备擦除…编程…下面的内存区域将被编程:程序MEMORY:起始地址=0x0,结束地址=0x13FF配置,内存编程/验证完成,目标设备未准备好调试。请检查配置位设置并在继续之前对设备进行编程。这种故障最常见的原因是振荡器和/或PGC/PGD设置。系统配置代码如下所示。包括P18F420.C包括步进文件的控制。TED CONFIG FCMANE= CONFIG-ISOO=OFF;程序配置寄存器2L;CONFIG pWRT= OFF;上电定时器允许位(压路机禁用);布朗输出重置和上电定时器禁用配置CORBIN=SBODIS;Brown out RESET允许位(仅在硬件中启用Brown Outlook复位(SBORN D)配置BRV=3;Brown out重置电压位(最小设置);程序配置寄存器2H配置WDT=OFF;看门狗定时器允许位(WDT禁用(控制放在SWDTEN位))配置WDTPS=32768;看门狗定时器后标选择位(1:327 68);程序配置配置寄存器3H;CONFIG XNST= OFF配置CCP2MX= PORTC;CCP2 MUX位(CCP2输入/输出与RC1复用)配置PBADEN ON;PORTB A/D使能位(PORTB & LT;4:0&G.引脚被配置为复位时的模拟输入通道)配置LPT1OSC=OFF;低功耗Time1振荡器使能BIT(Time1配置为更高功率操作)配置MCLRE=ON;MCLR引脚启用位(MCLR引脚启用;R3输入引脚禁用);程序配置寄存器4LPGD和PGC线从PICTIT3直接连接到目标芯片的PSI40(RB7)和39(RB6),并且没有上拉。有人建议我下一步该怎么做吗?谢谢,
以上来自于百度翻译 以下为原文 I am trying to solve a problem with MPLabX used with a PICKIT3debugger device. The PIC device is a PIC18F4520 with a 4Mhz external CRYSTAL clock connected and working. The program builds ok and apperas to program the target, however, i I try to debug the target, I get the following message: Device Erased... Programming... The following memory area(s) will be programmed: program memory: start address = 0x0, end address = 0x13ff configuration memory Programming/Verify complete The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and/or PGC/PGD settings The system config code is as shown below ... include p18f4520.inc include Control of Paces Header File.H ;**************************************************************************************************************************************** ;Program Configuration Register 1H ; CONFIG OSC=XT ; Osc switching disabled & Xtal osc selected CONFIG FCMEN = OFF CONFIG IESO = OFF ;Program Configuration Register 2L ; CONFIG PWRT = OFF ; Power-up Timer Enable bit (PWRT disabled) ; Brown out reset & power up timer disabled CONFIG BOREN = SBORDIS ; Brown-out Reset Enable bits (Brown-out Reset enabled in hardware only (SBOREN is disabled)) CONFIG BORV = 3 ; Brown Out Reset Voltage bits (Minimum setting) ;Program Configuration Register 2H CONFIG WDT = OFF ; Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit)) CONFIG WDTPS = 32768 ; Watchdog Timer Postscale Select bits (1:32768) ;Program Configuration Register 3H ; CONFIG XINST = OFF CONFIG CCP2MX = PORTC ; CCP2 MUX bit (CCP2 input/output is multiplexed with RC1) CONFIG PBADEN = ON ; PORTB A/D Enable bit (PORTB<4:0> pins are configured as analog input channels on Reset) CONFIG LPT1OSC = OFF ; Low-Power Timer1 Oscillator Enable bit (Timer1 configured for higher power operation) CONFIG MCLRE = ON ; MCLR Pin Enable bit (MCLR pin enabled; RE3 input pin disabled) ;Program Configuration Register 4L the pgd and pgc lines from the PICkit3 are directly connected to piNS40(rb7) AND 39 (rb6) OF THE TARGET CHIP AND THERE ARE NO PULL UPS ON THESE LINES. cAN ANYONE SUGGEST WHAT i SHOULD TRY NEXT? tHANKS, |
|
相关推荐
2个回答
|
|
HiTHE线被注释,所以我怀疑它是内部振荡器。无论如何,调试是没有问题的。这条线也被注释了,PWRT应该停止调试,所以最好不要注释它。电路调试。检查PigIt 3文档的完整列表。不要相信默认值,只要确定,明确地定义所有重要的配置选项,特别是那些必须调试的选项(PK3文档)。还要注意在配置中必须设置“Debug=off”。此位由Debug。
以上来自于百度翻译 以下为原文 Hi This line is commented so I suspect its defaulting to internal oscillator. Anyhow, it should be no problem for debugging. This line is also commented, PWRT should be OFF for debuging, so better uncomment it. There are a number of configuration conditions that must be met in order to be able to do in circuit debugging. Check the Pickit 3 documentation for the full list. Don't trust defaults, just to be sure, define explicitly all the inportant config option, in special the ones that are a must for debugging (PK3 docs). Also note that you must set "DEBUG = OFF" in the configuration. This bit is handled automatically by the debuger. HIH Best regards Jorge |
|
|
|
非常感谢豪尔赫。我不相信错过这样一个基本错误,无意中评论代码行!!
以上来自于百度翻译 以下为原文 tHANK YOU SO MUCH jORGE.. i CANT BELIEVE MISSED SUCH A BASIC MISTAKE AS INADVERTENTLY COMMENTING A CODE lINE!! |
|
|
|
只有小组成员才能发言,加入小组>>
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-18 04:53 , Processed in 1.189699 second(s), Total 75, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号