
3–336
Motorola Sensor Device Data
For More Information On This Product,
Go to: www.freescale.com
if (j<50)
{ j=0; }
cvt_bin_dec ( j );
write();
}
}
/* ################################################################### */
/* pressure=%full scale*transducer max pressure */
display_pressure()
{
long atod_result;
int j;
while(1)
{
atod_result = integrate(); /* read the a/d */
atod_result=( (atod_result*1000) / (HIATOD–ADZERO) ) * XDCRMAX;
j=atod_result/100;
cvt_bin_dec ( j );
write();
}
}
/* ################################################################### */
setup_error() /* write ”SE” on the display */
{
write_spi(0);
write_spi(109); /* S */
write_spi(121); /* E */
write_spi(0);
write_spi(2);
while(1);
}
/* ################################################################### */
main()
{
init_io();
setconfig(); /* determine how to function */
while(1); /* should never return here except after calibration */
}
F
Freescale Semiconductor, Inc.
n
.