亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 93c46.asm

?? 基于pic的例子程序
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
	movlw   b'00000010'     ;
	tris    serial
	dsel                    ;De-select the 93C46.

;       nop                     ;NOTE:  Check the 93C46 data sheet for
				;minimum CS low time.  Depending upon
				;processor frequency, a nop(s) may be
				;between the assertion and de-assertion of
				;Chip Select.

	sel                     ;Re-select the 93C46.
notrdy  btfsc   serial,dout     ;If DO is a '0', 93C46 has yet to completed
				;the last operation (still busy).
	goto    no_error        ;Otherwise RDY status is present within the
				;alloted time, and return with good status.
	decfsz  cnt             ;No, not yet ready.  Decrement the LSB of our
				;16 bit timer and check for expiration.
	goto    notrdy          ;Still some time left.  Try again.
	decfsz  cnthi           ;Least significant byte expired - decrement
				;and check for expiration of the MSB.
	goto    notrdy          ;Still some time left.  Try again.
;for a 3 wire interface, convert RA1 line back to an ouput
	movlw   0               ;convert RA1 to an output
	tris    serial          ;       /
	retlw   error           ;RDY status was not present in the alloted
				;time, return with error status.
no_error
;for a 3 wire interface, convert RA1 line back to an ouput
	movlw   0               ;convert RA1 to an output
	tris    serial          ;       /
	retlw   no_err


;********************************************************************
;*                      SEE                                         *
;********************************************************************

				;See will control the entire operation of a
				;93C46 device.  Prior to calling the routine,
				;load a valid command/memory address into
				;location cmd, and for WRITE or WRAL
				;commands, load registers highb and lowb with
				;16 bits of write data.  Upon exit, the W
				;register will contain the completion status.
				;Only 93C46 instructions which require a
				;status check can return with an error as the
				;completion status.  The values that denote
				;the completion status are defined as
				;variables 'error' and 'no_err' in the
				;general assignments section.

see     movlw   cmd             ;Load W with the location of the cmd
				;register.
	movwf   fsr             ;Transfer that information into the File
				;Select Register.  The fsr now points to
				;location cmd.
	sel                     ;Select the 93C46.
	strtbt                  ;Send a start bit.
	call dout8              ;Transmit the 2 bit command and six bit
				;address.
	btfsc   cmd,6           ;Check for a WRITE or ERASE command.
	goto    see2            ;Yes, parse the command further.
	btfsc   cmd,7           ;Check for a READ command.
	goto    read_           ;Yes, process READ command.
	btfsc   cmd,5           ;Check for a EWEN or ERAL command.
	goto    see3            ;Yes, parse the command further.
	btfsc   cmd,4           ;Check for a WRAL command.
	goto    write_          ;Yes, process WRITE/WRAL command.

exit_   dsel                    ;No further processing required; 93C46
				;command completed.
	retlw   no_err          ;Return with good completion status.

see2    btfss   cmd,7           ;Check for a ERASE command.
	goto    write_          ;No, process WRITE command.
exit2_  call    rdychk          ;ERASE command requires a status check.
	dsel                    ;De-select the 93C46.
	addwf   pc              ;Compute completion status from results of
				;status check.
	retlw   no_err          ;Return with good completion status.
	retlw   error           ;Return with bad completion status.

see3    btfsc   cmd,4           ;Check for a EWEN command.
	goto    exit_           ;Yes, no further processing required, exit
				;now.
	goto    exit2_          ;No, ERAL command which requires a status
				;check.

read_   incf    fsr             ;Increment the File Select Register to point
				;to the register receiving the upper byte of
				;the incomming 93C46 data word.
	call    din8            ;Input the upper byte.
	incf    fsr             ;Increment the File Select Register to point
				;to the register receiving the lower byte.
	call    din8            ;Input 8 more bits.
	goto    exit_           ;No further processing required, exit now.

write_  incf    fsr             ;Increment the File Select Register to point
				;to the upper byte of the 16 bit 93C46 data
				;word to be transmitted.
	call    dout8           ;Output that byte.
	incf    fsr             ;Increment the File Select Register to point
				;to the lower byte.
	call    dout8           ;Output the lower byte of the 16 bit 93C46
				;data word.
	goto    exit2_          ;Exit with a status check.

