完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
该数据表表示,“RCXIF中断标志位是只读的,它不能被软件设置或清除”。我可以假设,虽然没有明确说明,通过清除SPEN重置EUSAT,然后断言SPEN确实会清除中断标志和RCXRG??
以上来自于百度翻译 以下为原文 The datsheet states, "The RCxIF interrupt flag bit is read-only, it cannot be set or cleared by software". Can I assume that although not explicitly stated, that resetting the eusart by clearing the SPEN and then asserting SPEN would indeed clear the interrupt flag and RCxREG ?? |
|
相关推荐
2个回答
|
|
好啊!我已经调整了生成的MCC代码,包括一个阅读,但我不知道我可以做你所做的。基本上我可以修剪进一步做你所做的,我希望。谢谢你的答复。
以上来自于百度翻译 以下为原文 OK! I have adjusted the MCC code that is generated to include a read but I didn't know I could just do what you've done. ... eusart2RxReadByte = RC2REG; eusart2RxReadByte = 0; RC2STAbits.SPEN = 0; // reset EUSART RC2STAbits.SPEN = 1; // assuming a reset eusart will not have RC2IF asserted ... ... Basically I can trim further to do what you've done I hope. Thanks for your reply. |
|
|
|
我们需要知道你使用的是哪一个PIC,但是我猜第一行就足够了,接下来的3个就是为了保证事情被搞乱。例如,你禁用并启用UART——如果它在接收下一个字符的中间会怎么样?它会放弃它接收到的任何东西,开始在一个字符的中间接收,当信号停止时,可能会产生一个帧错误。苏珊
以上来自于百度翻译 以下为原文 We need to know which PIC you are using but my guess is that the first line would be enough and the next 3 are simply there to guarantee things get messed up. For example, you disable and then enable the UART - what if it was in the middle of receiving the next character? It would drop whatever it had received, start receiving in the middle of a character and might generate a framing error when the signal stops. Susan |
|
|
|
只有小组成员才能发言,加入小组>>
5138 浏览 9 评论
1987 浏览 8 评论
1917 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3158 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2215 浏览 5 评论
706浏览 1评论
597浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
480浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
609浏览 0评论
505浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-7 18:30 , Processed in 1.341488 second(s), Total 81, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号