IC Phoenix
 
Home ›  DD29 > DS2438AZ-DS2438AZ+-DS2438Z+-DS2438Z+T&R,Smart Battery Monitor
DS2438AZ-DS2438AZ+-DS2438Z+-DS2438Z+T&R Fast Delivery,Good Price
Part Number:
If you need More Quantity or Better Price,Welcom Any inquiry.
We available via phone +865332716050 Email
Partno Mfg Dc Qty AvailableDescript
DS2438AZMAXIMN/a1500avaiSmart Battery Monitor
DS2438AZ+MAXIMN/a1500avaiSmart Battery Monitor
DS2438Z+ |DS2438ZMAXIMN/a21039avaiSmart Battery Monitor
DS2438Z+ |DS2438ZDS/MAXIMN/a2564avaiSmart Battery Monitor
DS2438Z+T&R |DS2438ZT&RMAXIMN/a2500avaiSmart Battery Monitor


DS2438Z+ ,Smart Battery Monitorblock diagram of Figure 1 shows the seven major components of the DS2438: 1. 64-bit lasered ROM 2. ..
DS2438Z+ ,Smart Battery Monitorblock diagram (Figure 1) shows the parasite-powered circuitry. This circuitry “steals” power whenev ..
DS2438Z+T&R ,Smart Battery MonitorApplications for the smart battery monitor include portable computers, cellular telephones, and han ..
DS2450S ,1-Wire Quad A/D ConverterPIN DESCRIPTIONDS2450’s to be identified and operated on aV 4.5 to 5.5 VoltsCCcommon 1-Wire busNC D ..
DS2450S+ ,1-Wire Quad A/D ConverterPIN DESCRIPTION DS2450’s to be identified and operated on a V 4.5 to 5.5V CCcommon 1-Wire bus N ..
DS2460 ,SHA-1 Coprocessor with EEPROMELECTRICAL CHARACTERISTICS (-40°C to +85°C, see Note 1) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNI ..
E53NA50 ,NABSOLUTE MAXIMUM RATINGSSymbol Parameter Value UnitV Drain-source Voltage (V =0) 500 VDS GSV 500 VD ..
EA2-12 ,COMPACT AND LIGHTWEIGHTAPPLICATIONSElectronic switching systems, PBX, key telephone systems, automatic test equipment and ..
EA2-12NU ,COMPACT AND LIGHTWEIGHTFEATURESª Low power consumptionª Compact and light weightª 2 form c contact arrangementª Low magnet ..
EA2-12S ,COMPACT AND LIGHTWEIGHTFEATURESª Low power consumptionª Compact and light weightª 2 form c contact arrangementª Low magnet ..
EA2-12TNU ,COMPACT AND LIGHTWEIGHTAPPLICATIONSElectronic switching systems, PBX, key telephone systems, automatic test equipment and ..
EA2-4.5NU ,COMPACT AND LIGHTWEIGHTAPPLICATIONSElectronic switching systems, PBX, key telephone systems, automatic test equipment and ..


DS2438AZ-DS2438AZ+-DS2438Z+-DS2438Z+T&R
Smart Battery Monitor
AVAILABLE
FEATURES

Unique 1-Wire® interface requires only one
port pin for communication
Provides unique 64-bit serial number
Eliminates thermistors by sensing battery
temperature on-chip
On-board A/D converter allows monitoring
of battery voltage for end-of-charge and end-
of-discharge determination
On-board integrated current accumulator
facilitates fuel gauging
Elapsed time meter in binary format
40-byte nonvolatile user memory available
for storage of battery-specific data
Reverts to low-power sleep mode on battery
pack disconnect (feature disabled on
DS2438AZ)
Operating range -40ºC to +85ºC
Applications include portable computers,
portable/cellular phones, consumer
electronics, and handheld instrumentation
PIN ASSIGNMENT

PIN DESCRIPTION

DQ - Data In/Out
VAD - General A/D input
VSENS+ - Battery current monitor input (+)
VSENS- - Battery current monitor input (-)
VDD - Power Supply (2.4V to 10.0V)
GND - Ground
NC - No connect
DESCRIPTION

