我希望我的代码接受一个用户定义的时间(通过UART),这将是10分钟的倍数(例如)。40分钟)用于我的PIC18F47J53处理器保持深度睡眠模式。深度睡眠看门狗有固定的时间,应该在CONFIG寄存器中设置,所以不会这样做。手册(4.6.6)表明可以使用RTCC配置警报来实现这一点。查看RTCC警报,我不是cl。注意如何才能做到这一点。手册中没有关于如何使用警报的示例。例如,40分钟的持续时间内,我能否使用“plib”函数RtccSetAl
ARMRpt(RTCC_RPT_TEN_MIN,1);RtccSetAlarmRptCount(4,1)设置RTCC警报;
以上来自于百度翻译
以下为原文
I would like my code to accept a user defined
time (via uart) which will be a multiple of 10 minutes ( e.g . 40 mins) for my PIC18F47J53 processor to remain in deep sleep mode.
The deep sleep watchdog has fixed times which should be set up in the CONFIG register so this will not do.
The manual (4.6.6) indicates one can use the RTCC to configure an alarm to achieve this.
Looking at the RTCC alarm, i am not clear on how one can acheive this. The manual has no examples on how to use the Alarm.
For example for 40 minutes duration, can i setup the RTCC alarm using the 'plib' functions
RtccSetAlarmRpt(RTCC_RPT_TEN_MIN,1);
RtccSetAlarmRptCount(4, 1);