| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
MPXM2102AS Datasheet(PDF) 108 Page - Motorola, Inc |
|
|
|||||||||||||||||||||||||||||
MPXM2102AS Datasheet(HTML) 108 Page - Motorola, Inc |
|
108 / 670 page ![]() AN1611 2–72 Motorola Sensor Device Data www.motorola.com/semiconductors LDA #$40 ; Enable the output compare interrupt STA TCONTROL CLI ; Interrupt begins here LDA #$CC ; Port C = 1100 1100 Letter ”C” STA PORTC LDA #$BE ; Port B = 1011 1110 Letter ”A” STA PORTB LDA #$C4 ; Port A = 1100 0100 Letter ”L” STA PORTA LDA #16 IDLE JSR DLY20 ; Idling for a while (16*0.125 = 2 sec) DECA ; for the zero offset to stabilize BNE IDLE ; before perform auto–zero LDA #$00 ; Sample the data 32,768 times and take STA DIV_LO ; the average 8000 H = 32,768 LDA #$80 ; Right shift of 15 equivalent to divide STA DIV_HI ; by 32,768 LDA #!15 ; Overall sampling time = 1.033 s) STA NO_SHIFT JSR READAD ; Zero acceleration calibration LDX #5 ; Calculate the zero offset LDA PTEMPLO ; DC offset = PTEMPLO * 5 STA ZERO_ACC MUL STA DCOFFSETLO ; Save the zero offset in the RAM TXA STA DCOFFSETHI CLR HOLD_CNT LDA #$10 ; Sample the data 16 times and take STA DIV_LO ; the average 0100 H = 16 LDA #$00 ; Right shift of 4 equivalent to divide STA DIV_HI ; by 16 LDA #$4 ; Overall sampling time = 650 us STA NO_SHIFT LDA ZERO_ACC ; Display 0.0g at the start STA MAXACC JSR ADTOLCD CLR START_TIME CLR AVE_CNT1 CLR AVE_CNT2 CLR SHIFT_CNT CLR AVERAGE_L CLR AVERAGE_M CLR AVERAGE_H REPEAT JSR READAD ; Read acceleration from ADC LDA ZERO_ACC ADD #$04 CMP PTEMPLO BLO CRASH ; If the acceleration < 2.0g LDA PTEMPLO ; Accumulate the averaged results ADD AVERAGE_L ; for 128 times and take the averaging STA AVERAGE_L ; again to achieve more stable CLRA ; reading at low g ADC AVERAGE_M STA AVERAGE_M CLRA ADC AVERAGE_H STA AVERAGE_H LDA #$01 ADD AVE_CNT1 STA AVE_CNT1 CLRA ADC AVE_CNT2 STA AVE_CNT2 CMP #$04 BNE REPEAT LDA AVE_CNT1 CMP #$00 BNE REPEAT SHIFTING INC SHIFT_CNT ; Take the average of the 128 samples LSR AVERAGE_H ROR AVERAGE_M ROR AVERAGE_L LDA SHIFT_CNT CMP #$0A BLO SHIFTING LDA AVERAGE_L Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com |
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes 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 |