完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
叹息:…这是“那些”日子之一。所以,对于我来说,我不能(大部分)得到这个部分的中断寄存器来接受写。在模拟器或硬件中写入它们没有任何效果。我确信这只是一个配置问题,但我对我到底做的不对。(虽然我有一种感觉,它就像一个不明显的注册表,在任何地方都没有)。文档中唯一可以看到中断寄存器变得不可写的东西是数据表(版本DS4001844 B)第168页的第14.6和第14.7节;YS。当IPEN=0时,必须设置PEI/GIL位以使这些外围中断中的任何一个中断。…而且。“使用优先级位需要设置中断优先级使能(IPEN)位。”分别指示失败的迹象是明确的,当然,但它并没有明确地说您不能编写这些寄存器。在这两种情况下,我都翻过了那些比特,尝试次数超过了我能计算的数量,显然它什么也没有改变。附件是一个显示问题的文件,但它确实是如我所说的。这个文件只是基本的MPLABX生成的ASM模板、+处理器定义和CONFIG+最小中断配置代码。注意方括号,这是我对具体步骤的评论,以及我为实现这一目标所做的努力。
以上来自于百度翻译 以下为原文 :sigh: . . . it's one of "those" days . . . So, I can't, for the life of me, get (most of) the interrupt registers for this part to accept writes. Writes to them have no effect, either in the simulator or the hardware. I'm sure this is just a config issue, but I'm at a loss as to what exactly I'm not doing right. (Though I have a feeling it's something like a non obvious register off in the middle of nowhere.) The only thing in the documentation that I can see that indicates interrupt registers can become unwritable is the sections 14.6 and 14.7 on page 168 of the datasheet (Version DS40001844B ); where it says. . . "When IPEN = 0, the PEIE/GIEL bit must be set to enable any of these peripheral interrupts." . . . and . . . "Using the priority bits requires that the Interrupt Priority Enable (IPEN) bit be set." respectively. Indications of failure are clear, sure, but it doesn't specifically say you can't write these registers. In either case, I have flipped those bits and tried it more times than I can count and it apparently changes nothing. Attached is a file that exhibits the problem, but it's really just as I said. This file is just the basic MPLABX generated ASM template, + processor definition and config + minimal Interrupt config code. Watch out for square brackets, they are my comments about that specific step and what I did to fulfill it. Attachment(s) The_correct_file_this_time.asm (11.34 KB) - downloaded 37 times |
|
相关推荐
4个回答
|
|
查看你所发布的文件,没有代码试图读取或写入中断寄存器,并且在方括号中没有注释。在所有的第一个帖子中,你从来没有提到过一个特定的寄存器或你不能写入的位。
以上来自于百度翻译 以下为原文 Looking at the file you posted, there is no code attempting to read or write interrupt registers, and there are no comments in square brackets. In all that first post, you never once mention a specific register or bit you can't write. |
|
|
|
如果你指的是PIX和PILX寄存器,你注意到它们不是在访问银行吗?
以上来自于百度翻译 以下为原文 If you are referring to the PIEx and PIRx registers, have you noticed that they are not in the Access Bank? |
|
|
|
“查看您所发布的文件,没有代码试图读取或写入中断寄存器,并且在方括号中没有注释。”对不起,这是一个文件选择GOF(同名文件,不同路径)。它已经被纠正了。“在所有的第一篇文章中,你从来没有提到过一个特定的寄存器或者一个你不能写的比特。”我不想通过冗余地发布信息来弄乱表单的信噪比。这些信息(应该是)在代码中,我没有看到重复它的好处。“如果你指的是PIX和PiRX寄存器,你注意到它们不是在访问银行吗?”文学士!忘了这些垃圾。出于某种原因,我觉得我不必在PIC18上处理这个废话。这几乎就是问题所在,谢谢。+ 1
以上来自于百度翻译 以下为原文 "Looking at the file you posted, there is no code attempting to read or write interrupt registers, and there are no comments in square brackets." Sorry, that was a file selection goof (file with same name, different path). It's been corrected now. "In all that first post, you never once mention a specific register or bit you can't write." I didn't want to mess with the signal-to-noise ratio of the forms by posting information redundantly. That info was (supposed to be) in the code, I didn't see the benefit of repeating it. "If you are referring to the PIEx and PIRx registers, have you noticed that they are not in the Access Bank?" Ba! forgot about this garbage. For some reason I though I didn't have to deal with this crap on PIC18's. That's almost certainly what the problem is, thanks. +1 |
|
|
|
是的,许多SFR位于银行14和15的银行记忆中。
以上来自于百度翻译 以下为原文 Yeah, many SFRs are located in banked memory of banks 14 and 15. |
|
|
|
只有小组成员才能发言,加入小组>>
5171 浏览 9 评论
2001 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3176 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
737浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
635浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 02:02 , Processed in 1.472587 second(s), Total 84, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号