The DS2438 Smart Battery Monitor provides several functions that are desirable to carry in a battery
pack: a means of tagging a battery pack with a unique serial number, a direct-to-digital temperature
sensor which eliminates the need for thermistors in the battery pack, an A/D converter which measures
the battery voltage and current, an integrated current accumulator which keeps a running total of all
current going into and out of the battery, an elapsed time meter, and 40 bytes of nonvolatile EEPROM
memory for storage of important parameters such as battery chemistry, battery capacity, charging
methodology and assembly date. Information is sent to/from the DS2438 over a 1-Wire interface, so that
only one wire (and ground) needs to be connected from a central microprocessor to a DS2438. This
means that battery packs need only have three output connectors: battery power, ground, and the 1-Wire
interface.
Because each DS2438 contains a unique silicon serial number, multiple DS2438s can exist on the same
1-Wire bus. This allows multiple battery packs to be charged or used in the system simultaneously.
Applications for the smart battery monitor include portable computers, cellular telephones, and handheld
instrumentation battery packs in which it is critical to monitor real-time battery performance. Used in
conjunction with a microcontroller in the host system, the DS2438 provides a complete smart battery
pack solution that is fully chemistry-independent. The customization for a particular battery chemistry
DS2438
Smart Battery Monitor

GND
VSENS+
VSENS-
VAD
DQ
NC
NC
VDD
DS2438Z, DS2438AZ
8-Pin SOIC (150-mil)
DS2438
ORDERING INFORMATION
PART MARKING PACKAGE INFORMATION

DS2438Z+ DS2438 8-Pin SOIC
DS2438Z+T&R DS2438 DS2438Z+ on Tape-and-Reel
DS2438AZ+ DS2438A 8-Pin SOIC
DS2438AZ+T&R DS2438A DS2438AZ+ on Tape-and-Reel
DS2438Z DS2438 8-Pin SOIC
DS2438Z/T&R DS2438 DS2438Z on Tape-and-Reel
DS2438AZ DS2438A 8-Pin SOIC
DS2438AZ/T&R DS2438A DS2438AZ on Tape-and-Reel
+ Denotes lead-free package.
DETAILED PIN DESCRIPTION
PIN SYMBOL DESCRIPTION

1 GND Ground
2 VSENS+ Battery Input: connection for battery current to be monitored (see text)
3 VSENS- Battery Input: connection for battery current to be monitored (see text)
4 VAD ADC Input: input for general purpose A/D
5 VDD VDD Pin: input supply voltage
6, 7 NC No Connect
8 DQ Data Input/Out: for 1-Wire operation: Open drain
OVERVIEW

The block diagram of Figure 1 shows the seven major components of the DS2438:
1. 64-bit lasered ROM
2. temperature sensor
3. battery voltage A/D
4. battery current A/D
5. current accumulators
6. elapsed time meter
7. 40-byte nonvolatile user-memory
Each DS2438 contains a unique 64-bit lasered ROM serial number so that several battery packs can be
charged/monitored by the same host system. Furthermore, other Dallas products featuring the same
1-Wire bus architecture with a 64-bit ROM can reside on the same bus; refer to the Dallas Automatic
Identification Data book for the specifications of these products.
Communication to the DS2438 is via a 1-Wire port. With the 1-Wire port, the memory and control
functions will not be available until the ROM function protocol has been established. The master must
first provide one of four ROM function commands: 1) Read ROM, 2) Match ROM, 3) Search ROM, or 4)
Skip ROM. These commands operate on the 64-bit lasered ROM portion of each device and can singulate
a specific device if many are present on the 1-Wire line as well as to indicate to the bus master how many
and what types of devices are present. After a ROM function sequence has been successfully executed,
DS2438
Control function commands may be issued which instruct the DS2438 to perform a temperature
measurement or battery voltage A/D conversion. The result of these measurements will be placed in the
DS2438’s memory map, and may be read by issuing a memory function command which reads the
contents of the temperature and voltage registers. Additionally, the charging/discharging battery current is
measured without user intervention, and again, the last completed result is stored in DS2438 memory
space. The DS2438 uses these current measurements to update three current accumulators; the first stores
net charge for fuel gauge calculations, the second accumulates the total charging current over the life of
the battery, and the remaining accumulator tallies battery discharge current. The elapsed time meter data,
which can be used in calculating battery self-discharge or time-related charge termination limits, also
resides in the DS2438 memory map and can be extracted with a memory function command. The
nonvolatile user memory of the DS2438 consists of 40 bytes of EEPROM. These locations may be used
to store any data the user wishes and are written to using a memory function command. All data and
commands are read and written least significant bit first.
PARASITE POWER

