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

AN1950 参数 Datasheet PDF下载

AN1950图片预览
型号: AN1950
PDF下载: 下载PDF文件 查看货源
内容描述: 水位监测 [Water Level Monitoring]
分类和应用: 监控
文件页数/大小: 24 页 / 298 K
品牌: FREESCALE [ Freescale ]
 浏览型号AN1950的Datasheet PDF文件第8页浏览型号AN1950的Datasheet PDF文件第9页浏览型号AN1950的Datasheet PDF文件第10页浏览型号AN1950的Datasheet PDF文件第11页浏览型号AN1950的Datasheet PDF文件第13页浏览型号AN1950的Datasheet PDF文件第14页浏览型号AN1950的Datasheet PDF文件第15页浏览型号AN1950的Datasheet PDF文件第16页  
cmp #$01  
beq Lzero  
;if result is $01  
;then display it directly  
makeRB lsl RB  
dbnza makeRB  
bra Lzero  
;otherwise shift 1 pixel bit to the right place  
;by counting down result of division  
Lsat: mov #$80,RB  
Lzero: lda RB  
;if full then position highest pixel  
ldhx #ramfree+$27 ;last of the 40  
sta 0,x  
;put it at then end of the 40 bytes (new value), all others were shifted left  
;weath will contain dynamic change based also on value of RB  
;if RB=$00 then weath=$00: "empty"  
clr weath  
lda RB  
beq donew  
cmp #$80  
bne notfull  
;
mov #$01,weath ;if $80 then weath=$01: "full"  
bra donew  
notfull mov #$02,weath ;prepare for "steady" if L(i)=L(i-1)  
lda OA  
;get current level value L(i)  
cmp Lgfx  
beq donew  
;compare to previous level value L(i-1)  
mov #$03,weath ;"filling" if L(i)>L(i-1)  
bcc donew  
mov #$04,weath ;"emptying" otherwise  
donew: lda OA  
;current level L(i)  
;minus previous level L(i-1)  
;establishes rate: L(i)-L(i-1)  
;update L(i-1)  
sub Lgfx  
sta MA  
mov RA,Lgfx  
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
golevel: lda #$80  
jsr lcdcmdo  
;******** now let's display the level in decimal ********  
;start on 1st character of 1st line  
;get current level value  
;and divide by 100  
lda OA  
clrh  
ldx #$64  
div  
bne over100  
lda #$20  
jsr lcdchro  
bra lnext  
over100: jsr lcdnibo  
lnext: pshh  
pula  
;if result is >0 then handle "hundreds"  
;otherwise display space (remove leading 0)  
;display "hundreds" digit  
;move remainder into A  
;divide by 10  
clrh  
ldx #$0A  
div  
jsr lcdnibo  
lda #'.'  
;display "tens" digit  
jsr lcdchro  
pshh  
;display decimal point  
pula  
jsr lcdnibo  
lda UnitType  
cmp #$3F  
beq dsplIN  
;and first decimal  
;check for cm ($A0) vs. in (#3F)  
dsplCM: lda #'c'  
jsr lcdchro  
lda #'m'  
AN1950  
12  
Sensors  
Freescale Semiconductor