DS28E01-100


DS28E01-100有四个存储区:数据存储器(EEPROM)(共分4页,每页32个字节)、密钥存储器(secret)(8字节)、含有特定功能和用户字节的寄存器页(register page和易失性暂存器(scratchpad)(8字节)

向数据存储器写数据、载入初始密钥或者向寄存器页写数据时,暂存器作为缓存使用。

 

The DS28E01-100 has four memory areas: data memo-
ry, secrets memory, register page with special function
registers and user bytes, and a volatile scratchpad. The
data memory is organized as four pages of 32 bytes.
Secret and scratchpad are 8 bytes each. The scratch-
pad acts as a buffer when writing to the data memory,
loading the initial secret, or when writing to the register
page.

 

数据存储器、密钥存储器和寄存器页位于一个线性地址空间中(暂存器不在这里)。向数据存储器和寄存器页写数据需要知
道密钥。

地址0088h至009Fh也被称为寄存器页,含有特定功能寄存器、用户字节以及工厂字节。一旦编程为AAh 或55h,这
些字节中的大多数将被写保护而不能再更改。编程为任何其它代码既不会对该地址加写保护,也不会激活与该特定
字节相应的特殊功能。地址0090h至0097h内存储的是器件ROM注册码的备份,家族码存放在较低地址,随后是48位序列号和8位CRC校验
码(存放在地址0097h)。从地址0090h至0097h读取数据时,总线主机接收到的注册码每一位的顺序都与使用ROM
功能命令得到的相同。

 

地址寄存器和传输状态

image

三个寄存器:      TA1(目标地址寄存器)       TA2(用于扩展 , 现在未用)       E/S(状态寄存器, 0101,1111=OK)

写入及验证
在向DS28E01-100写数据时,必须把暂存器用作中间存储器。首先,主控制器发Write Scratchpad命令并指定目标地
址,然后将数据写入暂存器。注意,数据必须写入存储器的8 字节边界(因为暂存器只有8字节)内,也就是说,目标地址的三个最低有效位
T2–T0 必须等于000b。

 

 

The DS28E01-100 employs three address registers:
TA1, TA2, and E/S (Figure 7). These registers are com-
mon to many other 1-Wire devices, but operate slightly
differently with the DS28E01-100. Registers TA1 and
TA2 must be loaded with the target address to which
the data is written or from which data is read. Register
E/S is a read-only transfer-status register used to verify
data integrity with write commands. Since the scratch-
pad of the DS28E01-100 is designed to accept data in
blocks of 8 bytes only, the lower 3 bits of TA1 are

forced to 0 and the lower 3 bits of the E/S register (end-
ing offset) always read 1. This indicates that all the data
in the scratchpad is used for a subsequent copying into
main memory or secret. Bit 5 of the E/S register, called
PF or partial byte flag, is a logic 1 if the number of data
bits sent by the master is not an integer multiple of
eight or if the data in the scratchpad is not valid due to
a loss of power. A valid write to the scratchpad clears
the PF bit. Bits 3, 4, and 6 have no function; they always
read 1. The partial flag supports the master checking
the data integrity after a write command. The highest

valued bit of the E/S register, called authorization
accepted (AA), acts as a flag to indicate that the data
stored in the scratchpad has already been copied to
the target memory address. Writing data to the scratch-
pad clears this flag.

DS28E01-100 使用三个地址寄存器:TA1、TA2和E/S(图7)。这些寄存器普遍用于许多其它1-Wire器件,但在
DS28E01-100中的工作略有不同。寄存器TA1和TA2存放的是写入数据或读取数据的目标地址。寄存器E/S 是一个只
读的传输状态寄存器,用于验证写命令的数据完整性。因为DS28E01-100的暂存器只接收8字节的数据块,所以TA1
的低三位总为0,E/S 寄存器的低三位(结束偏移量)总是1。这意味着暂存器中的所有数据随后都要复制到主存储
器或密钥存储器中。E/S寄存器的第5位称为PF 或字节不全标志,该位如果为逻辑1,则意味着主机发送的数据位数
不是8的整数倍,或者暂存器中的数据由于掉电的关系而成为无效数据。有效的写暂存器操作将清除PF 位。第3、
4、6位没有功能;读出时总为1。利用PF标志,主机可以在写命令之后检验数据的完整性。E/S寄存器的最高位称为
AA 或授权许可标记,用以指示暂存器中的数据已复制到目标存储器地址。向暂存器中写入数据将清除该标志。

posted on 2011-06-01 17:17  katago  阅读(4306)  评论(0编辑  收藏  举报