The block diagram (Figure 1) shows the parasite-powered circuitry. This circuitry “steals” power
whenever the DQ pin is high. DQ will provide sufficient power as long as the specified timing and
voltage requirements are met (see the section titled “1-Wire Bus System”). The advantage of parasite
power is that the ROM may be read in absence of normal power, i.e., if the battery pack is completely
discharged.
DS2438 BLOCK DIAGRAM Figure 1

DS2438
OPERATION-MEASURING TEMPERATURE

The DS2438 measures temperatures through the use of an on-board temperature measurement technique.
The temperature reading is provided in a 13-bit, two’s complement format, which provides 0.03125C of
resolution. Table 1 describes the exact relationship of output data to measured temperature. The data is
transmitted serially over the 1-Wire interface. The DS2438 can measure temperature over the range of
-55C to +125C in 0.03125C increments. For Fahrenheit usage, a lookup table or conversion factor
must be used.
Note that temperature is represented in the DS2438 in terms of a 0.03125C LSb, yielding the following
13-bit format. The 3 least significant bits of the Temperature Register will always be 0. The remaining
13 bits contain the two’s complement representation of the temperature in C, with the MSb holding the
sign (S) bit. See “Memory Map” section for the Temperature Register address location.
Temperature Register Format Table 1
-1 2-2 2-3 2-4 2-5 0 0 0 LSB
MSb (unit = °C) LSb
S 26 25 24 23 22 21 20 MSB
TEMPERATURE DIGITAL OUTPUT (Binary) DIGITAL OUTPUT (Hex)

+125°C 01111101 00000000 7D00h
+25.0625°C 00011001 00010000 1910h
+0.5°C 00000000 10000000 0080h
0°C 00000000 00000000 0000h
-0.5°C 11111111 10000000 FF80h
-25.0625°C 11100110 11110000 E6F0h
-55°C 11001001 00000000 C900h
OPERATION-MEASURING BATTERY VOLTAGE

The on-board analog-to-digital converter (ADC) has 10 bits of resolution and will perform a conversion
when the DS2438 receives a command protocol (Convert V) instructing it to do so. The result of this
measurement is placed in the 2-byte Voltage Register. The range for the DS2438 ADC is 0 volt to
10 volt; this range is suitable for NiCd or NiMH battery packs up to six cells, and for lithium ion battery
packs of two cells. The full-scale range of the ADC is scaled to 10.23 volt, resulting in a resolution of
10 mV.
While the ADC has a range that extends down to 0 volt, it is important to note that the battery voltage can
also be the supply voltage to the DS2438. As such, the accuracy of the ADC begins to degrade below
battery voltages of 2.4 volt, and the ability to make conversions is limited by the operating voltage range
of the DS2438.
Voltage is expressed in this register in scaled binary format, as outlined in Table 2. Note that while codes
DS2438
VOLTAGE REGISTER FORMAT Table 2
7 26 25 24 23 22 21 20 LSB
MSb (unit = 10 mV) LSb 0 0 0 0 0 29 28 MSB
BATTERY
VOLTAGE
DIGITAL OUTPUT (Binary) DIGITAL OUTPUT (Hex)

