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

AN1950 参数 Datasheet PDF下载

AN1950图片预览
型号: AN1950
PDF下载: 下载PDF文件 查看货源
内容描述: 水位监测 [Water Level Monitoring]
分类和应用: 监控
文件页数/大小: 24 页 / 298 K
品牌: FREESCALE [ Freescale ]
 浏览型号AN1950的Datasheet PDF文件第14页浏览型号AN1950的Datasheet PDF文件第15页浏览型号AN1950的Datasheet PDF文件第16页浏览型号AN1950的Datasheet PDF文件第17页浏览型号AN1950的Datasheet PDF文件第19页浏览型号AN1950的Datasheet PDF文件第20页浏览型号AN1950的Datasheet PDF文件第21页浏览型号AN1950的Datasheet PDF文件第22页  
bclr 4,porta  
bclr 5,porta  
rts  
;LEDs off  
;-------- WRITE TO EEPROM Routines ----------------------------------  
;
;
wrflash: burns A into flash at location pointed by H:X  
-------  
wrflash: sthx flshadr  
sta flshbyt  
tsx  
;this is the address in the flash  
;and the byte we want to put there  
sthx memSP  
;store SP in memSP, so it can be temporarily used as a 2nd index register  
ldhx #ramfree+1 ;SP now points to RAM (remember to add 1 to the address!!!, HC08 quirk)  
txs  
;SP changed (careful not to push or call subroutines)  
;H:X points to beginning of flash programming code  
;get 1st byte from flash  
ldhx #ersflsh  
doall: lda 0,x  
sta 0,sp  
aix #$0001  
ais #$0001  
cphx #lastbyt  
bne doall  
ldhx memSP  
txs  
;copy it into RAM  
;HX:=HX+1  
;SP:=SP+1  
;and continue until we reach the last byte  
;once done, restore the SP  
jsr ramfree  
rts  
;and run the subroutine from RAM, you cannot write the flash while  
;running a code in it, so the RAM has to take over for that piece  
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
;*************** THE FOLLOWING CODE WILL BE COPIED INTO AND WILL RUN FROM RAM ******  
ersflsh: lda #$02  
sta flcr  
;textbook way to erase flash  
lda flbpr  
clra  
ldhx flshadr  
sta 0,x  
bsr delayf  
lda #$0A  
sta flcr  
bsr delayf  
lda #$08  
sta flcr  
bsr delayf  
clra  
sta flcr  
bsr delayf  
pgmflsh: lda #$01  
sta flcr  
;textbook way to program flash  
lda flbpr  
clra  
ldhx flshadr  
sta 0,x  
bsr delayf  
lda #$09  
sta flcr  
bsr delayf  
lda flshbyt  
ldhx flshadr  
sta 0,x  
bsr delayf  
lda #$08  
sta flcr  
bsr delayf  
clra  
sta flcr  
AN1950  
18  
Sensors  
Freescale Semiconductor  
 复制成功!