;********************************************************************
;*                      Test Program                                *
;********************************************************************
	main                    ;We've include a sample program to exercise
				;the PIC to 93C46 interface using a simple
				;erase, write and varify routine.
	
	clrf    serial          ;Clear the port tied to the 93C46 device.
	movlw   b'11110100'     ;Intialize the data direction register for
	tris    serial          ;that port.
	
	movlw   ewen            ;Load W with the Erase/Write Enable command.
	movwf   cmd             ;Transfer W into cmd register.
	call    see             ;Enable the 93C46 device.

	movlw   eral            ;Load W with the Erase All command.
	movwf   cmd             ;Transfer W into cmd register.
	call    see             ;Erase the 93C46.
	xorlw   error           ;Check completion status.
	btfsc   status, zflag   ;Test for error condition.
	goto    errloop         ;Yes, bad completion status, error-out.

				;Write loop:
loopcnt equ     0x1F            ;Define an unused location for our test
				;program loop counter.
tstptrn equ     0xAA            ;Define the test pattern to be written.

	movlw   .64             ;Initialize that counter.
	movwf   loopcnt         ;
	movlw   write           ;Load W with the Write command.
	movwf   cmd             ;Transfer W into cmd register.
	movlw   tstptrn         ;Intialize the 93C46 data registers with
				;write data.
	movwf   highb           ;
	movwf   lowb            ;
test1   call    see             ;Write data word into 93C46 device.
	xorlw   error           ;Check completion status.
	btfsc   status,zflag    ;Test for error condition.
	goto    errloop         ;Yes, bad completion status, error-out.
	incf    cmd             ;No, increment the 6 bit memory address
				;field.
	decfsz  loopcnt         ;Have we written all 64 locations?
	goto    test1           ;No, write another location.

				;Read loop:

	movlw   .64             ;Initialize loop counter.
	movwf   loopcnt         ;
	movlw   read            ;Load W with the Read command.
	movwf   cmd             ;Transfer W into cmd register.
test2   call    see             ;Read addressed data word from 93C46 device.
	movlw   tstptrn         ;Load W with the pattern written.
	subwf   highb,0         ;Verify the data read against what was
				;written.
	btfss   status,zflag    ;Same?
	goto    errloop         ;No, error-out.
	movlw   tstptrn         ;Repeat with the lower byte read.
	subwf   lowb,0          ;
	btfss   status,zflag    ;Same?
	goto    errloop         ;No, error-out.
	incf    cmd             ;Yes, both byte correct, increment the 6 bit
				;memory address field.
	decfsz  loopcnt         ;Have we read all 64 locations?
	goto    test2           ;No, read another location.

allok   goto    allok           ;Home safe!