0.05V 0000 0000 0000 0101 0005h
2.7V 0000 0001 0000 1110 010Eh
3.6V 0000 0001 0110 1000 0168h
5V 0000 0001 1111 0100 01F4h
7.2V 0000 0010 1101 0000 02D0h
9.99V 0000 0011 1110 0111 03E7h
10V 0000 0011 1110 1000 03E8H
For applications requiring a general purpose voltage A/D converter, the DS2438 can be configured so that
the result of a Convert V command will place the scaled binary representation of the voltage on the VAD
input (as opposed to the VDD input) into the Voltage Register in the same format described in Table 2.
Depending upon the state of the Status/Configuration Register, either (but not both) the VDD or VAD
voltage will be stored in the Voltage Register upon receipt of the Convert V command. Refer to the
description of the Status/Configuration Register in the Memory Map section for details. If the VAD input
is used as the voltage input, the A/D will be accurate for 1.5V < VAD < 2VDD over the range 2.4V < VDD <
5.0V. This feature gives the user the ability to have a voltage A/D that meets spec accuracy for inputs
over the entire range of 1.5V < VAD < 10V for VDD = 5.0V.
OPERATION - MEASURING BATTERY CURRENT

The DS2438 features an A/D converter that effectively measures the current flow into and out of the
battery pack by measuring the voltage across an external sense resistor. It does so in the background at a
rate of 36.41 measurements/sec; thus, no command is required to initiate current flow measurements.
However, the DS2438 will only perform current A/D measurements if the IAD bit is set to “1” in the
Status/Configuration Register. The DS2438 measures current flow in and out of the battery through the
VSENS pins; the voltage from the VSENS+ pin to the VSENS- pin is considered to be the voltage across the
current sense resistor, RSENS. The VSENS+ terminal may be tied directly to the RSENS resistor, however, for
VSENS-, we recommend use of an RC low pass filter between it and the GND end of RSENS (see the block
diagram in Figure 1). Using a 100 k(min) resistor (RF) and a 0.1 F tantalum capacitor (CF), the filter
cutoff is approximately 15.9 Hz. The current A/D measures at a rate of 36.41 times per second, or once
every 27.46 ms. This filter will capture the effect of most current spikes, and will thus allow the current
accumulators to accurately reflect the total charge which has gone into or out of the battery.
The voltage across current sense resistor RSENS is measured by the ADC and the result is placed in the
Current Register in two’s complement format. The sign (S) of the result, indicating charge or discharge,
resides in the most significant bit of the Current Register, as shown in Table 3. See “Memory Map” in
Figure 7 for the Current Register address location.
DS2438
CURRENT REGISTER FORMAT Table 3

(This register actually stores the voltage measured across current sense resistor RSENS.
This value can be used to calculate battery pack current using the equation below.) 7 26 25 24 23 22 21 20 LSB
MSb (unit = 0.2441mV) LSb S S S S S 29 28 MSB
The battery pack current is calculated from the Current Register value using the equation:
I = Current Register / (4096 * RSENS) (where RSENS is in )
For example, if 1.25A is flowing into the pack, and the pack uses a 0.025 sense resistor, the DS2438
will write the value 12810 to the Current Register. From this value, battery pack current can be calculated
to be: I = 128 / ( 4096 * 0.025) = 1.25A
Because small current ADC offset errors can have a large cumulative effect when current is integrated
over time, the DS2438 provides a method for canceling offset errors in the current ADC. After each
current measurement is completed, the measured value is added to the contents of the Offset Register and
the result is then stored in the Current Register. The Offset Register is a two-byte nonvolatile read/write
register formatted in two’s-complement format. The four MSb’s of the register contain the sign of the
offset, as shown in Table 4.
OFFSET REGISTER FORMAT Table 4
4 23 22 21 20 0 0 0 LSB
MSb (unit = 0.2441 mV) LSb
X X X S 28 27 26 25 MSB
The following process can be used to calibrate the current ADC:
1. Write all zeroes to the Offset Register
2. Force zero current through RSENS
3. Read the Current Register value
4. Disable the current ADC by setting the IAD bit in the Status/Configuration Register to “0”
5. Change the sign of the previously-read Current Register value by performing the two’s complement
and write the result to the Offset Register
6. Enable the current ADC by setting the IAD bit in the Status/Configuration Register to “1”
NOTE:

