Microchip
直播中

刘溪

7年用户 192经验值
私信 关注
[问答]

如何使用pic18f rtcc警报的任意深度睡眠时间

我希望我的代码接受一个用户定义的时间(通过UART),这将是10分钟的倍数(例如)。40分钟)用于我的PIC18F47J53处理器保持深度睡眠模式。深度睡眠看门狗有固定的时间,应该在CONFIG寄存器中设置,所以不会这样做。手册(4.6.6)表明可以使用RTCC配置警报来实现这一点。查看RTCC警报,我不是cl。注意如何才能做到这一点。手册中没有关于如何使用警报的示例。例如,40分钟的持续时间内,我能否使用“plib”函数RtccSetAlARMRpt(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);

回帖(3)

李泽睿

2019-7-29 08:23:54
嗨,WBSorry,好久不见了。我不知道我有没有回应,因为我没有得到回复通知我原来的帖子。今天我在做“谷歌”搜索的时候被带到了这个页面。我还没有解决这个问题,如果你能给我一些帮助,我将不胜感激。

以上来自于百度翻译


      以下为原文

    Hi WB
Sorry about the long time. I did not know i had a response, since I did not get a reply notification to my original post. I was led to this page today while doing a 'google' search.  I still have not not solved the problem.
I would be very grateful if you can offer me some assistance with this.
举报

张新里

2019-7-29 08:32:56
你好NZKA,我建议读取时钟值,增加40分钟的值,并把结果写入报警寄存器。闹钟40分钟后将唤醒设备。这不符合你的要求吗?

以上来自于百度翻译


      以下为原文

    Hi nzoka,
I suggested reading the clock value, adding 40 minutes to that value, and writing the result to the alarm registers. The alarm will then wake the device 40 minutes later. Does that not satisfy your requirements?
举报

李泽睿

2019-7-29 08:49:13
你好,WBThanks。那应该满足我的要求。

以上来自于百度翻译


      以下为原文

    Hi WB
Thanks. That should satisfy my requirements.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分