完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我在这个论坛是新的,我希望能很好的交流,因为我不会说太多英语。嗯,我有一个MPLAB的问题,因为当我把MI程序收费给PIC时,我收到这个信息;“设备擦除…编程……下面的内存区域将被编程:程序存储器:起始地址=0x0,结束地址=0x7FFF内存程序地址:0预期值:2FFD接收值:0.程序设备失败:“我不知道这意味着什么或如何纠正它,这就是为什么我要称呼你。这个问题是什么?我怎样修理它?请帮助!这是我的程序:在一个7段显示器上有一个从1到10的计数器,它还包括一个用一个按钮打开的LED,它非常简单,我在这个关于微控制器的开始。/PIC16F628 A配置位设置/ /‘C’源代码行配置语句//CONFIGO/OS/振荡器选择位(ATOSCC振荡器:RA6/OSC2/CKOUT引脚上的I/O功能,RA7/OSC1/CKIN上的I/O功能),PARTMAMA配置,WDTE=OF//看门狗定时器允许位(WDT禁用)P PIN功能选择位(RA5/MCLR/VPP引脚功能是MCLR)α-PracMA配置BRONE=OF//Brown out检测启用位(BOD禁用)α-PrAPMA配置LVP= OF//低电压编程允许位(RB4/PGM引脚具有数字I/O功能,MCL上的HV必须用于编程)//数据EE存储代码保护位(数据存储器代码保护关闭),γ-PrimaMac配置Cp= OF//FLASH程序存储器代码保护位(代码保护关)//γ-PracMA配置语句应在项目文件之前包含.//使用项目枚举,而不是对ON和OFF进行定义。Ar PLANtiLASS={0x3f,0x06/0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x67 };//1 Al 10 cad todo-com nnOffal主(空隙){TrISA=0B11111110;TrISB= 0B1001100;CCMON=0B000 000 0111;而(1){PtBB=Plurllas(康塔多);γ-DelayyMs(1000);If(++康塔多)=1康塔多定义了xTalthFrq 4000000 char=0;0)康塔多=0;{if(RA1)RA0=1;否则RA0=0;}返回;}感谢所有!:)
以上来自于百度翻译 以下为原文 Hello to everyone, i´m new in this forum, I hope to communicate well, since I do not speak much English. well i have a problem with mplab because when i charge mi program to the pic, I receive this message; "Device Erased... Programming... The following memory area(s) will be programmed: program memory: start address = 0x0, end address = 0x7ff configuration memory program memory Address: 0 Expected Value: 2ffd Received Value: 0 Failed to program device" I do not know what this means or how to correct it and that is why I am addressing you. What is this problem? how can i repair it? please help! this is my program: is a counter from 1 to 10 on a 7-segment display and also consists of a led that turns on with a button, it's very simple, I'm starting in this about microcontroller. // PIC16F628A Configuration Bit Settings // 'C' source line config statements // CONFIG #pragma config FOSC = INTOSCIO // Oscillator Selection bits (INTOSC oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN) #pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled) #pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled) #pragma config MCLRE = ON // RA5/MCLR/VPP Pin Function Select bit (RA5/MCLR/VPP pin function is MCLR) #pragma config BOREN = OFF // Brown-out Detect Enable bit (BOD disabled) #pragma config LVP = OFF // Low-Voltage Programming Enable bit (RB4/PGM pin has digital I/O function, HV on MCLR must be used for programming) #pragma config CPD = OFF // Data EE Memory Code Protection bit (Data memory code protection off) #pragma config CP = OFF // Flash Program Memory Code Protection bit (Code protection off) // #pragma config statements should precede project file includes. // Use project enums instead of #define for ON and OFF. #include #define _XTAL_FREQ 4000000 char contador=0; const char plantillas[10]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x67}; //1 al 10 cátodo común void main(void) { TRISA=0b11111110; TRISB=0b00000000; CMCON=0b00000111; while (1) { PORTB= plantillas[contador]; __delay_ms(1000); if ((++contador)==10) contador=0; } { if (RA1) RA0=1; else RA0 =0; } return; } THANKS TO ALL! :) |
|
相关推荐
4个回答
|
|
嗨,我过去也有过类似的问题。你的问题的可能原因是沟通不畅。检查你的程序员的领导是否有很好的联系。还要检查程序员的电源电压是否正确。如果可能的话,从目标而不是程序员的角度来说是值得的。在电路内编程时
以上来自于百度翻译 以下为原文 Hi, I had similar problem in the past. The likely cause of your problem is bad communication. Check that the leads of your programmer are making good contact. Also check that the supply voltage to the programmer is correct. It is worth to power from target and not from programmer, if possible, especially when programming in-circuit. Regards Francesco C |
|
|
|
是的,这些图片上的另一个可能的问题是,如果你禁用MCLR功能,并有内部振荡器…但这似乎不是你的情况。
以上来自于百度翻译 以下为原文 Yeah, another possible issue on those PICs would be if you disable MCLR functionality and have internal Oscillator... but this seems not to be your case |
|
|
|
非常感谢你的评论。最后,在将程序加载到PIC之前,我已经将显示器断开,并且在PIC I中正确加载程序后,重新连接显示器,问题得到解决:
以上来自于百度翻译 以下为原文 thank you very much for your comments. Finally I have disconnected the display before loading the program to the pic, and once loaded the program correctly in the pic I reconnected the display, problem solved :) |
|
|
|
似乎相关的信息被隐藏在你的代码中,即你有7段显示连接到引脚RB0到RB6。编程使用引脚RB6/PGC和RB7/PGD,并且还要求引脚RB4/PGM不被拉高。在7段显示器上的公共引脚连接到地或+5V,所以我们不知道它是拉那些引脚高,或低。
以上来自于百度翻译 以下为原文 It would appear that the relevant information was buried in your code. i.e. you have the 7-segment display connect to pins RB0 to RB6. Programming uses pins RB6/PGC and RB7/PGD, and also requires that pin RB4/PGM is NOT pulled high. You can't have pullups on PGC or PGD either. You did not reveal if the common pin on the 7 segment display is connected to ground or +5V, so we don't know if it is pulling those pins high, or low. |
|
|
|
只有小组成员才能发言,加入小组>>
5183 浏览 9 评论
2005 浏览 8 评论
1932 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3178 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2229 浏览 5 评论
739浏览 1评论
624浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
510浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
637浏览 0评论
535浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-27 17:25 , Processed in 1.612776 second(s), Total 85, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号