When writing to the Offset Register, current measurement MUST be disabled (IAD bit set to “0”).
The current ADC calibration process is done for each DS2438 device prior to shipment. However, for
DS2438
OPERATION - CURRENT ACCUMULATORS

The DS2438 tracks the remaining capacity of a battery using the Integrated Current Accumulator (ICA).
The ICA maintains a net accumulated total of current flowing into and out of the battery; therefore, the
value stored in this register is an indication of the remaining capacity in a battery and may be used in
performing fuel gauge functions. In addition, the DS2438 has another register that accumulates only
charging (positive) current (CCA) and one that accumulates only discharging (negative) current (DCA).
The CCA and DCA give the host system the information needed to determine the end of life of a
rechargeable battery, based on total charge/discharge current over its lifetime.
The current measurement described above yields the voltage across sense resistor RSENS measured every
27.46 ms. This value is then used to increment or decrement the ICA register, increment the CCA (if
current is positive), or increment the DCA (if current is negative). The ICA is a scaled 8-bit volatile
binary counter that integrates the voltage across RSENS over time. The ICA is only
incremented/decremented if the IAD bit is set to 1 in the Status/Configuration Register. Table 5 illustrates
the contents of the ICA. See Memory Map section for the address location of the ICA.
ICA REGISTER FORMAT Table 5

(This register accumulates the voltage measured across current sense resistor RSENS. This
value can be used to calculate remaining battery capacity using the equation below.) 7 26 25 24 23 22 21 20
MSb (unit = 0.4882 mVhr) LSb
Remaining battery capacity is calculated from the ICA value using the equation:
Remaining Capacity = ICA / (2048 * RSENS) (where RSENS is in )
For example, if a battery pack has 0.625 Ahr of remaining capacity, and the pack uses a 0.025 sense
resistor, the ICA will contain the value 32. From this value, remaining capacity can be calculated to be: Remaining Capacity = 32 / ( 2048 * 0.025) = 0.625 Ahr
Since the accuracy of the current ADC is +2 LSb, measurements of very small currents can be inaccurate
by a high percentage. Because these inaccuracies can turn into large ICA errors when accumulated over a
long period of time, the DS2438 provides a method for filtering out potentially erroneous small signals so
that they are not accumulated. The DS2438’s Threshold Register specifies a current measurement
magnitude (after offset cancellation) above which the measurement is accumulated in the ICA, CCA and
DCA and below which it is not accumulated. The format of the Threshold Register is shown in Table 6.
The power-on default Threshold Register value is 00h (no threshold).
NOTE:

When writing to the Threshold Register, current measurement must be disabled (IAD bit set to “0”).
DS2438
THRESHOLD REGISTER FORMAT Table 6

TH2 TH1 0 0 0 0 0 0
MSb LSb
TH2 TH1 THRESHOLD

