3–251
Motorola Sensor Device Data
For More Information On This Product,
Go to: www.freescale.com
1EFE 74 #pragma mor @ 0x1efe = 0x74; /* this disables the watchdog counter and does
not add pull–down resistors on ports B and C */
/* put constants and variables here...they must be global */
/***************************************************************************/
0800 FC 30 DA 7A 36 6E E6 38 FE const char lcdtab[]={0xfc,0x30,0xda,0x7a,0x36,0x6e,0xe6,0x38,0xfe,0x3e };
0809 3E
/* lcd pattern table 0 1 2 3 4 5 6 7 8 9 */
080A 27 10 03 E8 00 64 00 0A const long dectable[] = { 10000, 1000, 100, 10 };
0050 0005 unsigned int digit[5]; /* buffer to hold results from cvt_bin_dec function */
0812 00 96 00 4B 00 96 00 1E 00 const long type[] = { 150, 75, 150, 30, 103 };
081B 67
/* MPX2010 MPX2050 MPX2100 MPX2200 MPX2700
The table above will cause the final results of the pressure to
engineering units to display the 1.5, 7.3 and 15.0 devices with a
decimal place in the tens position. The 30 and 103 psi devices will
display in integer units.
*/
const long slope_const[]={ 450,418,423,427,432,436,441,445,454,459,
081C 01 C2 01 A2 01 A7 01 AB 01 463,468,472,477,481,450 };
0825 B0 01 B4 01 B9 01 BD 01 C6
082E 01 CB 01 CF 01 D4 01 D8 01
0837 DD 01 E1 01 C2
0000 registera areg; /* processor’s A register */
0055 long atodtemp; /* temp to accumulate 100 a/d readings for smoothing */
0059 long slope; /* multiplier for adc to engineering units conversion */
005B int adcnt; /* a/d converter loop counter */
005C long xdcr_offset; /* initial xdcr offset */
005E long sensor_model; /* installed sensor based on J1..J3 */
0060 int sensor_index; /* determine the location of the decimal pt. */
0061 0063 unsigned long i,j; /* counter for loops */
0065 unsigned int k; /* misc variable */
struct bothbytes
{ int hi;
{
int lo;
};
union isboth
0066 0002
{ long l;
0066 0002
struct bothbytes b;
0066 0002
};
0066 0002 union isboth q; /* used for timer set–up */
/***************************************************************************/
/* variables for add32 */
0068 0004 unsigned long SUM[2]; /* result */
006C 0004 unsigned long ADDEND[2]; /* one input */
0070 0004 unsigned long AUGEND[2]; /* second input */
/* variables for sub32 */
0074 0004 unsigned long MINUE[2]; /* minuend */
0078 0004 unsigned long SUBTRA[2]; /* subtrahend */
007C 0004 unsigned long DIFF[2]; /* difference */
/* variables for mul32 */
0080 0004 unsigned long MULTP[2]; /* multiplier */
0084 0004 unsigned long MTEMP[2]; /* high order 4 bytes at return */
0088 0004 unsigned long MULCAN[2]; /* multiplicand at input, low 4 bytes at return */
F
Freescale Semiconductor, Inc.
n
.