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

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

?? 93xcxx.asm

?? PIC系列單片機典型應用程序集
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
	retlw   error           ;RDY status was not present in the alloted
				;time, return with error status.
rdynoerr
IF      wire3
;setup RA1 back to output
	movlw   0               ;set porta as output
	tris    serial          ;      / 
ENDIF
	retlw   no_err

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

				;See will control the entire operation of a
				;93CX6 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 93CX6 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     
	movf    cmd,w           ;save cmd
	movwf   temp_cmd
	movf    addr,w          ;save addr
	movwf   temp_addr       ;
	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 93CX6.
	strtbt                  ;Send a start bit.
;
	btfsc   cmd,7           ;bit 7 = 0?
IF      XC46
	goto    sca8            ;xfer 8 bit cmd/adr
ENDIF
IF      LC468
	goto    sca9            ;xfer 9 bit cmd/adr
ENDIF
IF      H16     
	goto    sca10           ;xfer 10 bit cmd/adr
ENDIF
IF      H8
	goto    sca11           ;xfer 11 bit cmd/adr
ENDIF

;        goto    set_cmd_addr    ;no then set cmd/addr
	btfss   cmd,6           ;bit 6 = 0 ?   
IF      XC46
	goto    sc8             ;xfer 8 bit cmd/adr
ENDIF
IF      LC468
	goto    sc9             ;xfer 9 bit cmd/adr
ENDIF   
IF      H16     
	goto    sc10            ;xfer 10 bit cmd/adr
ENDIF
IF      H8
	goto    sc11            ;xfer 11 bit cmd/adr
ENDIF
;        goto    set_cmd         ;yes then set cmd
IF      XC46
	goto    sca8            ;xfer 8 bit cmd/adr
ENDIF
IF      LC468
	goto    sca9            ;xfer 9 bit cmd/adr
ENDIF
IF      H16     
	goto    sca10           ;xfer 10 bit cmd/adr
ENDIF
IF      H8
	goto    sca11           ;xfer 11 bit cmd/adr
ENDIF

;        goto    set_cmd_addr    ;else set cmd/addr
see1
	movf    temp_cmd,w      ;retore cmd     
	movwf   cmd             ;       /
	movf    temp_addr,w     ;restore addr
	movwf   addr            ;       /
	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; 93CX6
				;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 93CX6.
	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 93CX6 data word.
	call    din8            ;Input the upper byte.
IF      org8
ELSE
	incf    fsr             ;Increment the File Select Register to point
				;to the register receiving the lower byte.
	call    din8            ;Input 8 more bits.
ENDIF
	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 93CX6 data
				;word to be transmitted.
	call    dout8           ;Output that byte.
IF      org8
ELSE
	incf    fsr            ;Increment the File Select Register to point
			       ;to the lower byte.
	call    dout8          ;Output the lower byte of the 16 bit 93CX6
			       ;data word.
ENDIF
	goto    exit2_          ;Exit with a status check.

;
;
IF      XC46
sca8
	movlw   b'11000000'     ;clr all but hi 2
	andwf   cmd,w           ;save in w
	iorwf   addr            ;mask in addr.
	incf    fsr             ;inc FSR
	call    dout8           ;output
	goto    see1            ;return
ENDIF
IF      LC468
;
sca9
	bcf     addr,7          ;clr hi of addr
	btfsc   cmd,6           ;xfer cmd's bit 6
	bsf     addr,7          ;to addr's bit 7
	call    dout9           ;output
	goto    see1            ;return
ENDIF
IF      H16
;
sca10   
	call    dout10          ;output cmd reg
	goto    see1            ;return
ENDIF                
;
IF      H8
sca11
	bcf     cmd,5           ;xfer cmd's bit 3 to
	btfsc   cmd,3           ;cmd's bit 5
	bsf     cmd,5           ;       /
	call    dout11          ;output
	goto    see1            ;return
;
ENDIF
;
;
;
IF      XC46
sc8
	movf    cmd,w           ;get command
	movwf   addr            ;save in addr
	incf    fsr             ;inc pointer
	call    dout8           ;output
	goto    see1            ;return
;
ENDIF
IF      LC468
sc9     
	rlf     cmd,w           ;rotate cmd left
	movwf   addr            ;save in addr
	call    dout9           ;xfer 9 bits
	goto    see1            ;return
ENDIF
IF      H16
;
sc10    
	rlf     cmd             ;rotate cmd
	rlf     cmd,w           ;left twice
	movwf   addr            ;save in addr
	clrf    cmd             ;clear command
	call    dout10          ;xfer 10 bits
	goto    see1            ;return
