dallas semiconductor DS1904 service manual

查询DS1904供应商
www.iButton.com
SPECIAL FEATURES
Real-Time Clock/calendar in binary formatUses the same binary time/date representation
Clock accuracy is better than ± 2 minutes per
month at 25°C
Operating temperature range from -40°C to
+70°C
Over 10 years of operation
PRELIMINARY
DS1904
RTC iButton
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
5.89
COMMON iButton FEATURES
Unique, factory–lasered 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 MicroLANDigital identification and information by
momentary contact
Chip-based data carrier compactly stores in-
formation
Data can be accessed while affixed to objectEconomically 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
0.36 0.51
16.25
YYWW REGISTERED RR
40 24
000000FBC52B
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
17.35
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
1 of 12 022400
DS1904
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 cr ystal. 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
LID
CONTACT
3V
LITHIUM
DATA
ROM
FUNCTION
CONTROL
CLOCK
FUNCTION
CONTROL
OSCILLATOR
CONTROL
READ/WRITE BUFFER
RTC COUNTER (32-BIT)
32.768 kHz
OSCILLATOR
64-BIT
LASERED
ROM
1 Hz
DIVIDER
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 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".
8
+ X5 + X4 + 1. Additional information about the
2 of 12
HIERARCHICAL STRUCTURE FOR 1-WIRE PROTOCOL Figure 2
A
A
(
,
,
p
A
(
DS1904
Bus
Master
Command Level
1-Wire ROM
Commands
DS1904
Function
see Figure
see Figure
1-Wire Bus
DS1904
vailable
Commands
Read Match Search Ski
Write Read
Other Devices
Data Fields
ffected
64-bit 64-bit 64-bit N/
RTC Counter RTC Counter
Device Device
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
Polynomial = X8 + X5 + X4 + 1
0
X
1ST
STAGE
STAGE
1
X
2ND
2
X
3RD
STAGE
3
X
4TH
STAGE
4
X
5TH
STAGE
5
X
R
6TH
STAGE
S
7TH
STAGE
6
X
INPUT DATA
7
X
8TH
STAGE
8
X
3 of 12
DS1904
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
76543210
U4 U3 U2 U1
OSC
OSC 0 0
Bit 0 - 1
Bits 0 and 1 are hard-wired to read all 0’s.
Bit 2 - 3
These bits control/report whether the 32.768 kHz crystal oscillator is running. If the os cillator 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
These non-volatile bits have no particular function within the chip. They can be read and written und er the control of the application software.
0 No function
OSC Oscillator Enable/Disable
Un General-purpose user flags
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.
4 of 12
Loading...
+ 8 hidden pages