完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我的名字叫阿德里安,我是一名工科学生,还是MPLAB X.的新手,我在RCREG中用刺激的注册表注入特性注入了一些麻烦:出现了“同步刺激成功应用”的消息,但是根据看门狗RCREG的价值。不要改变。我使用MPLAB X IDE 3.65。选择的HW工具是模拟器,编译器是XC8(1.42),设备是PIC16F1579。我用MCC生成配置位。我希望在主程序中有一个空循环,用中断来唤醒程序并处理数据(低功耗应用)。当EUSAT接收到一个字节时,程序处理它并返回到睡眠。我认为调整中断管理器并使用中断来注入数据将是非常简单的,但是我一定是做错了……哦,我在模拟器窗口中看到:“W1601-PPS:S。用于PPS PIN RX的USPECT数据库条目。联系我的微芯片。“我用代码附上了文件,还有一些图片。我基本上只是把中断管理器移到了主叫来调用我需要调用的函数(这不是在这个试验项目中)。
以上来自于百度翻译 以下为原文 Hello, My name is Adrien, I am an engineering student and still a newbie with MPLAB X. I have some trouble injecting values in RCREG with the Register Injection feature of Stimulus: the message "Synchronous stimulus applied successfully" appears, but according to the watchdog the value of RCREG doesn't change. I am using MPLAB X IDE 3.65. The HW tool selected is the Simulator, the compiler is XC8 (1.42), the device is the PIC16F1579. I used the MCC to generate the configuration bits. I want to have an empty loop in the main, with interrupts to wake up the program and process the data (low power application). When the EUSART receives a byte, the program processes it and goes back to sleep. I thought it would be pretty straightforward to adapt the Interrupt Manager and use interrupts to inject the data, but I must have been doing something wrong... Oh, and I have that in the Simulator window: "W1601-PPS: Suspect database entry for PPS pin RX. Contact Microchip." I have attached the files with the code, with some pictures. I basically just moved the Interrupt Manager to the main to call the functions I need to call (which are not in this trial project). test.txt wait 5 ms 49 Attached Image(s) Attachment(s) test.X.zip (23.61 KB) - downloaded 61 times |
|
相关推荐
4个回答
|
|
我可以确认模拟器的UART确实看到了注入的值。但由于某种原因,它不能传递给RCREG寄存器。你不知道这个代码是否在真正的硬件上工作,是吗?我想知道是否还有其他步骤需要执行,以打开UART或一些这样的。(不幸的是,模拟器团队的UART专家已经离开了几个星期。)悲伤:
以上来自于百度翻译 以下为原文 I can confirm that the simulator's UART does indeed see the injected value. But for some reason it doesn't pass it on to RCREG register. You don't happen to know if this code works on real hardware do you? I'm wondering if there is some other step that needs to be performed to turn the UART on or some such. (Unfortunately the simulator team's UART expert is out of office for a couple of weeks. sad: |
|
|
|
你好,谢谢你的回答。我今天在PIC16LF1459上测试了它,它在硬件上工作得很好,但是在模拟器里没有。所以我想我只是直接移动到硬件上。我用CoolTerm(和PyStin从TXT文件发送)发送8位消息(比如“049”)。我会附上代码(它几乎相同),但是我总是从站点中得到“拒绝访问”。
以上来自于百度翻译 以下为原文 Hello, thank you for the answer. I tested it today on a PIC16LF1459 and it worked fine on hardware, but not in the simulator... So I guess I'm just moving to the hardware directly. I used CoolTerm (and pyserial to send from txt file) to send 8-bit messages (like "049"). I would have attached the code (it is pretty much identical), but I keep getting "Access denied" from the site. |
|
|
|
嗨,有一个bug:由MCC生成的EuStudioRead(空虚)函数,并在消息{1中张贴:在….xRead函数中,有:RcStest.SRN=1;即使在缓冲区中存在字节,也导致第二次读取操作。这与中断接收代码是不合适的。迈西尔
以上来自于百度翻译 以下为原文 Hi, There is Bug in the: EUSART_Read(void) function, generated by MCC and posted in message #1. In the ..._Read function, there is: RCSTAbits.SREN = 1; causing a second Read operation, even when there is a byte in the buffer already. This is not suitable together with Interrupt receive code. Mysil |
|
|
|
真的,谢谢!我似乎没有解决这个问题,但RCREG仍然保持在0SAD:
以上来自于百度翻译 以下为原文 Indeed, thank you ! I does not appear to solve the problem though, RCREG still remains at 0 sad: |
|
|
|
只有小组成员才能发言,加入小组>>
5250 浏览 9 评论
2037 浏览 8 评论
1958 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3218 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2266 浏览 5 评论
788浏览 1评论
680浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
609浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
685浏览 0评论
582浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-29 03:11 , Processed in 1.274825 second(s), Total 81, Slave 65 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号