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

AN1950 参数 Datasheet PDF下载

AN1950图片预览
型号: AN1950
PDF下载: 下载PDF文件 查看货源
内容描述: 水位监测 [Water Level Monitoring]
分类和应用: 监控
文件页数/大小: 24 页 / 298 K
品牌: FREESCALE [ Freescale ]
 浏览型号AN1950的Datasheet PDF文件第16页浏览型号AN1950的Datasheet PDF文件第17页浏览型号AN1950的Datasheet PDF文件第18页浏览型号AN1950的Datasheet PDF文件第19页浏览型号AN1950的Datasheet PDF文件第20页浏览型号AN1950的Datasheet PDF文件第22页浏览型号AN1950的Datasheet PDF文件第23页浏览型号AN1950的Datasheet PDF文件第24页  
bset 3,porta  
bclr 3,porta  
bsr del100us  
rts  
;toggle E  
;data only requires 40us for LCD to execute  
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
;
;
shiftA: shifts A into shift register and provides 8-bits to LCD  
------  
shiftA: psha  
mov #$08,BB  
all8: lsla  
bcc shift0  
shift1: bset 4,porta  
bra shift  
;will be shifting 8 bits  
;get bit  
;if bit=0 then shift a 0  
;otherwise shift a 1  
shift0: bclr 4,porta  
shift: bclr 5,porta  
bset 5,porta  
bclr 5,porta  
dbnz BB,all8  
pula  
;bit 4 is data to shift register  
;bit 5 is shift register clock  
;toggle CLK  
;do all 8 bits  
rts  
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
;
;
lcdnibo: displays 1 character (0-9,A-F) based on low-nibble value in A  
-------  
lcdnibo: psha  
add #$30  
;convert 4 bits from binary to ascii  
;add $30 (0-9 offset)  
cmp #$39  
bls d0to9b  
add #$07  
d0to9b: bsr lcdchro  
pula  
;is it a number (0-9) ?  
;if so skip  
;else add $07 = total of $37 (A-F offset)  
rts  
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
;
;
lcdbyto: displays 2 characters based on hex value in A  
-------  
lcdbyto: psha  
psha  
lsra  
lsra  
lsra  
lsra  
;remember A (for low nibble)  
;shift right 4 times  
bsr lcdnibo  
pula  
and #$0F  
bsr lcdnibo  
pula  
;high nibble  
;low nibble  
rts  
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
;
;
lcdstro: displays message ending in '@', but also sends commands to LCD  
-------  
lcdstro: psha  
lda 0,x  
lcon: cmp #$80  
bhs iscmd  
;if ASCII >=$80  
cmp #$1F  
bls iscmd  
isdta: bsr lcdchro  
reuse1: aix #$0001  
lda 0,x  
;or <=$1F then  
;assume it is a command to LCD  
;otherwise it is data to LCD  
;next character  
;indexed by x  
cmp #$40  
;continue until  
bne lcon  
;character = '@'  
AN1950  
Sensors  
Freescale Semiconductor  
21  
 复制成功!