| поискавой системы для электроныых деталей |
|
MPXM2102AS датащи(PDF) 439 Page - Motorola, Inc |
|
|
|||||||||||||||||||||||||||||
MPXM2102AS датащи(HTML) 439 Page - Motorola, Inc |
|
439 / 670 page ![]() AN1326 3–293 Motorola Sensor Device Data www.motorola.com/semiconductors APPENDIX MC68HC11 Barometer Software Available on: Motorola Electronic Bulletin Board MCU Freeware Line 8–bit, no parity, 1 stop bit 1200/300 baud (512) 891–FREE (3733) * BAROMETER APPLICATIONS PROJECT – Chris Winkler * Developed: October 1st, 1992 – Motorola Discrete Applications * This code will be used to implement an MC68HC11 Micro–Controller * as a processing unit for a simple barometer system. * The HC11 will interface with an MPX2100AP to monitor,store * and display measured Barometric pressure via the 8–bit A/D channel * The sensor output (32mv max) will be amplified to .5 – 2.5 V dc * The processor will interface with a 4–digit LCD (FE202) via * a Motorola LCD driver (MC145453) to display the pressure * within +/– one tenth of an inch of mercury. * The systems range is 15.0 – 30.5 in–Hg * A/D & CPU Register Assignment * This code will use index addressing to access the * important control registers. All addressing will be * indexed off of REGBASE, the base address for these registers. REGBASE EQU $1000 * register base of control register ADCTL EQU $30 * offset of A/D control register ADR2 EQU $32 * offset of A/D results register ADOPT EQU $39 * offset for A/D option register location PORTB EQU $04 * Location of PORTB used for conversion PORTD EQU $08 * PORTD Data Register Index DDRD EQU $09 * offset of Data Direction Reg. SPCR EQU $28 * offset of SPI Control Reg. SPSR EQU $29 * offset of SPI Status Reg. SPDR EQU $2A * offset of SPI Data Reg. * User Variables * The following locations are used to store important measurements * and calculations used in determining the altitude. They * are located in the lower 256 bytes of user RAM DIGIT1 EQU $0001 * BCD blank digit (not used) DIGIT2 EQU $0002 * BCD tens digit for pressure DIGIT3 EQU $0003 * BCD tenths digit for pressure DIGIT4 EQU $0004 * BCD ones digit for pressure COUNTER EQU $0005 * Variable to send 5 dummy bytes POFFSET EQU $0010 * Storage Location for max pressure offset SENSOUT EQU $0012 * Storage location for previous conversion RESULT EQU $0014 * Storage of Pressure(in Hg) in hex format FLAG EQU $0016 * Determines if measurement is within range * MAIN PROGRAM * The conversion process involves the following steps: * * 1. Set–Up SPI device– SPI_CNFG * 2. Set–Up A/D, Constants SET_UP * 3. Read A/D, store sample ADCONV * 4. Convert into in–Hg IN_HG * 5. Determine FLAG condition IN_HG * a. Display error ERROR * b. Continue Conversion INRANGE * 6. Convert hex to BCD format BCDCONV * 7. Convert LCD display digits LOOKUP * 8. Output via SPI to LCD SPI2LCD * This process is continually repeated as the loop CONVERT * runs unconditionally through BRA (the BRANCH ALWAYS statement) * Repeats to step 3 indefinitely. Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |