1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在切换到新设备,开始使用MPLAB X。因为我在新的学习曲线中,我编写了一个简单的程序来学习和测试。程序建立好,但找不到设备。我之所以选择PIC16F86,是因为它在电路调试,内部OSC和足够的功能,为新项目。这是我的简单程序://CONT1α-PrAPMA CONFIG COFCc = IncCnNOKLKOUT//振荡器选择位(ItoSoCo振荡器:I/O函数在RA上)6 / OSC2/CKOUT引脚,I/O功能在RA7/OSC1/CKIN)上,TraceMac配置,WDTE = OF//看门狗定时器允许位(WDT禁用,并且可以由WDTCON寄存器的SWD10位启用)。LeCT位(RE3/MCLR PIN功能是MCLR)α-PracMA配置CP=关/ /码保护位(程序存储器代码保护被禁用)α-PrAPMA COMPIG CPD= OF//数据码保护位(数据存储器码保护被禁用)PrimaMaungIIOS= ON//内部外部切换位(内部/外部切换模式被启用)γ- PracMA配置FCMANN = / /故障安全时钟监视器启用位(启用故障安全时钟监视器)α-PracMA配置LVP=关闭/ /低电压编程允许位(RB3引脚具有数字I/O,HV)在MCLR必须用于编程)//CONT2O-PARMAMA配置BR4V= BOL40V//Brown out重置选择位(Brown out RESET SET设置为4.0V)α-PrAPMA配置WRT=OF//Flash程序存储器自写使能位(写保护关)/ /πPracMA配置语句应先于项目文件包含。//使用Project枚举代替ON定义ON和OFF。γ包含和lx.H.& gt;空延迟(int);空隙MSECH();空主(空){TrISC= 0x00;而(1){RC0=1;延迟(2000);RC0=0;延迟(2000);}} 1。由于人们使用PK3存在的问题,我在16F690的其他电路板上测试了它,它运行良好。然而,软件是使用HITEC.C.2开发的。电压为4.75,并与1和1uF帽绕过。3。LVP OFF4。MCLR与10K拉上。1帽。5。内部振荡器。我需要一些建议来帮助我。罗杰
以上来自于百度翻译 以下为原文 I'm in the process of switching to new device and starting to use MPLAB X. Because I'm in the new learning curve I made up a simple program to learn and test things out. Program builds ok but can't find device. The reason I choose the PIC16F886 because it has in circuit debug, internal osc and enough functions for new projects. Here is my simple program: // CONFIG1 #pragma config FOSC = INTRC_NOCLKOUT// Oscillator Selection bits (INTOSCIO 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 and can be enabled by SWDTEN bit of the WDTCON register) #pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled) #pragma config MCLRE = ON // RE3/MCLR pin function select bit (RE3/MCLR pin function is MCLR) #pragma config CP = OFF // Code Protection bit (Program memory code protection is disabled) #pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled) #pragma config BOREN = ON // Brown Out Reset Selection bits (BOR enabled) #pragma config IESO = ON // Internal External Switchover bit (Internal/External Switchover mode is enabled) #pragma config FCMEN = ON // Fail-Safe Clock Monitor Enabled bit (Fail-Safe Clock Monitor is enabled) #pragma config LVP = OFF // Low Voltage Programming Enable bit (RB3 pin has digital I/O, HV on MCLR must be used for programming) // CONFIG2 #pragma config BOR4V = BOR40V // Brown-out Reset Selection bit (Brown-out Reset set to 4.0V) #pragma config WRT = OFF // Flash Program Memory Self Write Enable bits (Write protection off) // #pragma config statements should precede project file includes. // Use project enums instead of #define for ON and OFF. #include void delay(int); void msec(); void main(void){ TRISC=0x00; while(1){ RC0 = 1; delay(2000); RC0 = 0; delay(2000); } } 1. Because of the problems people having with PK3, I tested it on other breadboards with 16F690's and it works fine. However the software was developed using HITECH C. 2. Voltage is 4.75 and well bypassed with .1 and 1uf caps. 3. LVP off 4. MCLR with 10k pull up with .1 cap. 5. Internal oscillator. I need some advice to help me out. Roger |
|
相关推荐
12个回答
|
|
|
|
|
|
没有区别,试着打开和关闭。不应该把它放在那里,造成长时间延迟。补充信息:MLLAB X VE 3.65和XC1.42.使用16F690构建新的面包板XC项目,具有相同的主程序。工作良好。IDE构建了配置,这给了我PK3工作的信心。
以上来自于百度翻译 以下为原文 Makes no difference, tried it on and off. Shouldn't have it on there anyway, cause long delay. Added info: MLLAB X ver 3.65 and XC 1.42. Built new breadboard xc project using 16F690 with same main program. Works fine. Had IDE build the configuration. That gives me confidence that PK3 is working. |
|
|
|
在我的构建环境中,我需要用MPLABX V3.65和MPLAB V892来支持构建,这与我的电路调试工具有关。我经常使用PICTIT3、ICD3、Realice,发现有时IDE加载到ICD工具中的固件不能正常工作,并且会显示您所看到的错误类型。对我来说,工作是首先强制IDE(MPLABX或MPLAB8)使用手册DO来更新PICTIT3。MPLAB8中的固件选项,或者:设置:手动下载固件:MPLAB IPE应用程序中的菜单。第二步是强制下载一个PIC家族,而不是下载,然后下载我将使用的PIC家族的支持。例如:当我将使用PIF24F目标时,我将使用MPLABX IPE加载PIC18F45 50的支持,然后切换到PIF24F系列中的目标,如PIC24FJ1024GA606。试试这样的东西,也许它也会对你有用。
以上来自于百度翻译 以下为原文 In my build environment I need to support building with MPLABX v3.65 and MPLAB v8.92 and this has issues with my In-Circuit-Debug tools. I use the PICkit3, ICD3, RealICE regularly and found that at times the firmware loaded in to the ICD tool by the IDE does not work correctly and will show the kind of errors you have been seeing. What works for me is to first force the IDE (MPLABX or MPLAB8) to update the PICkit3 using the manual download firmware option in MPLAB8, or the :Settings:Manual Download Firmware: menu in the MPLAB IPE application. Then the second step is to force a down load to support a PIC family I am not using then down load the support for the PIC family I will be using. For example: When I will be using the PIF24F targets I will use the MPLABX IPE to load support for a PIC18F4550, then switch to the target in the PIF24F family such as the PIC24FJ1024GA606. Try something like this, maybe it will work for you as well. |
|
|
|
|
|
|
|
你好,罗杰,试着把“PGM”的PIN保存在断言状态下,看看你的问题是否消失了。(我想知道你是否被硅LealTaT击中了‘LVP’配置位和‘PGM’PIN。将“PGM”直接或通过下拉电阻连接到VSS。让我们知道,如果你仍然困,需要帮助。最好的问候,肯。
以上来自于百度翻译 以下为原文 Hello Roger, Try keeping the 'PGM' pin in the deasserted state to see if your issue goes away. (I'm wondering if you are getting hit by the silicon errata related to 'LVP' configuration bit and the 'PGM' pin. Tie 'PGM' to Vss directly or via a pull-down resistor.) Let us know if you are still stuck and need help. Best regards, Ken |
|
|
|
好点肯,我忘记了“GOTCHA”,LPP是在空白芯片中启用的。但是为什么PIN兼容PIC16F1XXX设备将是一个更好的选择。
以上来自于百度翻译 以下为原文 Good point Ken, I'd forgotten about that "gotcha", that LVP is enabled in blank chips. Yet another reason why a pin compatible PIC16F1xxx device would be a better choice. |
|
|
|
|
|
|
|
我有RB3(LVP,PGM)连接到GND。没有区别。我回顾PK3连接几次,它是正确的。PK3 MCU1 MCLR2 Vcc3 GND4 RB6(CLK)引脚275 RB7(数据)引脚286 N/C(是LVP)正确吗?
以上来自于百度翻译 以下为原文 I have RB3 (LVP,PGM) tied to GND. No difference. I reviewed PK3 connection several times and it is correct. PK3 MCU 1 MCLR 2 VCC 3 GND 4 RB6(CLK) pin 27 5 RB7(DATA) pin 28 6 N/C (Was LVP) Correct? |
|
|
|
|
|
|
|
QHBI不能浪费时间在886,我一直在工作和关闭这张照片几个月。尝试了4个单位,结果相同。首选是DIP封装,在电路调试和内部振荡器选项。任何建议都很好。
以上来自于百度翻译 以下为原文 qhb I can't be wasting time on 886, I've been working on and off with this PIC for months. Tried 4 units, same results. Preference is a dip package, in circuit debugging and internal oscillator option. Any suggestion would be good. Roger |
|
|
|
PStechPaulWOW是个什么样的典范。我用一个890建立了一个新的电路板,并复制了一个旧的890板布线,因为它的工作,我认为问题是886。但这是我看过几次的电线,从来没见过!!!!!!!!!!!!!!!!谢谢大家支持我。但我正在学习XC。罗杰
以上来自于百度翻译 以下为原文 PStechPaul WOW what a paradigm. I built up a new breadboard using a 890, and copied the wiring for an old 890 board and because it worked I thought the problem was the 886. But it was the wiring which I reviewed several time and never saw it!!!!!!!!!!!! Thanks guys for putting up with me. But I'm learning xc. Roger |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
5242 浏览 9 评论
2031 浏览 8 评论
1955 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3207 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2256 浏览 5 评论
778浏览 1评论
669浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
596浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
679浏览 0评论
577浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 22:45 , Processed in 1.367335 second(s), Total 100, Slave 84 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号