SCA3000 Series
2.5.3 Examples
A simple example of output ring buffer usage:
1. Write "10000000" (C0h) into MODE register (enable output ring buffer, BUF_EN = '1')
2. Acceleration data can be read normally
3. INT-pin is activated when buffer is ½ full, see section 2.7 for detailed INT-pin information.
In the next example, the output Ring Buffer is configured to sample only the Z-axis acceleration
data with 8 bit resolution and reduced data rate (only every second sample is stored into output
ring buffer). In addition, the SCA3000 is configured to give an interrupt when the output ring buffer
is ¾ full:
1. Write "11000000" (C0h) into the MODE register (enable output ring buffer, BUF_EN = '1',
set data length to 8 bits, BUF_8BIT = '1')
2. Write "00000000" (00h) into UNLOCK register
3. Write "01010000" (50h) into UNLOCK register
4. Write "10100000" (A0h) into UNLOCK register
Unlock sequence for register lock
5. Write "00001011" (0Bh) into CTRL_SEL register (to select indirect OUT_CTRL register)
6. Write "00000101" (03h) into CTRL_DATA register (this data is written into OUT_CTRL
register, store Z-axis data, BUF_Z_EN = '1', divide data rate by 2, BUF_RATE = '01')
7. Write "10000001" (81h) into INT_MASK register (set buffer interrupt level to ¾ full,
BUF_F_EN = '1', set INT-pin to active high, INT_ACT = '1')
8. Acceleration data can be read normally for all axis and with full resolution. The buffer data
can be read from BUF_DATA register
9. INT-pin is activated when the output ring buffer is ¾ full of Z-axis acceleration data, see
section 2.7 for detailed INT-pin information.
2.6 Temperature measurement
2.6.1 Usage
Nine bit temperature information is available in the TEMP_MSB and TEMP_LSB registers, if the
feature is enabled in the product (see Table 1). The TEMP_MSB register must be read before the
TEMP_LSB register in order to get valid temperature data. Registers are updated with the latest
temperature data when accessed. See section 3.3 for register details.
The temperature registers’ typical output at +23 °C is 256 counts and a 1 °C change in temperature
typically corresponds to a 1.8 LSB change in the SCA3000 temperature output. Temperature
information is converted to [°C] as follows
Equation 1
Tempdec − 256LSB
Temp
[
°C = 23°C +
]
LSB
1.8
°C
where Temp[°C] is temperature in Celsius and Tempdec is the temperature from TEMP_MSB and
TEMP_LSB registers in decimal format.
2.7 Interrupt function (INT-pin)
2.7.1 Usage
The Motion Detector and Free Fall Detector will generate an interrupt to INT-pin when the
corresponding function is enabled and the interrupt condition is met. The SCA3000's ring buffer will
generate an interrupt when interrupt functionality has been enabled. Setting BUF_F_EN bit in
INT_MASK register "1" results in interrupt when the register is 75% full. Setting BUF_H_EN bit in
INT_MASK register "1" results in interrupt when the register is 50% full.
Setting INT_ALL bit in INT_MASK register will mask all interrupts.
VTI Technologies Oy
www.vti.fi
13/ 43
Rev.A.07
Doc.Nr. 8257300A.07