ENDIF
;
IF      H8
sc11
	bcf     addr,7          ;xfer cmd's bit 4
	btfsc   cmd,4           ;to addr's bit 7
	bsf     addr,7          ;       /
	call    dout11          ;xfer 11 bits
	goto    see1            ;return
ENDIF
;********************************************************************
;*                      Test Program                                *
;********************************************************************
	main                    ;We've include a sample program to exercise
				;the PIC to 93C66 interface using a simple
				;erase, write and verify routine.
				;8 bit organization has been used
				;with a 3 wire interface.
	
	clrf    serial          ;Clear the port tied to the 93C66 device.
	movlw   b'11110000'     ;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 93C66 device.

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

				;Write loop:
tstptrn equ     0xAA            ;Define the test pattern to be written.

	movlw   write           ;Load W with the Write command.
	movwf   cmd             ;Transfer W into cmd register.
	movlw   tstptrn         ;Intialize the 93C66 data registers with
				;write data.
	movwf   highb           ;load in high byte only
				;since 8 bit low byte is ignored
	clrf    addr            ;start at addr 0
test1   call    see             ;Write data word into 93C66 device.
	xorlw   error           ;Check completion status.
	btfsc   status,zflag    ;Test for error condition.
	goto    errloop         ;Yes, bad completion status, error-out.
	incfsz  addr            ;No, increment the 8 bit memory address
				;field.
	goto    test1           ;write another location
	btfss   cmd,3           ;see if all done
	goto    wrt_nxt_pg      ;no then write next page
	goto    read_tst        ;read written data
wrt_nxt_pg
	bsf     cmd,3           ;set page bit
	goto    test1           ;No, write another location.

				;Read loop:
read_tst
	movlw   read            ;Load W with the Read command.
	movwf   cmd             ;Transfer W into cmd register.
test2   call    see             ;Read addressed data word from 93C66 device.
	movlw   tstptrn         ;Load W with the pattern written.
	subwf   highb,w         ;Verify the data read against what was
				;written.
	btfss   status,zflag    ;Same?
	goto    errloop         ;No, error-out.
	incfsz  addr            ;Yes, both byte correct, increment the 8 bit
				;memory address field.
	goto    test2           ;do next byte
	btfss   cmd,3           ;check page bit
	goto    rd_nxt_pg       ;no then chk next page
	goto    allok           ;all done!!!
rd_nxt_pg
	bsf     cmd,3           ;set page bit
	goto    test2           ;No, read another location.

allok   goto    allok           ;Home safe!
;
;
errloop
	goto    errloop
;
;
;
;KEY DEFINITIONS
;
	ORG     PIC54
SYS_RESET
	GOTO    START
