完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我是PIC18新手,遇到麻烦了。我可以用PIC16F1829和其他的USAART而没有问题,但是自从我开始使用PIC18,我就不能使用EUSAT了。事实上,我甚至不能让LATCX高或低!MCLR似乎根本没有复位。我肯定错过一些东西,但找不到几个小时!这就是我所做的。使新项目[微芯片嵌入] [Pic18F13K22]支持调试头[NON] [PKIT3] [Sn:Bur09000] [编译器工具链] [XC8(V1.42)]项目PIC18F13K22。打开CONFIG[CONF]—[PICtiT3] - [电源] [来自PICTIT3]的电源目标电路检查电压3.0按[MCC] [内部时钟] [16MHZH-HFIFTSOC]增加[ Esurt ]添加检查[使能发送],[启用连续接收],[重定向STDIO到USAT ]打开Maun.CF LATC,打开Maun.C,并编辑这样的代码。
以上来自于百度翻译 以下为原文 Hi, I’m new to PIC18 and in trouble with it. I could use EUSART with PIC16F1829 and others without problem but since I started to use PIC18 I can’t use EUSART. Actually I can’t even let LATCx HIGH or LOW! MCLR doesn't seem to reset at all. I'm definitely missing something but can't find it for hours! This is what I did. Make New Project [Microchip Embedded]-[Standard Project] Device [PIC18F13K22] Supported Debug Header [None] [PICkit3]-[SN:BUR000000000] [Compiler Toolchains] - [XC8 (v1.42)] Project PIC18F13K22 is made. Open Config [Conf]-[PICkit3]-[Power] [Power target circuit from PICkit3] Check Voltage Level 3.0 Press [MCC] [Internal Clock] [16MHz_HFINTOSC] added [ESURT] Add Check to [Enable Transmit], [Enable Continuous Receive], [Redirect STDIO to USART] Open main.c while (1) { // Add your application code printf("testn"); } For LATC, open main.c and edited the code like this. while (1) { // Add your application code printf("testn"); LATC6 = HIGH; LATC6 = LOW; } I'm using: Windows10 MPLABXIDE v3.65 XC8 (v1.42) MCC v3.36 PIC18F13K22, PIC18F14K22 Thank you, Daniel. K Attached Image(s) Attachment(s) PIC18F13K22.zip (23.44 KB) - downloaded 37 times |
|
相关推荐
13个回答
|
|
我只专注于切换PIN。你把PIN C6设置为输出吗?
以上来自于百度翻译 以下为原文 I'd just concentrate on toggling the pin first. Have you set pin C6 to be an output? |
|
|
|
你是如何配置你的PIN管理器的?你是模拟还是硬件?
以上来自于百度翻译 以下为原文 How did you configure your pin manager. Are you simulating or hardware? |
|
|
|
模拟项目-GT;C6是输入@丹尼尔:包装一个项目没有很多无用的临时材料-gt;http://MyCHIPPrdult.COM/MPLABX:项目包(23.2KB而不是19KB)
以上来自于百度翻译 以下为原文 Simulating the project -> C6 is input @Daniel: Packing a project without a lot of useless temporary stuff -> http://microchipdeveloper.com/mplabx:projects-package (23.2kB instead of 190kB) |
|
|
|
嗨,伙计们,非常感谢你们的帮助!我检查了PIN管理器,但是我找不到可疑的东西。我上传了最新的软件包(感谢VLogi!)以及PIN管理器的屏幕截图和电压检查。(我用硬件,卡特拉)谢谢你,丹尼尔。K
以上来自于百度翻译 以下为原文 Hi Guys, Thank you so much for your help! I checked the pin manager but I couldn't find anything suspicious. I uploaded the newest package (thanks to vloki!) and screen shots of pin manager and the voltage inspection. (I'm using hardware, katela) Thank you, Daniel. K |
|
|
|
好的,C6现在输出。你如何使用你的硬件?调试模式?
以上来自于百度翻译 以下为原文 Ok, C6 is output now. How do you use your hardware? Debug mode? |
|
|
|
嗨,我通常按[播放]按钮。如果可疑按下[构建干净]。这次我按下[调试]按钮查看。PIC写了“TES”(我想这没问题),LATC6走高和低!这个程序保存在循环中。嗯,有什么想法吗?丹尼尔。K
以上来自于百度翻译 以下为原文 Hi, I usually press [Play] button. If suspicious press [Build Clean]. This time I pressed [Debug] button to see. The PIC wrote "tes" (I think this is OK), and LATC6 went HIGH and LOW! And the program kept while loops. Hmm. Any Idea? Daniel. K |
|
|
|
从菜单栏中删除[播放]按钮;-当编码和测试使用[Debug主项目]按钮时,当你完成[Bug和Projtudio…]继续调试时,在EUARTAR.C TXRGG=TXDATA中在第102行放置断点;/ /将数据字节写入USAT。
以上来自于百度翻译 以下为原文 Remove that [play] button from the menu bar ;-) While coding and testing use [debug main project] button and when your done [make and program...] Stay with debug and put a breakpoint at line 102 in eusart.c TXREG = txData; // Write the data byte to the USART. |
|
|
|
嗨,我在你的帖子1中注意到了:这看起来很奇怪…序列号不应该是Bur900Max…你能连接你的硬件和PICTIT3并检查MPLAB X仪表板并报告序列号吗?确保你选择了项目的PACKIT3
以上来自于百度翻译 以下为原文 Hi, I noticed this in your post #1 : this seems very stange...the serial number should not be BUR00000000... Can you connect your hardware and the Pickit3 and check MPLAB X dashboard and report the serial number ? Make sure you selected the Pickit3 for the project Regards |
|
|
|
我找到了密码然后我该怎么办?我在控制台窗口中,但在调试器[Valiab]中,TxDATA具有值't';0x74,'e;0x65,'';0x73','';0x74,n;0x0a。没有什么奇怪的。我只是省略了。对不起,我把你弄糊涂了。我的皮卡3有号码。
以上来自于百度翻译 以下为原文 I found the code And then what do I do? I got tY.!Y.!Y.!Y.! ... in the console window, but in the [Valiables] in the debugger, txData has values 't'; 0x74, 'e'; 0x65,'s'; 0x73,'t'; 0x74, \n; 0x0a. There was nothing curious. I just omitted. Sorry I confused you. My PICkit3 has numbers. |
|
|
|
那么它现在起作用了吗?还是你只看到“TES”?你在哪里看到的?
以上来自于百度翻译 以下为原文 So it works now? Or do you still see only "tes"? Where do you see that? |
|
|
|
我发现在没有任何断点的情况下,我的程序在调试模式下工作得很好。我有“测试”在我的控制台和脉冲在RC6我的程序出局“!哇!在调试模式中,在主C中有一个断点(无论我在哪里中断),我的程序“TY!”是的!是的!是的!……在调试模式下,在EUARART.C.NMCLR和RC6的第102行中有断点,在正常模式([播放]按钮]中不工作。是的!是的!是的!……在PuTTy的控制台窗口,我用软件连接到COM3的9600 BPS。谢谢,丹尼尔。K
以上来自于百度翻译 以下为原文 I found that
Thank you, Daniel. K |
|
|
|
我在您的代码中看到:用PIC18F13K22和PIC18F14K22(如果您离开LVP= ON),您必须将PGM引脚拉到VSS上才能正常运行。昨天有一个相当冗长的解释:http://www. McCys/Copys/M1013141.ASPX 1010179的底线:更改LVP语法集。关闭关闭。(PICIT3无法对你的芯片进行LVP编程,即使你尝试过),戴夫
以上来自于百度翻译 以下为原文 I see in your code: #pragma config LVP = ON // Single-Supply ICSP Enable bit->Single-Supply ICSP enabled With the PIC18F13K22 and the PIC18F14K22 if you leave LVP = ON, you must pull down the PGM pin to Vss to be able to expect normal operation. There was a rather wordy explanation yesterday: http://www.microchip.com/forums/m1013141.aspx#1013179 Bottom line: Change the LVP pragma setting to OFF. (The PICkit3 couldn't do LVP programming to either of your chips even if you tried.) Regards, Dave |
|
|
|
谢谢你,戴夫!你给了我答案!我需要取消MCC系统模块中的“低电压编程使能”。我在正常模式下得到“测试”输出和RC7上的脉冲。再次感谢。-丹尼尔。K
以上来自于百度翻译 以下为原文 Thank you Dave! You gave me the answer! I needed to uncheck [Low-voltage programming Enable] in System Module in MCC. I got the "test" output and pulses on RC7 in normal mode. Thank you again ;-) Daniel. K |
|
|
|
只有小组成员才能发言,加入小组>>
5142 浏览 9 评论
1990 浏览 8 评论
1918 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3159 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2215 浏览 5 评论
713浏览 1评论
601浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
484浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
613浏览 0评论
511浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-10 19:51 , Processed in 1.122146 second(s), Total 69, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号