亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
午夜伦欧美伦电影理论片| 亚洲欧美日韩国产手机在线| 久久午夜国产精品| 一区二区三区在线影院| 激情久久久久久久久久久久久久久久| www.色综合.com| 精品毛片乱码1区2区3区| 亚洲一区二区三区精品在线| 成人午夜在线视频| 久久综合av免费| 午夜不卡av在线| 在线观看免费成人| 亚洲欧美偷拍卡通变态| 国产一区二区毛片| 精品久久久久久综合日本欧美| 亚洲一级电影视频| 色呦呦网站一区| 国产精品福利影院| 成人毛片老司机大片| 久久色.com| 国产一区中文字幕| 精品国产一区二区三区不卡| 青青国产91久久久久久| 成人免费的视频| 国产亚洲欧洲997久久综合| 欧美精品一区二区久久婷婷| 日本美女一区二区三区视频| 欧美日韩国产大片| 色综合婷婷久久| 午夜精品免费在线| 色综合一区二区三区| 久久久久久久久久久99999| 日本成人在线视频网站| 欧美挠脚心视频网站| 亚洲va中文字幕| 91精品婷婷国产综合久久性色| 香蕉加勒比综合久久 | 精品福利视频一区二区三区| 天天色 色综合| 日韩一区二区在线观看| 美腿丝袜在线亚洲一区| www久久久久| 福利91精品一区二区三区| 国产欧美精品一区aⅴ影院| 99久久综合国产精品| 有坂深雪av一区二区精品| 欧美三级一区二区| 久久精品噜噜噜成人av农村| 久久久久久夜精品精品免费| 成人精品鲁一区一区二区| 亚洲欧美日韩小说| 欧美精品丝袜中出| 国产美女在线精品| 欧美激情在线看| 色哟哟在线观看一区二区三区| 午夜欧美视频在线观看| 久久午夜国产精品| 色一区在线观看| 日产国产欧美视频一区精品| 久久久久97国产精华液好用吗| 不卡的av电影| 日韩高清不卡在线| 欧美国产在线观看| 91精品国产综合久久精品性色| 国产一区二区三区在线看麻豆| 椎名由奈av一区二区三区| 91精品国产综合久久久久久| 成人精品免费看| 日韩精品一级二级| 国产精品久久久久久久久久免费看 | 日韩欧美的一区二区| 国产suv精品一区二区6| 亚洲午夜私人影院| 国产日本欧洲亚洲| 6080yy午夜一二三区久久| 成人福利视频网站| 玖玖九九国产精品| 亚洲国产精品一区二区www| 国产亚洲精品aa午夜观看| 欧美日本视频在线| 成人黄色国产精品网站大全在线免费观看 | 久久91精品国产91久久小草| 亚洲婷婷综合久久一本伊一区| 日韩午夜激情电影| 欧美日韩一区二区三区四区 | 国产福利不卡视频| 日韩精品一级中文字幕精品视频免费观看 | 午夜国产不卡在线观看视频| 国产精品色哟哟| 久久中文娱乐网| 欧美一区二区三区色| 91久久精品一区二区| 国产高清精品网站| 九九九久久久精品| 免费在线观看一区二区三区| 亚洲综合成人网| 亚洲欧美色综合| 国产精品麻豆欧美日韩ww| 久久先锋资源网| 日韩午夜激情免费电影| 欧美一三区三区四区免费在线看| 色婷婷国产精品| 91浏览器打开| 91丨porny丨在线| 99久久99久久久精品齐齐| 国产一区中文字幕| 日韩欧美美女一区二区三区| 91老师片黄在线观看| 成人不卡免费av| 成人免费电影视频| av在线一区二区| av一区二区三区四区| 懂色av一区二区在线播放| 国产精品一区二区三区99| 国产精品自拍av| 国产一区二区三区黄视频 | 91精品国产色综合久久久蜜香臀| 欧美日韩国产综合一区二区三区| 在线观看亚洲成人| 在线观看精品一区| 51精品视频一区二区三区| 欧美一区二区在线视频| 日韩精品影音先锋| 国产欧美日韩激情| 亚洲欧美视频在线观看| 亚洲第一福利一区| 日韩影院精彩在线| 亚洲人123区| 亚洲三级在线免费| 亚洲人成7777| 日韩电影在线免费看| 日韩二区三区四区| 国产精品一区久久久久| 不卡视频在线观看| 在线欧美小视频| 日韩西西人体444www| 亚洲国产成人午夜在线一区| 中文字幕在线观看一区| 午夜精品久久久久久久| 精品一区二区三区在线播放| 国产成人综合在线| 在线精品视频免费播放| 91精品国产综合久久精品| 久久久久久久久久久99999| 亚洲免费伊人电影| 免费人成精品欧美精品| 成人av免费网站| 亚洲影视在线观看| 亚洲精品高清在线| 蜜乳av一区二区| 不卡一区在线观看| 欧美精品第1页| 国产精品免费视频观看| 午夜久久久久久| 成人综合日日夜夜| 欧美日韩视频在线观看一区二区三区| 精品国产第一区二区三区观看体验| 亚洲国产精品成人综合色在线婷婷| 亚洲国产日韩a在线播放性色| 久久99国产精品尤物| 在线免费观看视频一区| 欧美精品一区二区精品网| 亚洲午夜国产一区99re久久| 成人免费av资源| 精品久久国产字幕高潮| 亚洲一区二区三区爽爽爽爽爽| 国产精品996| 日韩一区二区免费视频| 亚洲线精品一区二区三区| 国产寡妇亲子伦一区二区| 51午夜精品国产| 亚洲在线观看免费| 99国产精品久久久| 国产午夜亚洲精品理论片色戒| 日韩成人精品在线观看| 一本大道久久a久久综合| 日本一区二区三级电影在线观看 | 欧美一区二区三区在线电影| 国产精品不卡一区二区三区| 国产精品综合一区二区| 欧美一级搡bbbb搡bbbb| 亚洲超丰满肉感bbw| 色88888久久久久久影院按摩| 日本一区二区三级电影在线观看| 韩日av一区二区| 日韩欧美在线观看一区二区三区| 亚洲主播在线观看| 欧美性猛片aaaaaaa做受| 亚洲日本va午夜在线影院| 99在线视频精品| 国产精品久久午夜夜伦鲁鲁| 国产成人精品一区二| 亚洲国产精品精华液ab| 国产精品一区二区91| 久久午夜电影网| 亚洲狠狠丁香婷婷综合久久久| 777亚洲妇女| 亚洲成人免费影院| 日本韩国欧美一区二区三区| 亚洲欧美国产三级|