0 0 None (default)
0 1 ±2 LSB
1 0 ±4 LSB
1 1 ±8 LSB
The Charging Current Accumulator (CCA) is a two-byte nonvolatile read/write counter which represents
the total charging current the battery has encountered in its lifetime. It is only updated when current
through RSENS, is positive; i.e., when the battery is being charged. Similarly, the Discharge Current
Accumulator (DCA) is a two-byte nonvolatile counter which represents the total discharging current the
battery has encountered over its lifetime.
The CCA and DCA can be configured to function in any of three modes: disabled, enabled with shadow-
to-EEPROM, and enabled without shadow-to-EEPROM. When the CCA and DCA are disabled (by
setting either the IAD bit or the CA bit in the Status/Configuration Register to “0”), the memory in page
07h is free for general purpose data storage. When the CCA and DCA are enabled (by setting both IAD
and CA to “1”), page 07h is reserved for these registers, and none of the bytes in page 07h should be
written to via the 1-Wire bus. When the CCA and DCA are enabled, their values are automatically
shadowed to EEPROM memory by setting the EE bit in the Status/Configuration Register to “1”. When
these registers are configured to shadow to EEPROM, the information will accumulate over the lifetime
of the battery pack and will not be lost when the battery becomes discharged. Shadow-to-EEPROM is
disabled when the EE bit is “0”. Table 7 illustrates the format of the CCA and DCA registers. Table 8
summarizes the modes of operation for ICA, CCA and DCA.
CCA/DCA REGISTER FORMAT Table 7
7 26 25 24 23 22 21 20 LSB
MSb (unit = 15.625 mVHr) LSb 15 214 213 212 211 210 29 28 MSB
ICA/CCA/DCA MODES OF OPERATION Table 8
IAD Bit CA Bit EE Bit ICA CCA/DCA CCA/DCA Copy-
to-EEPROM

0 X X Inactive Inactive Inactive
1 0 X Active Inactive Inactive
1 1 0 Active Active Inactive
1 1 1 Active Active Active
DS2438
Figure 2 illustrates the activity of the ICA, CCA, and DCA over a sample charge/discharge cycle of a
battery pack, assuming the DS2438 is configured for the ICA to function and the CCA/DCA to function
and shadow data to EEPROM. To simplify the illustration of the accumulators, they are treated as analog
values, although they are digital counters in the DS2438. Note that when the battery becomes fully
discharged, i.e., the ICA value reaches 0, the CCA and DCA register values are maintained.
CURRENT ACCUMULATOR ACTIVITY Figure 2

SENSE RESISTOR SELECTION

The selection of RSENS involves a tradeoff. On the one hand, the impedance of RSENS must be minimized
to avoid excessive voltage drop during peak current demands. On the other hand, the impedance of RSENS
should be maximized to achieve the finest resolution for current measurement and accumulation. Table 9
below lists several example RSENS values, the LSb of the current calculation ( 1/(4096 * RSENS) ) and the
LSb of the remaining capacity calculation ( 1/(2048 * RSENS) ). The user should carefully consider
voltage drop at maximum current and required current measurement/accumulation resolution when
selecting RSENS.
SENSE RESISTOR TRADEOFFS Table 9
SENSE RESISTOR
VALUE (RSENS)
CURRENT lsb
REMAINING
CAPACITY lsb
MAX REMAINING
CAPACITY VALUE

25 m 9.76 mA 19.53 mAHr 5000 mAhr
50 m 4.88 mA 9.76 mAHr 2500 mAhr
100 m 2.44 mA 4.88 mAHr 1250 mAhr
200 m 1.22 mA 2.44 mAHr 625 mAhr
OPERATION - ELAPSED TIME METER

An internal oscillator is used as the timebase for the timekeeping functions. The elapsed time functions
are double buffered, allowing the master to read elapsed time without the data changing while it is being
read. To accomplish this, a snapshot of the counter data is transferred to holding registers which the user
accesses. This occurs after the 8th bit of the Recall Memory command.
The elapsed time meter (ETM) is a 4-byte binary counter with 1-second resolution. The ETM can
accumulate 136 years of seconds before rolling over. Time/date is represented by the number of seconds
DS2438
Two other time-related functions are available. The first is the Disconnect Timestamp, which is written to
by the DS2438 whenever it senses that the DQ line has been low for approximately 2 seconds. This
condition would signal that the battery pack has been removed from the system; the time when that
occurs is written into the Disconnect Timestamp register, so that upon replacement into the system, the
system can determine how long the device has been in storage, to facilitate self-discharge corrections to
the remaining battery capacity. After the disconnect has been detected, the DS2438 reverts to a sleep
mode, during which nothing is active except the real time clock. Some applications may prefer that the
data converters and current accumulators continue operation following a pack disconnect. Thus, a
version of the DS2438 (part number DS2438A) is offered for those applications. Other than not reverting
to a low-power sleep mode following disconnect, there are no specification differences between the
DS2438 and the DS2438A.
The other timestamp is the End-of-Charge timestamp, which is written to by the DS2438 whenever it
senses that charging is finished (when current changes direction). This timestamp allows the user to
calculate the amount of time the battery has been in a discharge or storage state, again to facilitate self-
discharge calculations.
The format of the ETM, Disconnect, and End-of-Charge registers are as shown in Table 10. Refer to the
“Memory Map” section for the address location of the time-related registers.
TIME REGISTER FORMAT Table 10
7 26 25 24 23 22 21 20 LSB
MSb (unit = 1s) LSb 15 214 213 212 211 210 29 28
MSb (unit = 1s) LSb 23 222 221 220 219 218 217 216
MSb (unit = 1s) LSb 31 230 229 228 227 226 225 224 MSB
64-BIT LASERED ROM

