beautypg.com

Rainbow Electronics DS1616 User Manual

Page 9

background image

DS1616

9 of 28

allows for immediate data conversion upon a user’s command when the device is not currently
performing a conversion and one or more of the Analog Inputs are enabled (CS[1-3] = 1). This is
accomplished by issuing the Read Data command to the DS1616 over the serial interface.

The most recently recorded data value is written to the Current Data register that corresponds to the
analog channel(s) that is(are) enabled, regardless of whether that value was recorded from a datalog
mission or from the issuance of the Read Data command. The status of the contents of this register is
provided by the Data Ready (DR) bit in the Status 1 register. If DR is a logic 1, the data is valid. If DR is
a logic 0, the data may not be reliable. If a channel is not enabled, CS[1-3] is a logic 0, the contents of
the corresponding Current Data register will be 00000000b and not outputted when a Read Data
command is issued.
During a datalog mission, the DR bit is cleared to a logic 0 when a data conversion has been initiated and
is set to a logic 1 upon the completion of the conversion. Likewise, the DR bit is cleared immediately
after the Read Data command is issued and is set to a logic 1 upon the completion of the conversion.

DATA LOGGING

When the DS1616 datalogging function is enabled, the device is said to be on a “datalog mission” until
the datalogging is stopped.

During a datalog mission, temperature and/or ADC samples are successively written to the Datalog
memory pages. These memory pages are located at addresses 1000h to 17FFh.

The end user can program the DS1616 to record data from all four data channels or just one channel.
Channel selection is determined by the setting the Channel Select bits (CS0, CS1, CS2 and CS3) in the
Control 2 register to the appropriate states. A 1 in the CSx bit will enable the channel and allow the
results to be reported, while a 0 will disable the channel, prevent its data from being recorded, prevent the
data from being reported by the Read Data command, and set the contents of the memory location for the
Current Data register corresponding to that channel to a constant value, all 1s for the thermal sensor or all
0s for the ADC channels.

When 3 or 4 data channels are selected, the first data sample is written to address location 1000h, the
second is written to address location 1001h. The address is incremented with each additional data
sample, with samples alternating between the enabled channels. The second sample is always measured
immediately after the completion of the first measurement with the third and forth samples following the
second. The order of the sampling is the same as the order of the Channel Select registers. CS0 will be
sampled first, if it is enabled, followed by CS1, CS2 and CS3 if they are enabled. Any disabled channels
will be skipped. A total of 2048 registers have been reserved for datalog data, providing a total of 512
samples for each channel.

When three out of the four channels are enabled, a fourth byte of all 0s will be recorded in the Datalog
Memory after the three bytes of data from the enabled channels in order to allow the data to rollover and
remain in the correct positions.

When two data channels are selected, the first data sample is written to address location 1000h and the
second is then written to address location 1001h. The address is incremented with each additional data
sample, with samples alternating between the enabled channels.

The second sample is always measured immediately after the completion of the first measurement. A
total of 2048 registers have been reserved for datalog data, providing a total of 1024 samples each
channel.