| 数据搜索系统,热门电子元器件搜索 |
|
MPXM2202GS 数据表(PDF) 111 Page - Motorola, Inc |
|
|
|||||||||||||||||||||||||||||
MPXM2202GS 数据表(HTML) 111 Page - Motorola, Inc |
|
111 / 670 page ![]() AN1611 2–75 Motorola Sensor Device Data www.motorola.com/semiconductors BEQ NEWMAX1 ; Branch if the Holdtime is due LDA MAXACC ; otherwise use the current value BRA NEWMAX2 NEWMAX1 LDA #$C8 ; Hold time = 200 * 15 ms = 3 sec STA HOLD_CNT ; Reload the hold time for the next CLR HOLD_DONE ; maximum value LDA #$FF STA START_TIME ; Start to count down the hold time LDA PTEMPLO ; Take the current value as maximum NEWMAX2 STA MAXACC RTS ****************************************** * * * This subroutine is to convert * * the AD data to the LCD * * Save the data to be diaplayed * * in MAXACC * * * ****************************************** ADTOLCD SEI ; Disable the Timer Interrupt !! LDA #$00 ; Load 0000 into the memory STA DECHI LDA #$00 STA DECLO LDA MAXACC LDX #5 MUL ; Acceleration = AD x 5 ADD DECLO ; Acceleration is stored as DECHI STA DECLO ; and DECLO STA ACCLO ; Temporary storage LDA #$00 ; Assume positive deceleration STA SIGN ; ”00” positive ; ”01” negative CLRA TXA ADC DECHI STA DECHI STA ACCHI ; Temporary storage LDA DECLO SUB DCOFFSETLO ; Deceleration = Dec – DC offset STA DECLO LDA DECHI SBC DCOFFSETHI STA DECHI BCS NEGATIVE ; Branch if the result is negative BRA SEARCH NEGATIVE LDA DCOFFSETLO ; Acceleration = DC offset – Dec SUB ACCLO STA DECLO LDA DCOFFSETHI SBC ACCHI STA DECHI LDA #$01 ; Assign a negative sign STA SIGN SEARCH CLRX ; Start the search for hundred digit LOOP100 LDA DECLO ; Acceleration = Acceleration – 100 SUB HUNDREDLO STA DECLO LDA DECHI SBC HUNDREDHI STA DECHI INCX ; X = X + 1 BCC LOOP100 ; if acceleration >= 100, continue the DECX ; loop100, otherwise X = X – 1 LDA DECLO ; Acceleration = Acceleration + 100 ADD HUNDREDLO STA DECLO LDA DECHI ADC HUNDREDHI STA DECHI TXA ; Check if the MSD is zero AND #$FF BEQ NOZERO ; If MSD is zero, branch to NOZERO LDA $0300,X ; Output the first second digit STA PORTC BRA STARTTEN NOZERO LDA #$00 ; Display blank if MSD is zero STA PORTC Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |