完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
你好,我使用PIC16F1619微控制器和PICtiT3程序员/调试器。当我尝试调试时,我会遇到以下错误。构建已经完成,我还可以将代码上传到微控制器上。请检查配置位设置并在继续之前对设备进行编程。这种故障最常见的原因是振荡器和/或PGC/PGD设置。F//上电定时器启用->PWRT禁用#pragma配置MCLRE=ON//MCLR管脚功能选择->MCLR/VPP管脚功能是MCLR#pragma配置CP=OFF//Flash程序内存代码保护->程序内存代码保护禁用#pragma配置BOREN=ON//Brown-out Reset Enable->Br自己的复位使能启用的γ-PracMA配置文件ClkutEN = /Out/Out-Out--and & Gt;ClkOutt函数被禁用。CLKOUT引脚#pragma配置IESO=ON//Internal/External Switch Over->Internal External Switch Over-模式启用#pragma config FCMEN=ON//Fail-Safe Clock Monitor Enable->Fail-Safe Clock Monitor启用//CONFIG2#pragma config WRT=OFF//Flash Memory Memory Monitor自写保护->写保护关闭#pragma配置PPS1WAY=OFF//外围引脚选择单向控制->PPSLOCK位可以通过软件#pragma配置ZCD=OFF//零交叉检测禁用位->ZCD禁用重复设置和清除。可以通过设置ZCDCON#pragma配置PLLEN=ON//PLL启用位>4xPLL的ZCDSEN位来启用#pragma config STVREN=ON//Stack Overflow/Underflow Reset Enable->Stack Overflow or Underflow将导致复位#pragma config BORV=LO//Brown-out复位电压Sel。段>布朗复位电压(Vbor),选择低跳闸点。#pragma配置LPBOR=ON//低功耗布朗复位->低功耗BOR启用#pragma配置LVP=OFF//低压编程启用->MCLR/VPP上的高压必须用于编程//CONFIG3#pragma配置WDTCPS=WDT周期选择->,软件控制(WDTPS)#pragma配置WDTS=软件控制(WDTPS)#pragma配置WDTS=软件控制(WDTWS位)#软件配置WDT周期选择->软件控制(软件控制(WDTWS WDTWS位)\#pragma配置WDTWWWDT软件控制(WDT软件控制(WDTWS位)\\\\#pragma配置WDT WDT配置WDT WDT WDTCCS(WDTWDTWDTWWWWDTWS位))#软件控制(WDTWS位)\cOntROL,由WDTCS BITSCAN控制的任何人,请帮助我如何去做这件事?尝试配置:1。LVP启用和禁用2。启用和禁用MCLRE
以上来自于百度翻译 以下为原文 Hi, I am using a pic16f1619 microcontroller and a pickit3 programmer/debugger. I am getting the following error when I try to debug. The build is complete and I am also able to upload the code onto the microcontroller. "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." I am using MPLAB X IDE and MCC version3, The configuration file is as follows, // CONFIG1 #pragma config FOSC = INTOSC // Oscillator Selection Bits->INTOSC oscillator: I/O function on CLKIN pin #pragma config PWRTE = OFF // Power-up Timer Enable->PWRT disabled #pragma config MCLRE = ON // MCLR Pin Function Select->MCLR/VPP pin function is MCLR #pragma config CP = OFF // Flash Program Memory Code Protection->Program memory code protection is disabled #pragma config BOREN = ON // Brown-out Reset Enable->Brown-out Reset enabled #pragma config CLKOUTEN = OFF // Clock Out Enable->CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin #pragma config IESO = ON // Internal/External Switch Over->Internal External Switch Over mode is enabled #pragma config FCMEN = ON // Fail-Safe Clock Monitor Enable->Fail-Safe Clock Monitor is enabled // CONFIG2 #pragma config WRT = OFF // Flash Memory Self-Write Protection->Write protection off #pragma config PPS1WAY = OFF // Peripheral Pin Select one-way control->The PPSLOCK bit can be set and cleared repeatedly by software #pragma config ZCD = OFF // Zero Cross Detect Disable Bit->ZCD disable. ZCD can be enabled by setting the ZCDSEN bit of ZCDCON #pragma config PLLEN = ON // PLL Enable Bit->4x PLL is always enabled #pragma config STVREN = ON // Stack Overflow/Underflow Reset Enable->Stack Overflow or Underflow will cause a Reset #pragma config BORV = LO // Brown-out Reset Voltage Selection->Brown-out Reset Voltage (Vbor), low trip point selected. #pragma config LPBOR = ON // Low-Power Brown Out Reset->Low-Power BOR is enabled #pragma config LVP = OFF // Low-Voltage Programming Enable->High-voltage on MCLR/VPP must be used for programming // CONFIG3 #pragma config WDTCPS = WDTCPS1F // WDT Period Select->Software Control (WDTPS) #pragma config WDTE = OFF // Watchdog Timer Enable->WDT disabled #pragma config WDTCWS = WDTCWSSW // WDT Window Select->Software WDT window size control (WDTWS bits) #pragma config WDTCCS = SWC // WDT Input Clock Selector->Software control, controlled by WDTCS bits Can anyone please help me on how to go about this? Tried configurations: 1. LVP enabled and disabled 2. MCLRE enabled and disabled |
|
相关推荐
16个回答
|
|
|
通常这些是连接问题,或硬件,或缺少解耦电容器…
以上来自于百度翻译 以下为原文 Usually these are connection issues, or hardware, or missing decoupling capacitors... |
|
|
|
|
|
…或PGD/PGC连接到未配置为调试的引脚-检查配置位。
以上来自于百度翻译 以下为原文 ...or PGD/PGC connected to the pins not configured for debugging - check your configuration bits. |
|
|
|
|
|
@ DarioG -硬件连接如文件中提到的那样。在10K欧姆电阻的帮助下,MCLR被拉起。文件上说,电容器不应该连接,因此没有电容器连接到任何引脚。@MBedder-你能帮我配置PGD/PGC吗?我无法在数据表上找到这一点,我正在使用MCC生成配置文件。我使用的微控制器是PIC16F1619。
以上来自于百度翻译 以下为原文 @DarioG - The hardware connections are as mentioned in the document. The MCLR is pulled up with the help of a 10k ohm resistance. The document tells that capacitors should not be connected, and hence there are no capacitors attached to any pins. @MBedder - Could you please help me on how to configure PGD/PGC? I am not able to find this on the datasheet and I am using MCC to generate config files. The microcontroller I am using is pic16f1619 |
|
|
|
|
|
必须清除CONT2配置字中的/Debug位(位12)进行调试。
以上来自于百度翻译 以下为原文 You must clear the /DEBUG bit (bit 12) in the CONFIG2 Configuration Word to do debugging. |
|
|
|
|
|
井手/编译器不应该处理它吗?好吧!对于电容器来说,去耦通常是必要的。
以上来自于百度翻译 以下为原文 Shouldn't the IDE/compiler take care of it? Ok anyway! As for capacitors, well, decoupling ones are usually *always* necessary |
|
|
|
|
|
这可能是PIC没有运行或者调试器没有连接。您需要弄清楚这两者是哪一个。我建议构建一个LED闪烁器,然后在没有调试器的情况下运行它,看看它是否闪烁。一旦闪烁,就可以尝试调试。
以上来自于百度翻译 以下为原文 This could be either PIC not running or debugger not connecting. You need to figure out which of these two it is. I would suggest building a LED blinker then try to run it without debugger and see if it blinks or not. Once you get it blinking, you can try debugging. |
|
|
|
|
|
“诺斯盖伊-嗯,我试图切换一个引脚,我不能观察到任何示波器输出。但是,当我编程设备,我得到的通知为“编程…编程/验证完成”,微控制器将如何编程,如果它被损坏?它也被验证了吗?还是没有损坏?有什么配置需要我处理吗?
以上来自于百度翻译 以下为原文 @NorthGuy - Well I tried to toggle a pin, and I am not able to observe any output on the oscilloscope. But, when I program the device, I get the notification as "Programming... Programming/Verify complete" How will the microcontroller be programmed if it is damaged? and it is also verified? Or is it not damaged? Is there any configuration that I have to take care of? |
|
|
|
|
|
|
|
|
|
|
|
@MBedder-我读了这篇文章,但是找不到配置它的方法。#pragma config DEBUG不起作用,编译器抛出了一个错误。因此,我考虑按照NorthGuy的建议开始尝试。值得注意的是,我切换了引脚,微控制器没有运行,这可能是不进入DEBUG模式的原因之一。
以上来自于百度翻译 以下为原文 @MBedder- I read the post, and I could not find a way to configure it. #pragma config DEBUG wont work, and the complier is throwing an error. Hence I thought to initially try as suggested by NorthGuy. I am not able to toggle a pin, the microcontroller is not running, and this might be one of the reason for not entering the DEBUG mode. |
|
|
|
|
|
|
|
|
|
|
|
McCyPrimeDyFrase/MCC.C: 67:错误:(1363)未知配置设置/寄存器(调试=0)使用的是错误。
以上来自于百度翻译 以下为原文 mcc_generated_files/mcc.c:67: error: (1363) unknown configuration setting/register (DEBUG = 0) used is the error. |
|
|
|
|
|
假设你的LED闪烁程序是正确的,看起来你的PIC根本没有运行。检查电源电压和连接,禁用BOREN,PLL,MCLREfor一段时间,看看它是否运行。它可能会被破坏,但不太可能。
以上来自于百度翻译 以下为原文 Assuming your LED blinking program is correct, looks like your PIC doesn't run at all. Check things like supply voltage and connection, disable BOREN, PLL, MCLRE for a while and see if it runs. It can be damaged, but it's rather unlikely. |
|
|
|
|
|
@ NorthGuy谢谢!我对我的计划很有信心。如果微控制器没有供电,那么在编程时就会出现一个错误,声明“目标设备没有连接”。我禁用了上述配置,并且仍然会遇到相同的错误。我将尝试改变微控制器,PIC16F1618上的相同程序工作,我也可以进入调试模式。
以上来自于百度翻译 以下为原文 @NorthGuy- Thank you! I am pretty confident about my program. If the microcontroller is not powered then I get an error while programming, stating, "Target device not connected". I disabled the mentioned configurations and I am still getting the same error. I will try to change the microcontroller. The same program on pic16f1618 works and I was also able to enter debug mode. |
|
|
|
|
|
不,你不应该自己去管理。程序员/调试器自动处理它。
以上来自于百度翻译 以下为原文 No. You should NEVER try to manage that bit yourself. The programmer/debugger handles it automatically. |
|
|
|
|
|
同意。我应该写“确保调试位被清除”。
以上来自于百度翻译 以下为原文 Agreed. I should have written "make sure the DEBUG bit is cleared" instead. |
|
|
|
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
478 浏览 0 评论
5799 浏览 9 评论
2338 浏览 8 评论
2229 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3534 浏览 3 评论
1131浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1105浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
875浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
478浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-4 09:59 , Processed in 1.383067 second(s), Total 102, Slave 85 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2377