3–344
Motorola Sensor Device Data
For More Information On This Product,
Go to: www.freescale.com
*WE NEED A SUBROUTINE TO WRITE TO AND READ FROM THE SPI
*TO CALL THIS ROUTINE LOAD ACCUMULATOR A WITH THE COMMAND DATA
*AND JSR WRITSPI. WHEN THE ROUTINE RETURNS, ACCUMULATOR A
*CONTAINS THE DATA RETURNED FROM THE SENSOR
WRITSPI LDX #PORTS BASE ADDRESS OF THE I/O
STAA SPDR,X SEND THE COMMAND TO THE SENSOR
WRLOOP BRCLR 7,SPSR,WRLOOP LOOP UNTIL THE DATA HAS SHIFTED
OUT OF AND BACK INTO THE SPI
LDAA SPDR,X RETRIEVE THE RESULTS OF THE LAST
COMMAND
* TO THE SENSOR
RTS
* NOW WE NEED TO CALL THE ABOVE */
START JSR INITIO SET–UP THE I/O
LOOP LDAA #$1 1 IS THE COMMAND TO THE SENSOR THAT
* REQUESTS PRESSURE
JSR WRITSPI SEND THE COMMAND TO THE SENSOR.
* ... THE VALUE RETURNED IN ACCUMULATOR A
* WILL BE IN THE RANGE 0..0XFF = 0..100%
* FULL SCALE PRESSURE THE SECOND TIME
* THROUGH THE LOOP. THE INITIAL TIME
* THROUGH THE LOOP, THE DATA RETURNED
IS INDETERMINATE DATA FROM THE SENSOR
BRA LOOP
Table 3. SPI Timing Characteristics
Characteristic
Symbol
Min
Max
Unit
Frequency of Operation
fOP
tSCLK
tSCLKL
tV
tS
tH
tD1
tD2
tD3
dc
525
kHz
Cycle Time
—
1920
ns
Clock (SCLK) Low Time
932
—
ns
Dout Data Valid Time
Din Setup Time
Din Hold Time
On–Bus Delay Time
—
200
ns
100
—
ns
100
—
ns
1
—
ms
Off–Bus Delay Time
—
50
μ
s
Chip Select Period
TBD
—
ms
SERIAL DATA OUTPUT FORMAT
The serial data output is an 8–bit number of value 0–255.
This number represents the current applied pressure as a
percentage of the full–scale pressure rating of the smart
sensor. The master MCU can simply consider an output of “0”
to be zero pressure and “255” to be full–scale pressure. To
convert this number to engineering units, such as inches of
water (
″
H2O), the master MCU must multiply the smart sensor
output (0–255) by the full–scale pressure of the smart sensor
in
″
H2O and then divide (normalize) by 255. See equation 2.
The master MCU can either use an absolute number for the
full–scale pressure of the smart sensor (as indicated
previously) or can query each smart sensor that is connected
to the serial bus for its rated pressure range. The latter
technique allows multiple smart sensors of various full–scale
pressure ranges to be communicating with a single master
MCU, without the need for an absolute addressing scheme
that contains full–scale pressure information for each sensor.
CONCLUSION
A smart sensing system that achieves high performance for
low–pressure applications has been presented here. The key
performance advantage of the smart sensor system is that it
takes advantage of the fact that the output of the actual
sensing element is ratiometric (linearly proportional) to the
excitation voltage applied to the sensing element. A sensor
device is pulsed at a much higher than normally specified
voltage and a low duty–cycle for the purpose of increased
sensitivity. Although some of the sensor’s parasitic drawbacks
are increased in magnitude, some of the sensor’s negative
characteristics are lessened, and other sources of error and
noise in the system are reduced. The net effect is that a better
signal–to–noise ratio is obtained. This, combined with several
other performance–enhancing smart features, provides better
pressure resolution and accuracy than inherent in the sensor
device alone.
F
Freescale Semiconductor, Inc.
n
.