你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

M48T58Y时钟芯片的编程设计

[复制链接]
qianchenchen123 提问时间:2020-9-21 08:43 /
请大家帮助M48T58时钟存储芯片怎么样设置编程,用C编写,寄存器。下面是截取的技术文档资料,请大家帮忙看下怎么样编写程序设置时钟芯片,可下载PDF文档

Setting the clock
Bit D7 of the Control register (1FF8h) is the WRITE Bit. Setting the WRITE Bit to a '1,' like
the READ Bit, halts updates to the TIMEKEEPER® registers. The user can then load them
with the correct day, date, and time data in 24 hour BCD format (see Table 5). Resetting the
WRITE Bit to a '0' then transfers the values of all time registers (1FF9h-1FFFh) to the actual
TIMEKEEPER counters and allows normal operation to resume. The bits marked as '0' in
Table 5 on page 16 must be written to '0' to allow for normal TIMEKEEPER and RAM
operation. After the WRITE Bit is reset, the next clock update will occur within one second.
See the Application Note AN923 “TIMEKEEPER Rolling Into the 21st Century” for
information on Century Rollover.
Table 5. Register map
Keys:
S = SIGN Bit
FT = FREQUENCY TEST Bit
R = READ Bit
W = WRITE Bit
ST = STOP Bit
0 = Must be set to '0'
BLE = Battery Low Enable Bit
BL = Battery Low Bit (Read only)
CEB = Century Enable Bit
CB = Century Bit
Note: When CEB is set to '1,' CB will toggle from '0' to '1' or from '1' to '0' at the turn of the century
(dependent upon the initial value set).
When CEB is set to '0,' CB will not toggle. The WRITE Bit does not need to be set to write to
CEB.
6.4 Calibrating the Clock
The M48T58/Y is driven by a quartz-controlled oscillator with a nominal frequency of 32,768
Hz. The devices are tested not to exceed 35 ppm (parts per million) oscillator frequency
error at 25°C, which equates to about ±1.53 minutes per month. With the calibration bits
properly set, the accuracy of each M48T58/Y improves to better than +1/–2 ppm at 25°C.
The oscillation rate of any crystal changes with temperature (see Figure 8 on page 18).
Most clock chips compensate for crystal frequency and temperature shift error with
cumbersome “trim” capacitors. The M48T58/Y design, however, employs periodic counter
correction. The calibration circuit adds or subtracts counts from the oscillator divider circuit
at the divide by 256 stage, as shown in Figure 9 on page 18. The number of times pulses
are blanked (subtracted, negative calibration) or split (added, positive calibration) depends
upon the value loaded into the five calibration bits found in the Control Register. Adding
counts speeds the clock up, subtracting counts slows the clock down.
The Calibration Byte occupies the five lower order bits (D4-D0) in the Control Register
1FF8h. These bits can be set to represent any value between 0 and 31 in binary form. Bit
Address
Data
Function/Range
D7 D6 D5 D4 D3 D2 D1 D0
BCD Format
1FFFh 10 Years Year Year 00-99
1FFEh 0 0 0 10 M Month Month 01-12
1FFDh BLE BL 10 Date Date Date 01-31
1FFCh 0 FT CEB CB 0 Day Century/Day 0-1/1-7
1FFBh 0 0 10 Hours Hours Hours 00-23
1FFAh 0 10 Minutes Minutes Minutes 00-59
1FF9h ST 10 Seconds Seconds Seconds 00-59
1FF8h W R S Calibration Control



M48T58,datasheet.pdf

下载

259.58 KB, 下载次数: 3, 下载积分: ST金币 -1

时钟芯片

收藏 评论2 发布时间:2020-9-21 08:43

举报

2个回答
小歆-2051663 回答时间:2020-9-25 09:53:23
M48T58写模式必须是W和E1为低电平,E2为高电平。写操作开始是以W或E1的后一个下降沿或E2的上升沿为参考。写操作是由W或E1的早期上升沿或E2的下降沿终止。在整个周期内,地址必须保持有效。在启动另一个READ或WRITE周期之前,E1或W必须在芯片使能时返回高电平或E2低电平至少tE1HAX或tE2LAX或WRITE使能时返回tWHAX。在WRITE结束之前,数据输入必须有效tDVWH,并在之后的tWHDX保持有效。在WRITE周期期间,G应保持高电平,以避免总线争用;不过,如果输出总线已被E1和G的低电平和E2的高电平激活,W的低电平将在W下降后禁用输出tWLQZ。





qianchenchen123 回答时间:2020-10-8 19:42:27
小歆-2051663 发表于 2020-9-25 09:53
M48T58写模式必须是W和E1为低电平,E2为高电平。写操作开始是以W或E1的后一个下降沿或E2的上升沿为参考。写 ...

谢谢;初始化,初始化需要电源低标志位置1电压检测位置1,

所属标签

相似问题

关于意法半导体
我们是谁
投资者关系
意法半导体可持续发展举措
创新和工艺
招聘信息
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
关注我们
st-img 微信公众号
st-img 手机版