嗨,我是PIC18新手,遇到麻烦了。我可以用PIC16F1829和其他的USAART而没有问题,但是自从我开始使用PIC18,我就不能使用EUSAT了。事实上,我甚至不能让LATCX高或低!MCLR似乎根本没有复位。我肯定错过一些东西,但找不到几个小时!这就是我所做的。使新项目[微芯片嵌入] [Pic18F13K22]支持调试头[NON] [PKIT3] [Sn:Bur09000] [编译器工具链] [XC8(V1.42)]项目PIC18F13K22。打开CONFIG[CONF]—[PIC
tiT3] - [
电源] [来自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