| Electronic Components Datasheet Search |
|
MPX2202DP Datasheet(PDF) 395 Page - Motorola, Inc |
|
|
|||||||||||||||||||||||||||||
MPX2202DP Datasheet(HTML) 395 Page - Motorola, Inc |
|
395 / 670 page ![]() AN1315 3–249 Motorola Sensor Device Data www.motorola.com/semiconductors Figure 5. DEVB–158 Software Flowchart TIMER INTERRUPT SERVICE TIMER REGISTERS SETUP COUNTER FOR NEXT INTERRUPT SERVICE LIQUID CRYSTAL DISPLAY RETURN ACCUMULATE 100 A/D CONVERSIONS COMPUTE INPUT PRESSURE CONVERT TO DECIMAL/SEGMENT DATA PLACE IN RESULT OUTPUT BUFFER COMPUTE SLOPE CONSTANT INITIALIZE DISPLAY I/O PORTS INITIALIZE TIMER REGISTERS DETERMINE SENSOR TYPE ENABLE INTERRUPTS START The “C” compiler used in this project was provided by BYTE CRAFT LTD. (519) 888–6911. A compiler listing of the program is included at the end of this document. The following is a brief explanation of the routines: delay() Used to provide a software loop delay. read_a2d() Performs 100 reads on the A/D converter on multiplexer channel 0 and returns the accumulation. fixcompare() Services the internal timer for 15 ms. timer compare interrupts. TIMERCMP() Alternates the data and backplane inputs to the liquid crystal display. initio() Sets up the microprocessor’s I/O ports, timer and enables processor interrupts. adzero() This routine is called at powerup time. It delays to let the power supply and the transducer stabilize. It then calls “read_atod()” and saves the returned value as the sensors output voltage with zero pressure applied. cvt_bin_dec(unsigned long arg) This routine converts the unsigned binary argument passed in “arg” to a five digit decimal number in an array called “digit.” It then uses the decimal results for each digit as an index into a table that converts the decimal number into a segment pattern for the display. This is then output to the display. display_psi() This routine is called from “main()” never to return. The A/D converter routine is called, the pressure is calculated based on the type sensor detected and the pressure applied to the sensor is displayed. The loop then repeats. sensor_type() This routine determines the type of sensor from reading J1 to J3, setting the full scale pressure for that particular sensor in a variable for use by display_psi(). sensor_slope() This routine determines the slope constant to be used by display_psi() for engineering units output. main() This is the main routine called from reset. It calls “initio()” to setup the system’s I/O. “display_psi()” is called to compute and display the pressure applied to the sensor. Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |