完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
嗨,我只是用PIC18F23做我的第一步(我是这个MCU的新手,但不是一般的裸金属编程)。不幸的是,我已经失败了配置内部,PLL生成的64兆赫时钟。这就是我所说的:Apple Trima-FiCn= ItiO67,Primamatlab配置,XNT= OF//扩展指令集,TraceMac配置,FCMEN=Off-TracMA配置pWRTEN=OX-PrimaMatlab配置,WDTEN=0-静态空隙InitialiseCPUClock(空隙){OcCONBITS.IrCF0=1;OcCONBITS.IrCF1= 1;0=0;SCONTYBITS=1;OcTunEnter=0;OsTuntEnter=1;OcTuntEnter;Tunt3= 1;OcTun2=1;OsTuntEnter。Tunt1= 1;OsTuntEnter。Tun021;OsCCONDYBY。PLLRDYY=1;OSCCON2BITS MFOSSOL= 1;OctuteBITS.InStC= 1;}有什么想法可能是错的/丢失的?谢谢!
以上来自于百度翻译 以下为原文 Hi, I'm just doing my first steps with the PIC18F23 (I'm new to this MCU but not to bare metal programming in general). Unfortunately I'm already failing in configuring it for internal, PLL-generated 64 MHz clock. That's what I have: #pragma config FOSC=INTIO67 #pragma config XINST = OFF //Extended Instruction set #pragma config FCMEN = OFF #pragma config PWRTEN = OFF #pragma config WDTEN = 0 static void InitialiseCPUClock(void) { OSCCONbits.IRCF0 = 1; OSCCONbits.IRCF1 = 1; OSCCONbits.IRCF2 = 1; OSCCONbits.SCS0 = 0; OSCCONbits.SCS1 = 1; OSCTUNEbits.PLLEN = 1; OSCTUNEbits.TUN5=0; OSCTUNEbits.TUN4=1; OSCTUNEbits.TUN3=1; OSCTUNEbits.TUN2=1; OSCTUNEbits.TUN1=1; OSCTUNEbits.TUN0=1; OSCCON2bits.PLLRDY=1; OSCCON2bits.MFIOSEL = 1; OSCTUNEbits.INTSRC = 1; } Any idea what could be wrong/missing? Thanks! |
|
相关推荐
7个回答
|
|
|
没有那个零件号的设备。你的设备的全名是什么?在你现有的主题中继续下去是有意义的。
以上来自于百度翻译 以下为原文 There is no device with that part number. What is the full name of your device? It would have made sense to continue in your existing topic at http://www.microchip.com/forums/m1015759.aspx |
|
|
|
|
|
嗯……这个设备如何:HTTP://www. McCHIP.COM/WWW产品/En/PIC18F23 K22?肯定是PIC18F23;-)
以上来自于百度翻译 以下为原文 Hm...how about this device: http://www.microchip.com/wwwproducts/en/PIC18F23K22 ? Definitely a PIC18F23 ;-) |
|
|
|
|
|
不,没有结尾的“K22”,这个数字是没有意义的,你可以说“PIC18”。
以上来自于百度翻译 以下为原文 No, without the "K22" on the end, the number is meaningless. You may as well say just "PIC18". |
|
|
|
|
|
注意:虽然我更喜欢把整个寄存器写在一个指令中:但是,你试图写一个只读状态位。这里:真的不应该影响你正在做的事情,所以我就把它丢掉。
以上来自于百度翻译 以下为原文 Note here: OSCCONbits.IRCF0 = 1; OSCCONbits.IRCF1 = 1; OSCCONbits.IRCF2 = 1; OSCCONbits.SCS0 = 0; OSCCONbits.SCS1 = 1; It's more readable to put OSCCONbits.IRCF = 0b111; OSCCONbits.SCS = 0b10; Although I prefer to write the whole register in one instruction OSCCON = 0b01110010; // IRCF=111, SCS=10 Here: OSCCON2bits.PLLRDY=1; you are trying to write to a read-only status bit. Here: OSCCON2bits.MFIOSEL = 1; Really shouldn't affect what you are doing, so I'd just leave it out. |
|
|
|
|
|
你如何证明时钟设置为64兆赫?你知道指令时钟是FoC/4吗?
以上来自于百度翻译 以下为原文 How do you try to prove that the clock is set to 64MHz? Are you aware that the instruction clock is Fosc/4? |
|
|
|
|
|
嗯……是的…我只是在切换一个输出,但是这解释了为什么我不能超过16兆赫…谢谢!
以上来自于百度翻译 以下为原文 Ahem...yes...I was just toggling an output, but this explains why I can't go beyond the 16 MHz...thanks! |
|
|
|
|
|
这在你之前的帖子中至少被解释过两次,所以显然你不是在阅读有经验的人免费提供的信息,很多人是为了生存而这样做的。
以上来自于百度翻译 以下为原文 This was explained at least twice in your previous thread so apparently you aren't reading the information provided for free by experienced people, many doing this for a living |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1124浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1097浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 07:29 , Processed in 0.879351 second(s), Total 54, Slave 47 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1563