データシートサーチシステム
  Japanese  ▼
ALLDATASHEET.JP

X  

MPXM2010D データシート(PDF) 20 Page - Freescale Semiconductor, Inc

部品番号 MPXM2010D
部品情報  Water Level Monitoring
PDF  24 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
メーカー  FREESCALE [Freescale Semiconductor, Inc]
ホームページ  http://www.freescale.com
Logo FREESCALE - Freescale Semiconductor, Inc

MPXM2010D データシート(HTML) 20 Page - Freescale Semiconductor, Inc

Back Button MPXM2010D Datasheet HTML 16Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 17Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 18Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 19Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 20Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 21Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 22Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 23Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 24Page - Freescale Semiconductor, Inc  
Zoom Inzoom in Zoom Outzoom out
 20 / 24 page
background image
AN1950
Sensors
20
Freescale Semiconductor
;
delmain: main delay routine; generates delay equal to H:X x 20us
;
-------
delmain: mov #$36,tsc
;stop TIM & / 64
sthx tmodh
;count H:X x 20us
bclr 5,tsc
;start clock
delwait: brclr 7,tsc,delwait ;wait for end of countdown
pulx
pulh
rts
;this RTS serves for all delay routines!
;-------- A/D Routines ----------------------------------------------
;
adcbyti: gets single A/D reading from PTA0 and returns it in A
;
-------
adcbyti: mov #$00,adscr
;ADC set to PTA0
brclr 7,adscr,*
;wait for ADC reading
lda adr
;result in adr
rts
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;
adcbyta: gets averaged A/D reading from PTA0 and returns it in A
;
-------
adcbyta: clr CNT
;average 256 readings
clr RB
;will be addint them up
clr RA
;in RB:RA
do256a: bsr adcbyti
add RA
sta RA
lda RB
adc #$00
sta RB
;16-bit add into RB:RA
dbnz CNT,do256a
;do all 256
lsl RA
;if RA<$80
bcc nochga
;then RB result is correctly rounded
inc RB
;otherwise round off to next value
nochga: lda RB
rts
;-------- LCD Routines ----------------------------------------------
;
lcdinit: initializes LCD
;
-------
lcdinit: lda #$3C
;set 8-bit interface, 1/16 duty, 5x10 dots
bsr lcdcmdo
lda #$0C
;display on, cursor off, blink off
bsr lcdcmdo
lda #$06
;increment cursor position, no display shift
bsr lcdcmdo
lda #$01
;clear display
bsr lcdcmdo
rts
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;
lcdcmdo: sends a command to LCD
;
-------
lcdcmdo: bsr shiftA
bclr 4,porta
;RS=0 for command
bset 3,porta
bclr 3,porta
;toggle E
bsr del5ms
;some commands require 2ms for LCD to execute
rts
;so let's play it safe
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;
lcdchro: sends a character (data) to LCD
;
-------
lcdchro: bsr shiftA
bset 4,porta
;RS=1 for data



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


データシート ダウンロード

Go To PDF Page


リンク URL



ALLDATASHEETはお客様のビジネスに役立ちますか?  [ DONATE ] 

Alldatasheetは   |   広告   |   お問い合わせ   |   プライバシーポリシー   |   データシートへのリンク    |   リンク交換   |   メーカーリスト
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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