欢迎访问ic37.com |
会员登录 免费注册
发布采购

AN1950 参数 Datasheet PDF下载

AN1950图片预览
型号: AN1950
PDF下载: 下载PDF文件 查看货源
内容描述: 水位监测 [Water Level Monitoring]
分类和应用: 监控
文件页数/大小: 24 页 / 298 K
品牌: FREESCALE [ Freescale ]
 浏览型号AN1950的Datasheet PDF文件第7页浏览型号AN1950的Datasheet PDF文件第8页浏览型号AN1950的Datasheet PDF文件第9页浏览型号AN1950的Datasheet PDF文件第10页浏览型号AN1950的Datasheet PDF文件第12页浏览型号AN1950的Datasheet PDF文件第13页浏览型号AN1950的Datasheet PDF文件第14页浏览型号AN1950的Datasheet PDF文件第15页  
validcal: ldhx #N2  
jsr wrflash  
ldhx #msg05  
jsr lcdstro  
lda N1  
;burn N2 into flash  
;and display new current cal values from flash  
;0mm value  
;160mm value  
;done!  
jsr lcdbyto  
lda #'/'  
jsr lcdchro  
lda N2  
jsr lcdbyto  
jsr del1s  
jsr del1s  
jmp nocalib  
;__________________________________________________________  
;__________________________________________________________  
LEVEL: lda #$01  
jsr lcdcmdo  
lda #$0C  
;===LEVEL=== main routine: displays level, flow & graphics  
;clear screen  
jsr lcdcmdo  
;cursor off  
lda #$88  
jsr lcdcmdo  
clra  
;position cursor at LCD graphics portion  
;(2nd half of first line)  
;and write ascii $00 through $07  
;which contain the graphics related to  
;40 different readings  
fillgfx: jsr lcdchro  
inca  
cmp #$08  
bne fillgfx  
;do all 8  
LVL:  
ldhx #ramfree  
lda #$28  
;point to 40 pressure readings  
;count down from 40  
purge: clr 0,x  
incx  
;clear all those locations  
;next (H cannot change: we are in page0 RAM)  
dbnza purge  
jsr adcbyta  
jsr LfNx  
;get averaged A/D reading (i.e. NX)  
;convert to level and  
sta Lgfx  
;store in "Level graphics"  
LVLwarm: bset 4,porta  
bset 5,porta  
;LEDs on during this cycle  
ldhx #ramfree  
mov #$27,RA  
shiftgfx: lda 1,x  
;point to 40 pressure readings  
;count down from 39  
;take location+1  
sta 0,x  
incx  
;and move to location+0, i.e. shift graphics left  
;next X (once again: we are in page 0, no need to worry about H)  
dbnz RA,shiftgfx ;do this 39x  
jsr adcbyta  
jsr LfNx  
mov RA,OA  
;get averaged A/D reading (i.e. NX)  
;LX:=(NX-N1)*ConversionValue/(N2-N1)  
;store result in OA  
clr RB  
;RB will contain graphic pixels (default=$00)  
;if <UnitEmpty (preset value = empty or almost)  
;then "empty" (no pixels)  
;if >=UnitFull (preset value = full or almost)  
;then "full" (pixel $80=bit 7)  
cmp UnitEmpt  
bcs Lzero  
cmp UnitFull  
bcc Lsat  
clrh  
ldx UnitDiv  
div  
;otherwise determine one of 8 graphic values  
;UnitDiv is roughly full range/8  
;in order to give 8 values  
mov #$01,RB  
;but now value has to be converted to pixel  
AN1950  
Sensors  
Freescale Semiconductor  
11