beautypg.com

Rainbow Electronics DS1616 User Manual

Page 10

background image

DS1616

10 of 28

If one data channel is selected, the entire datalog memory is dedicated to that one channel and therefore a
total of 2048 samples can be recorded.

A datalog mission can be initiated via two different methods: by a host instruction over the serial
interface or by a pushbutton input. When the SE bit in the Control 1 register is cleared to a logic 0, the
start function of the

ST

pin is disabled and writing any non-0 value to the Sample Rate register will start a

mission. When the SE bit is set to a logic 1, the pushbutton method of starting a mission is enabled.
Under this mode of operation, the DS1616 will begin a datalog mission when a non-0 value has been
written to the Sample Rate register and the

ST

pin has been held low for at least 0.5 seconds.

The sample rate during a datalog mission is equal to the value written to the Sample Rate register
multiplied by one minute. Writing a 0 to the MIP bit in the Status 1 register completes the mission.

Upon initiation of datalog mission by either method, the DS1616 will do two things:
1. The

INSPEC

and

OUTSPEC

pins will generate four low pulses simultaneously.

2. The Mission-in-Progress (MIP) bit in the Status 1 register is set to a 1.

The time at which the first datalog sample is measured is dependent upon the value in the Start Delay
registers. The two-byte Start Delay register provide a method for the end user to program a delay before
sampling commences. The delay is roughly equal to the value in the Start Delay register times one
minute. For example, if the Start Delay register contain a value of 10, then the device will begin
recording data approximately ten minutes after it received either the pushbutton start signal or start
instruction. The Start Delay register are located at addresses 0012h and 0013h, with register 0012h being
the LSB and register 0013h being the MSB. The Start Delay register decrements every time the Seconds
register rolls over from 59 to 00. When this Start Delay register contains a 00, the first datalog sample
will be taken when the seconds register rolls over from 59 to 00.

The user has two options for dealing with the potential occurrence of a data overrun (i.e., more than 2048
total data samples). The first option is to enable the rollover feature of the DS1616. This is accomplished
by setting the Rollover bit (bit 3 of the Control 1 register) to 1. When the Rollover feature is enabled,
new data is written over previous data, starting with address 1000h. For example, if the Datalog memory
has been completely filled (i.e., 2048 data samples have been recorded) the next data sample will be
written to address location 1000h and the address pointer will be incremented with each successive data
sample.

The second option for dealing with data overrun is to stop recording data after the datalog memory has
been completely used. In other words, the DS1616 will stop recording data values after 2048 data
samples. This feature is enabled by disabling the Rollover feature. (Bit 3 of the Control 1 Register) set to
0.

It should be noted that during a datalog mission, a time stamp for the first sample is recorded, but is not
included for each subsequent sample. However, the time of acquisition for any data sample is easily
determined by considering the start time, the sample rate, the value in the Current Sample Counter, and
the address of the particular data sample in the datalog memory. If no rollover has occurred in the
datalog memory, the sample time associated with any particular data point can be calculated by
multiplying the address of the data by the sample rate and adding that to the stored start time value.
If the rollover feature has been enabled, the user can determine if rollover has occurred by reading the
value in the Current Samples register. This register counts the total number of samples that have been
acquired. If this value is greater than 07FFh (decimal 2047) then the user knows that rollover has