Each DS2438 contains a unique ROM code that is 64 bits long. The first 8 bits are a 1-Wire family code
(DS2438 code is 26h). The next 48 bits are a unique serial number. The last 8 bits are a CRC of the first
56 bits. (See Figure 3.) The 64-bit ROM and ROM Function Control section allow the DS2438 to operate
as a 1-Wire device and follow the 1-Wire protocol detailed in the section “1-Wire Bus System.” The
functions required to control sections of the DS2438 are not accessible until the ROM function protocol
has been satisfied. This protocol is described in the ROM function protocol flow chart (Figure 5). The
1-Wire bus master must first provide one of four ROM function commands: 1) Read ROM, 2) Match
ROM, 3) Search ROM, or 4) Skip ROM. After a ROM function sequence has been successfully executed,
the functions specific to the DS2438 are accessible and the bus master may then provide any one of the
six memory and control function commands.
DS2438
64-BIT LASERED ROM FORMAT Figure 3

8-BIT CRC CODE 48-BIT SERIAL NUMBER 8-BIT FAMILY CODE (26h)
MSb LSb MSb LSb MSb LSb
CRC Generation

The DS2438 has an 8-bit CRC stored in the most significant byte of the 64-bit ROM. The bus master can
compute a CRC value from the first 56 bits of the 64-bit ROM and compare it to the value stored within
the DS2438 to determine if the ROM data has been received error-free by the bus master. The equivalent
polynomial function of this CRC is:
CRC = X8 + X5 + X4 +1
The DS2438 also generates an 8-bit CRC value using the same polynomial function shown above and
provides this value to the bus master to validate the transfer of data bytes. In each case where a CRC is
used for data transfer validation, the bus master must calculate a CRC value using the polynomial
function given above and compare the calculated value to either the 8-bit CRC value stored in the 64-bit
ROM portion of the DS2438 (for ROM reads) or the 8-bit CRC value computed within the DS2438
(which is read as a 9th byte when a scratchpad is read). The comparison of CRC values and decision to
continue with an operation are determined entirely by the bus master. There is no circuitry inside the
DS2438 that prevents a command sequence from proceeding if the CRC stored in or calculated by the
DS2438 does not match the value generated by the bus master. Proper use of the CRC as outlined in the
flowchart of Figure 6 can result in a communication channel with a very high level of integrity.
The 1-Wire CRC can be generated using a polynomial generator consisting of a shift register and XOR
gates as shown in Figure 4. Additional information about the Dallas 1-Wire Cyclic Redundancy Check is
available in Application Note 27 entitled “Understanding and Using Cyclic Redundancy Checks with
Dallas Semiconductor Touch Memory Products.”
The shift register bits are initialized to 0. Then starting with the least significant bit of the family code,
1 bit at a time is shifted in. After the 8th bit of the family code has been entered, the serial number is
entered. After the 48th bit of the serial number has been entered, the shift register contains the CRC
value.
1-WIRE CRC CODE Figure 4
DS2438
ROM FUNCTIONS FLOWCHART Figure 5

DS2438
MEMORY/CONTROL FUNCTIONS FLOWCHART Figure 6

