完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我是疯了…我有6个新的自定义板与PIC24F16KL401运行内部FRC。这里配置位:为了保护代码,我只是添加了α-PrimaMaungGSS0= on(这是正确的吗?)然后,我用ICD3和MPLAB x3.6在6个板上编译和编程,只有一个PIC正确工作,如果我读PrimRAM存储器,我可以在“标签”列上看到我的函数,但是在DISASY列中,我只能看到NOP,而在工作PIC中,我可以读取指令,或者Nopr如果只是擦除,如果我试图擦除。PIC I仍然读取程序内存填充NOP。我是否损坏了PIC错误的配置位设置?我还更新了MPLAB X到4.5,但没有成功。有什么想法吗?谢谢。
以上来自于百度翻译 以下为原文 Hi to all, I'm becomking crazy... I got 6 new custom boards with PIC24F16KL401 running with internal FRC. Here configuration bits: #pragma config FNOSC = FRC // oscillatore FRC interno #pragma config SOSCSRC = DIG // disabilito oscillatore secondario #pragma config POSCMD = NONE // primary oscillator disabilitato //#pragma config OSCIOFNC = OFF // oscita clock #pragma config OSCIOFNC = ON // porta abilitata, clock out disabilitato #pragma config ICS = PGx1 // FPOR #pragma config BOREN = BOR0 // Brown-out Reset Enable bits (Brown-out Reset disabled in hardware; SBOREN bit disabled) #pragma config IESO = OFF // Internal External Switch Over bit (Internal External Switchover mode disabled (Two-speed Start-up disabled)) To protect code I just added #pragma config GSS0 = ON (is this correct?), then I compiled and programmed using ICD3 and MPLAB X 3.6 On 6 boards only one PIC is correctly working, if I read progam memory I can see on "Label" column my functions, but on DisAssy column I can only see NOP while in working PIC I can read instruction, or NOPR if just erased. If I try to erase PIC I still read program memory filled with NOP. Have I damaged PIC with wrong configuration bits settings? I also updated Mplab X to 4.5, but without success. Any ideas? Thanks. |
|
相关推荐
2个回答
|
|
嗨,你能为你的PIC编程吗?你能调试你的照片吗?您是否将引脚PGC1和PGD1连接到ICSP连接器(您的配置位必须选择与您的ICSP连接器连接的相同的调试信号对)。您能显示您的示意图吗?如果你能做到这两件事,那就意味着MPLAX X或调试工具没有问题。它只意味着你的SW有一个问题。如果你的板上有一个LED,只要眨一下LED,看看会发生什么。
以上来自于百度翻译 以下为原文 Hi, Can you program your PIC ? Can you debug your PIC ? did you connect the pins PGC1 and PGD1 to the ICSP connector (your configuration bits must select the same debug signal pairs as the one which is wired to your ICSP connector). Can you show your schematics ? If you can do both it means there is no issue with MPLAB X or the debug tool. It only means that there is an issue in your SW. If you have an LED on your board, just blink the led and see what happens. Regards |
|
|
|
基本上我不能编程PIC,我不能调试PIC。硬件是相同的(我以前在同一个板上做过测试),ICD3和连接器都正确工作。PGC和PGD没有改变。我安装了MPLAB IPE,在这种情况下,我可以正确擦除PIC,然后我可以用MPLAB X正确地重新编程。我假设配置比特有错误,所以我删除了保护代码:在这种情况下,我可以正确地编程/调试PIC。如果我重新启用保护代码://fgs*PrimaMatg配置文件GWRP= OF//通用段Flash写保护(一般段可以被写入)。保护代码保护(标准安全启用)编程出错,PIC的行为是意外的(LED在启动时保持不变)。
以上来自于百度翻译 以下为原文 Basically I can't program PIC, I can't debug PIC. Hardware is the same (I made test on same board previously working), ICD3 and connectors are correctly working. PGC and PGD not changed. I installed Mplab IPE, in this case I can correctly erase PIC, then I can correctly program it again using MPLAB X. Ok, I supposed an error in configuration bits, so I removed protection code: in this case I can correctly program/debug PIC. If I re-enable protection code: // FGS #pragma config GWRP = OFF // General Segment Flash Write Protect (General segment may be written) #pragma config GSS0 = ON // General Segment Code Protect (Standard security enabled) programming goes wrong and behaviour of PIC is unexpected (leds stay on at boot). |
|
|
|
只有小组成员才能发言,加入小组>>
5189 浏览 9 评论
2009 浏览 8 评论
1933 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3181 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2232 浏览 5 评论
743浏览 1评论
629浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
512浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
642浏览 0评论
538浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-30 06:34 , Processed in 1.424460 second(s), Total 77, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号