完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我用MICP79400使用PIC18F46K22使用IIC总线。在RTCC的数据表页15的注释框中写道:“2:为了避免在加载新的时间和日期值时翻转问题,振荡器/时钟输入应该通过清除外部晶体模式的ST位和外部的EXOSC位来消除。锁定输入模式。在等待OSCORUNE位清除后,新的值可以加载,ST或EXOSC位可以重新启用。“我试图精确地做,但是设备不开始工作,所有的计时寄存器似乎都冻结了……但是在第18页上写道:”OSCRUN:振荡器状态位(RTC)。“1”=振荡器=启用,运行0=振荡器已停止或已被禁用“,我试图只停止振荡器(通过清除RTTCSEC寄存器中的ST位),在计时寄存器中更新时间并重新启用标志,结果是器件工作良好。艾克,如果是?显然,在更新时间之前,我设置了RTCC设备,没有ARARM,外部夸克作为振荡器,VBAT禁用等。谢谢任何回放!玛丽莲娜
以上来自于百度翻译 以下为原文 Hi, I'm using MCP79400 with PIC18F46K22 by using IIC bus. On RTCC's datasheet page 15 in the note box is wrote "2: To avoid rollover issues when loading new time and date values, the oscillator/clock input should be disabled by clearing the ST bit for external crystal mode and the EXTOSC bit for external clock input mode. After waiting for the OSCRUN bit to clear, the new values can be loaded and the ST or EXTOSC bit can then be re-enabled." I tried to do exacltly that, but the device don't start working, all registers of timekeeping seems like freezed.... But on page 18, is wrote that: " OSCRUN: Oscillator Status bit (RTCWKDAY register) 1 = Oscillator is enabled and running 0 = Oscillator has stopped or has been disabled " And I tried to stop only the oscillator (by clearing ST bit in RTCSEC register), update time in timekeeping registers and re-enable the flag, the result is that the device works fine. What'is my mistake, if it's? Obviusly, before update the time, I set the RTCC device, no allarm, external quarz as oscillator, vbat disabled, etc.. Thanks for any replay! Marilena |
|
相关推荐
2个回答
|
|
你到底做了什么?它给你两个选择,一个要做,如果你正在使用“外部晶体模式”,另一个,如果你使用“外部时钟输入模式”。你不应该两者兼而有之。
以上来自于百度翻译 以下为原文 What exactly did you do? It gives you two choices, one to do if you are using "external crystal mode", and the other if you are using "external clock input mode". You are not supposed to do both. |
|
|
|
谢谢夸克,从你的回复我看到我的错误…我使用的是外部晶体振荡器,这意味着更新计时寄存器假设我必须停止ST标志,没有别的…EXOSCC仅用于外部时钟…
以上来自于百度翻译 以下为原文 Thanks qub, from your reply i see my mistake....I'm using an external crystal oscillator, this means that the update of timekeeping register suppose that I must stop ST flag, nothing else... The EXTOSC is only for external clock... |
|
|
|
只有小组成员才能发言,加入小组>>
5195 浏览 9 评论
2013 浏览 8 评论
1937 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3185 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2240 浏览 5 评论
748浏览 1评论
635浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
520浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
646浏览 0评论
547浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-2 11:45 , Processed in 1.195442 second(s), Total 80, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号