YESNO

DS2438
MEMORY/CONTROL FUNCTIONS FLOWCHART Figure 6 (continued)
MEMORY MAP
The DS2438’s memory is organized as shown in Figure 7. The memory consists of a scratchpad RAM
and storage SRAM/EEPROM. The scratchpad helps insure data integrity when communicating over the
1-Wire bus. Data is first written to the scratchpad where it can be read back. After the data has been
verified, a copy scratchpad command will transfer the data to the appropriate page in memory (pages 0-2
are primarily volatile SRAM, pages 3-7 are EEPROM). This process insures data integrity when
modifying the memory.
The DS2438’s memory is organized as 64 bytes of memory, in eight 8-byte pages. Each page has its own
scratchpad space, organized as 8 bytes of memory. When reading a scratchpad, there is a 9th byte which
may be read with a Read Scratchpad command. This byte contains a cyclic redundancy check (CRC)
byte, which is the CRC over all of the 8 bytes in the currently selected scratchpad. This CRC is
implemented in the fashion described in the section titled “CRC Generation.”
DS2438
Page 0 (00h)

The first page contains the most frequently accessed information of the DS2438, and most locations are
volatile read-only bytes with the exception of the Status/Configuration Register (Byte 0) and the
Threshold Register (Byte 7). The Status/Configuration Register is a nonvolatile read/write byte which
defines which features of the DS2438 are enabled and how they will function. The register is formatted as
follows:
X ADB NVB TB AD EE CA IAD
MSb LSb
IAD =
Current A/D Control Bit. “1” = the current A/D and the ICA are enabled, and current
measurements will be taken at the rate of 36.41 Hz; “0” = the current A/D and the ICA have been
disabled. The default value of this bit is a “1” (current A/D and ICA are enabled).
CA = Current Accumulator Configuration. “1” = CCA/DCA is enabled, and data will be stored and can

be retrieved from page 7, bytes 4-7; “0” = CCA/DCA is disabled, and page 7 can be used for general
EEPROM storage. The default value of this bit is a “1” (current CCA/DCA are enabled).
EE = Current Accumulator Shadow Selector bit. “1”
= CCA/DCA counter data will be shadowed to
EEPROM each time the respective register is incremented; “0”= CCA/DCA counter data will not be
shadowed to EEPROM. The CCA/DCA could be lost as the battery pack becomes discharged. If the CA
bit in the status/configuration register is set to “0”, the EE bit will have no effect on the DS2438
functionality. The default value of this bit is a “1” (current CCA/DCA data shadowed to EEPROM).
AD =
Voltage A/D Input Select Bit. “1” = the battery input (VDD) is selected as the input for the
DS2438 voltage A/D converter; “0” = the general purpose A/D input (VAD) is selected as the voltage
A/D input. For either setting, a Convert V command will initialize a voltage A/D conversion. The default
value of this bit is a “1” (VDD is the input to the A/D converter).
TB = Temperature Busy Flag. “1” = temperature conversion in progress; “0” = temperature conversion

complete.
NVB =
Nonvolatile Memory Busy Flag. “1” = Copy from Scratchpad to EEPROM in progress; “0” =
Nonvolatile memory not busy. A copy to EEPROM may take from 2 ms to 10 ms (taking longer at lower
supply voltages).
ADB = A/D Converter Busy Flag. “1” = A/D conversion in progress on battery voltage; “0” = conversion

complete, or no measurement being made. An A/D conversion takes approximately 10 ms.
X = Don’t care

Bytes 1 and 2 of page 0 contain the last completed temperature conversion in the format described in the
“Operation - Measuring Temperature” section. Bytes 3-4 contain the last completed voltage A/D
conversion result and bytes 5-6 contain the instantaneous current data. Byte 7 contains the Threshold
Register. Refer to the appropriate section for the data format of these locations.
ic,good price


TEL:86-533-2716050      FAX:86-533-2716790
   

©2020 IC PHOENIX CO.,LIMITED