ChipFind - документация

Электронный компонент: DS9096P

Скачать:  PDF   ZIP
1 of 12
022400
PRELIMINARY
DS1904
RTC iButton
www.iButton.com
SPECIAL FEATURES
Real-Time Clock/calendar in binary format
Uses the same binary time/date representation
as the DS1994 but with 1 second resolution
Clock accuracy is better than
2 minutes per
month at 25C
Operating temperature range from -40C to
+70C
Over 10 years of operation
COMMON iButton FEATURES
Unique, factorylasered and tested 64-bit
registration number (8-bit family code + 48-
bit serial number + 8-bit CRC tester) assures
absolute traceability because no two parts are
alike
Multidrop controller for MicroLAN
Digital identification and information by
momentary contact
Chip-based data carrier compactly stores in-
formation
Data can be accessed while affixed to object
Economically communicates to host with a
single digital signal at 16.3k bits per second
Standard 16 mm diameter and 1-Wire proto-
col ensure compatibility with iButton Device
family
Button shape is self-aligning with cup-shaped
probes
Durable stainless steel case engraved with
registration number withstands harsh envi-
ronments
Easily affixed with self-stick adhesive back-
ing, latched by its flange, or locked with a
ring pressed onto its rim
Presence detector acknowledges when reader
first applies voltage
Meets UL#913 (4th Edit.); Intrinsically Safe
Apparatus, Approved under Entity Concept
for use in Class I, Division 1, Group A, B, C
and D Locations (application pending)
F5 MicroCan
000000FBC52B
YYWW REGISTERED RR
40
24
DATA
GROUND
All dimensions are shown in millimeters
ORDERING INFORMATION
DS1904L-F5
F5 MicroCan
EXAMPLES OF ACCESSORIES
DS9096P
Self-Stick Adhesive Pad
DS9101
Multi-Purpose Clip
DS9093RA
Mounting Lock Ring
DS9093A
Snap-In Fob
DS9092
iButton Probe
iButton DESCRIPTION
The DS1904 RTC iButton is a rugged real-time clock module that can be accessed with minimal
hardware. Data is transferred serially via the 1-Wire protocol, which requires only a single data lead and a
ground return. The DS1904 contains a unique 64-bit factory-lasered ROM and a real-time clock/calendar
implemented as a binary counter. The durable MicroCan package is highly resistant to environmental
17.35
16.25
5.89
0.36
0.51
DS1904
2 of 12
hazards such as dirt, moisture, and shock. Accessories permit the DS1904 to be mounted on almost any
surface including printed circuit boards and plastic key fobs. The DS1904 adds functions such as
calendar, time and date stamp, stopwatch, hour meter, interval timer, and logbook to any type of
electronic device or embedded application that uses a microcontroller.
OVERVIEW
The DS1904 has two main data components: 1) 64-bit lasered ROM, and 2) real-time clock counter
(Figure 1). The real-time clock utilizes an on-chip oscillator that is connected to a 32.768 kHz crystal.
The hierarchical structure of the 1-Wire protocol is shown in Figure 2.
The bus master must first provide
one of four ROM function commands: 1) Read ROM, 2) Match ROM, 3) Search ROM, 4) Skip ROM.
The protocol for these ROM functions is described in Figure 7. After a ROM function command is
successfully executed, the real-time clock functions become accessible and the master may then provide
one of the real-time clock function commands. The protocol for these commands is described in Figure 5.
All data is read and written least significant bit first.
BLOCK DIAGRAM Figure 1
1 Hz
DIVIDER
DATA
ROM
CONTROL
FUNCTION
64-BIT
ROM
LASERED
CLOCK
FUNCTION
CONTROL
OSCILLATOR
CONTROL
READ/WRITE BUFFER
RTC COUNTER (32-BIT)
32.768 kHz
OSCILLATOR
LID
CONTACT
LITHIUM
3V
64-BIT LASERED ROM
Each DS1904 contains a unique ROM code that is 64 bits long. The first eight bits are a 1-Wire family
code. The next 48 bits are a unique serial number. The last eight bits are a CRC of the first 56 bits. (See
Figure 3.) The 1-Wire CRC is generated using a polynomial generator consisting of a shift register and
XOR gates as shown in Figure 4. The polynomial is X
8
+ X
5
+ X
4
+ 1. Additional information about the
Dallas Semiconductor 1-Wire Cyclic Redundancy Check is available in the Book of DS19xx iButton
Standards. The shift register bits are initialized to zero. Then starting with the least significant bit of the
family code, one bit at a time is shifted in. After the 8th bit of the family code has been entered, then the
serial number is entered. After the 48th bit of the serial number has been entered, the shift register
contains the CRC value. Shifting in the eight bits of CRC should return the shift register to all zeros. The
64-bit ROM and ROM Function Control section allow the DS1904 to operate as a 1-Wire device and
follow the 1-Wire protocol detailed in the section "1-Wire Bus System".
DS1904
3 of 12
HIERARCHICAL STRUCTURE FOR 1-WIRE PROTOCOL Figure 2
DS1904
Command
Level
Available
Commands
Data Fields
Affected
1-Wire Bus
Other
Devices
Bus
Master
DS1904
Function
(see Figure
Write
Read
RTC Counter, Device
RTC Counter, Device
Read
Match
Search
Skip
64-bit
64-bit
64-bit
N/A
1-Wire ROM
Commands (see Figure
64-BIT LASERED ROM Figure 3
MSB
LSB
8-Bit CRC Code
48-Bit Serial Number
8-Bit Family Code (24h)
MSB
LSB MSB
LSB MSB
LSB
1-WIRE CRC GENERATOR Figure 4
R
X
2
X
1
X
0
X
8
X
7
X
6
X
5
X
4
X
3
8TH
STAGE
7TH
STAGE
6TH
STAGE
5TH
STAGE
4TH
STAGE
3RD
STAGE
2ND
STAGE
1ST
STAGE
S
INPUT DATA
Polynomial = X
8
+ X
5
+ X
4
+ 1
DS1904
4 of 12
TIMEKEEPING
A 32.768 kHz crystal oscillator is used as the time base for the real-time clock counter. The oscillator can
be turned on or off under software control. The oscillator must be on for the real time clock to function.
The real-time clock counter is double buffered. This allows the master to read time without the data
changing while it is being read. To accomplish this, a snapshot of the counter data is transferred to a
read/write buffer, which the user accesses.
DEVICE CONTROL BYTE
The on/off control of the 32.768 kHz crystal oscillator is done through the device control byte. This byte
can be read and written through the Clock Function commands.
Device Control Byte
7
6
5
4
3
2
1
0
U4
U3
U2
U1
OSC OSC
0
0
Bit 0 - 1
0
No function
Bits 0 and 1 are hard-wired to read all 0's.
Bit 2 - 3
OSC Oscillator Enable/Disable
These bits control/report whether the 32.768 kHz crystal oscillator is running. If the oscillator is running,
both OSC bits will read 1. If the oscillator is turned off these bits will all read 0. When writing the device
control byte both occurrences of the OSC bit should have identical data. Otherwise the value in bit ad-
dress 3 (bold) takes precedence.
Bit 4 - 7
Un
General-purpose user flags
These non-volatile bits have no particular function within the chip. They can be read and written under
the control of the application software.
REAL-TIME CLOCK
The real-time clock is a 32-bit binary counter. It is incremented once per second. The real-time clock can
accumulate 136 years of seconds before rolling over. Time/date is represented by the number of seconds
since a reference point, which is determined by the user. For example, 12:00 a.m., January 1, 1970 could
be a reference point.
CLOCK FUNCTION COMMANDS
The "Clock Function Flow Chart" (Figure 5) describes the protocols necessary for accessing the real-time
clock. With only four bytes of real-time clock and one control byte the DS1904 does not provide random
access. Reading and writing always starts with the device control byte followed by the least significant
byte of the time data.
DS1904
5 of 12
CLOCK FUNCTION COMMAND FLOW CHART Figure 5
Master TX Control
Function Command
66H
Read Clock
?
Y
N
Bus Master
TX Reset
?
N
Y
N
Bus Master
TX Reset
?
DS1904 copies
RTC Counter
to R/W Buffer
99H
Write Clock
?
N
Y
Y
N
Bus Master
TX Reset
?
Bus Master TX
LS Byte (7:0)
Bus Master TX
next Byte (15:8)
Bus Master TX
next Byte (23:16)
Bus Master TX
MS Byte (31:24)
Bus Master TX
Device Control Byte
DS1904 copies
R/W Buffer
to RTC Counter
DS1904 TX
Presence Pulse
Bus Master RX
next Byte (15:8)
Bus Master RX
next Byte (23:16)
Bus Master RX
MS Byte (31:24)
Bus Master RX
LS Byte (7:0)
Bus Master RX
Device Control Byte
Y