errloop goto    errloop         ;Bad news!

	END                     ;Thats all folks!

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆国产欧美日韩综合精品二区| 亚洲福利国产精品| 亚洲人成电影网站色mp4| 久久国产精品色婷婷| 久久―日本道色综合久久| 在线播放91灌醉迷j高跟美女 | 欧美性色欧美a在线播放| 久久97超碰色| 91丝袜美女网| 亚洲午夜av在线| 欧美一区二区人人喊爽| 蜜臀av一区二区在线观看 | 亚洲色欲色欲www在线观看| 91香蕉视频污在线| 五月天欧美精品| 久久人人97超碰com| 92国产精品观看| 日韩1区2区3区| 国产欧美日产一区| 欧美日韩国产另类一区| 精品在线观看免费| 国产一区二区三区四区在线观看| 国产欧美日韩亚州综合| 色欧美88888久久久久久影院| 亚洲成av人片一区二区三区 | 国产精品久久久久婷婷二区次| 国产高清一区日本| 亚洲黄一区二区三区| 日韩欧美黄色影院| 92精品国产成人观看免费| 日日骚欧美日韩| 日韩一区中文字幕| 欧美一卡二卡三卡| 91美女在线看| 久久99精品久久久| 亚洲亚洲人成综合网络| 国产欧美日韩视频在线观看| 欧美精品v国产精品v日韩精品| 成人免费视频视频在线观看免费| 首页国产丝袜综合| 亚洲欧美区自拍先锋| 久久午夜羞羞影院免费观看| 精品视频色一区| 国产不卡一区视频| 日本成人在线看| 一区二区三区在线免费播放 | 欧美日韩国产综合一区二区| 久久精品国产精品青草| 亚洲午夜精品网| 中文字幕一区二区在线观看| 精品乱人伦小说| 欧美另类变人与禽xxxxx| 成人国产精品免费观看视频| 六月丁香婷婷久久| 视频一区二区不卡| 亚洲风情在线资源站| 中文字幕在线不卡国产视频| 久久免费看少妇高潮| 日韩美女在线视频| 欧美喷潮久久久xxxxx| 色综合色狠狠天天综合色| 国产成人啪午夜精品网站男同| 久久草av在线| 美女脱光内衣内裤视频久久网站 | 粉嫩绯色av一区二区在线观看 | 蜜臀久久久久久久| 欧美一级高清片| 豆国产96在线|亚洲| 久久精品亚洲乱码伦伦中文| 一区二区在线看| 国产精品麻豆视频| 国产亚洲精品bt天堂精选| 欧美精品一区二区三区蜜桃视频 | 亚洲成av人片| 尤物在线观看一区| 日韩美女视频一区| 亚洲精品自拍动漫在线| 亚洲日本va午夜在线电影| 亚洲三级电影全部在线观看高清| 国产精品国产自产拍在线| 国产精品久99| 一区二区三区欧美亚洲| 国产乱理伦片在线观看夜一区| 美女诱惑一区二区| 久久91精品久久久久久秒播| 欧美日韩mp4| 韩国欧美国产一区| 久国产精品韩国三级视频| 亚洲永久免费av| 天天做天天摸天天爽国产一区| 亚洲图片欧美色图| 日韩不卡在线观看日韩不卡视频| 免播放器亚洲一区| 国产99久久久国产精品| 99国产精品久| 欧美夫妻性生活| 精品国产一区二区三区四区四| 久久一区二区视频| 国产精品久久久久影院亚瑟| 亚洲综合色成人| 日韩国产精品大片| 国产成人亚洲精品青草天美| 91丨porny丨中文| 欧美电影在线免费观看| 久久久精品免费网站| 成人免费在线观看入口| 日韩在线一区二区三区| 国产一区二区精品久久91| 91蜜桃免费观看视频| 欧美丰满一区二区免费视频 | 欧美精品色综合| 久久综合丝袜日本网| 亚洲美女一区二区三区| 91小视频免费观看| 91精品国产品国语在线不卡| 久久你懂得1024| 亚洲一卡二卡三卡四卡| 午夜精品久久久久影视| 91麻豆精东视频| 色94色欧美sute亚洲13| 亚洲国产综合在线| 日韩 欧美一区二区三区| 成人h动漫精品| 777午夜精品免费视频| 欧美高清一级片在线观看| 亚洲高清免费视频| 成人免费电影视频| 91精品久久久久久久99蜜桃| 亚洲欧洲韩国日本视频| 男人的j进女人的j一区| 91一区在线观看| 久久综合久久99| 午夜不卡av免费| 色综合久久久网| 国产女同互慰高潮91漫画| 日韩成人一级片| 色网站国产精品| 欧美激情在线一区二区三区| 日日夜夜免费精品| 欧美视频一区二区三区| 中文字幕av免费专区久久| 看片的网站亚洲| 欧美精品色综合| 一区二区三区在线观看国产 | 97久久精品人人爽人人爽蜜臀| 久久蜜桃av一区精品变态类天堂 | 国产精品久久久久久久岛一牛影视| 一区二区三区四区国产精品| 国产a精品视频| 日韩一级片在线观看| 亚洲va中文字幕| 色丁香久综合在线久综合在线观看| 久久久高清一区二区三区| 美日韩一区二区| 51精品国自产在线| 亚洲自拍偷拍麻豆| 欧洲日韩一区二区三区| 最新久久zyz资源站| 成人动漫中文字幕| 中文字幕第一页久久| 国产精品456露脸| 久久久国产精品麻豆| 国产传媒日韩欧美成人| 日韩欧美国产一区在线观看| 青青国产91久久久久久| 日韩视频免费观看高清完整版在线观看 | 成人动漫一区二区| 精品盗摄一区二区三区| 琪琪一区二区三区| 在线综合亚洲欧美在线视频| 亚洲成人免费视| 91麻豆精品国产91| 轻轻草成人在线| 精品国产乱码久久久久久浪潮 | 亚洲bdsm女犯bdsm网站| 欧美日韩大陆一区二区| 亚洲成国产人片在线观看| 欧美日本在线播放| 婷婷成人综合网| 精品日韩av一区二区| 国产麻豆视频精品| 国产精品人人做人人爽人人添| av欧美精品.com| 一区二区三区免费观看| 在线电影一区二区三区| 国产资源在线一区| 国产精品乱码久久久久久| 色88888久久久久久影院野外| 亚洲网友自拍偷拍| 日韩欧美你懂的| 成人性生交大片免费看中文| 亚洲靠逼com| 日韩视频中午一区| www.视频一区| 无吗不卡中文字幕| 国产色产综合产在线视频| 色婷婷久久久亚洲一区二区三区| 天天操天天色综合| 国产区在线观看成人精品| 欧美自拍偷拍一区|