;
	END



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久夜| 中文文精品字幕一区二区| 成人激情动漫在线观看| 天堂成人免费av电影一区| 国产日韩影视精品| 日韩欧美中文字幕精品| 日本高清不卡视频| 懂色av一区二区三区免费观看| 日韩专区欧美专区| 亚洲美女视频在线| 国产精品毛片久久久久久久| 日韩午夜精品电影| 欧美日韩亚洲另类| www.亚洲精品| 成人av免费在线| 国产尤物一区二区| 久久国产福利国产秒拍| 亚洲不卡一区二区三区| 亚洲免费伊人电影| 最新不卡av在线| 国产精品萝li| 国产农村妇女毛片精品久久麻豆| 欧美电影免费观看高清完整版| 欧美日韩国产一级片| 在线观看免费一区| 91丨九色丨国产丨porny| 成人激情午夜影院| 国产高清精品久久久久| 国产精品正在播放| 国产精品88888| 成人小视频在线观看| 国产**成人网毛片九色| 国产传媒久久文化传媒| 高清不卡一二三区| 成人午夜电影网站| 成人免费福利片| 成人免费观看av| 99久久久免费精品国产一区二区| av成人动漫在线观看| 99精品久久只有精品| 色欧美乱欧美15图片| 色94色欧美sute亚洲线路二 | 男女男精品网站| 免费观看一级欧美片| 久草精品在线观看| 国产成人午夜99999| 成人国产视频在线观看| 色综合色综合色综合| 91福利在线看| 欧美福利视频一区| 欧美一三区三区四区免费在线看| 欧美一区二区三区视频免费播放| 日韩欧美不卡一区| 国产视频视频一区| 亚洲精品中文字幕乱码三区| 亚洲图片一区二区| 麻豆精品视频在线| 国产一区二区三区黄视频| 成人免费视频网站在线观看| 色狠狠综合天天综合综合| 91麻豆精品国产| 亚洲精品一区二区三区福利| 国产欧美精品在线观看| 亚洲日本乱码在线观看| 午夜欧美电影在线观看| 麻豆久久久久久| 波多野结衣一区二区三区| 在线欧美日韩精品| 欧美成人精品1314www| 国产精品盗摄一区二区三区| 亚洲一区av在线| 久久se精品一区精品二区| av动漫一区二区| 在线成人免费观看| 久久久久国色av免费看影院| 亚洲欧美日韩在线| 久久精品久久综合| 99久精品国产| 欧美不卡在线视频| 亚洲黄色尤物视频| 国产一区二三区| 欧美在线你懂得| 久久婷婷成人综合色| 亚洲一二三四区| 国产精华液一区二区三区| 色94色欧美sute亚洲13| 精品久久久久99| 洋洋成人永久网站入口| 国产乱码精品一区二区三| 欧美日韩国产综合一区二区三区| 国产视频一区二区在线观看| 日韩影院免费视频| 91免费视频网| 久久精品视频免费| 午夜久久电影网| 91在线小视频| 国产亚洲成年网址在线观看| 日韩精品久久久久久| 99久久精品国产麻豆演员表| 欧美成人猛片aaaaaaa| 亚洲国产精品影院| 97精品国产露脸对白| 久久亚洲一级片| 免费精品视频在线| 欧美少妇bbb| 亚洲视频免费观看| 国产精华液一区二区三区| 日韩欧美一区二区视频| 亚洲成人资源在线| 色偷偷久久一区二区三区| 日本一区二区动态图| 精品一区二区三区不卡 | 国产精品一级在线| 91精品黄色片免费大全| 一区二区三区四区在线免费观看| 国产精品99久久久久久久女警| 欧美一区二区三区在线| 亚洲国产精品嫩草影院| 91丨porny丨户外露出| 国产精品丝袜91| 高清视频一区二区| 国产无一区二区| 国内精品视频一区二区三区八戒| 7777精品伊人久久久大香线蕉最新版| 亚洲综合免费观看高清在线观看| 成人18精品视频| 国产精品理论片在线观看| 成人丝袜视频网| 中文av一区特黄| av在线不卡免费看| 亚洲欧洲精品天堂一级| jlzzjlzz亚洲女人18| 国产精品嫩草影院com| 成人免费毛片高清视频| 中文字幕亚洲电影| 91视频国产观看| 尤物av一区二区| 欧洲一区二区三区在线| 亚洲一区欧美一区| 欧美日韩和欧美的一区二区| 三级久久三级久久久| 日韩久久免费av| 国内外成人在线| 国产亚洲欧洲997久久综合| 成人美女在线视频| 亚洲天堂成人在线观看| 在线视频你懂得一区| 日韩精品每日更新| 欧美精品一区二区三区蜜桃视频 | 色综合久久中文字幕综合网| 一区二区三区四区不卡视频| 欧美色精品天天在线观看视频| 日韩极品在线观看| 久久综合狠狠综合| 91丨porny丨中文| 亚洲二区在线观看| 精品国产精品网麻豆系列| 国产精品香蕉一区二区三区| 亚洲欧洲一区二区在线播放| 欧亚洲嫩模精品一区三区| 三级久久三级久久久| 国产三级三级三级精品8ⅰ区| 北岛玲一区二区三区四区| 亚洲成人免费观看| 精品久久一区二区三区| 99国内精品久久| 免费人成在线不卡| 中文字幕国产精品一区二区| 欧美午夜视频网站| 精品一区二区三区的国产在线播放 | 亚洲品质自拍视频| 91麻豆精品国产无毒不卡在线观看| 国产一区视频在线看| 亚洲综合在线视频| 久久夜色精品一区| 欧美亚洲愉拍一区二区| 经典三级视频一区| 亚洲女同一区二区| 亚洲精品一区二区三区四区高清 | 欧美白人最猛性xxxxx69交| 不卡av免费在线观看| 无吗不卡中文字幕| 国产清纯白嫩初高生在线观看91| 欧美无砖砖区免费| 国产91在线|亚洲| 免费观看在线色综合| 亚洲日本一区二区三区| 亚洲精品一区二区三区在线观看| 91福利视频久久久久| 狠狠色狠狠色综合日日91app| 亚洲宅男天堂在线观看无病毒| www国产亚洲精品久久麻豆| 欧美日韩一区二区不卡| 成人午夜在线播放| 九九热在线视频观看这里只有精品| 亚洲激情中文1区| 国产精品入口麻豆原神| 精品日韩在线一区| 欧美理论在线播放| 91麻豆swag|