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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 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!

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av第一页| 日av在线不卡| kk眼镜猥琐国模调教系列一区二区| 欧美精品一区二区在线观看| 免费三级欧美电影| 欧美大白屁股肥臀xxxxxx| 精品影视av免费| 久久久不卡影院| 不卡的看片网站| 亚洲午夜三级在线| 日韩女优视频免费观看| 国产91高潮流白浆在线麻豆| 亚洲人吸女人奶水| 欧美人伦禁忌dvd放荡欲情| 久久精品国产精品亚洲精品| 国产三区在线成人av| 99精品在线观看视频| 亚洲午夜精品在线| www久久精品| 97se狠狠狠综合亚洲狠狠| 午夜精品久久久久久| 精品国产伦一区二区三区观看体验 | 99国产精品久久| 亚洲成av人影院| 337p粉嫩大胆色噜噜噜噜亚洲| 丁香婷婷综合色啪| 无吗不卡中文字幕| 中文字幕欧美激情| 91精品婷婷国产综合久久竹菊| 国产在线国偷精品产拍免费yy | 精品久久久久久综合日本欧美| voyeur盗摄精品| 日韩综合小视频| 国产精品久久99| 欧美一区二区高清| 一本色道亚洲精品aⅴ| 毛片不卡一区二区| 一区二区三区国产| 国产欧美精品国产国产专区| 欧美日韩国产影片| 99re热视频这里只精品| 久久国产乱子精品免费女| 亚洲最快最全在线视频| 久久久国产综合精品女国产盗摄| 欧美视频三区在线播放| 成人精品在线视频观看| 久久国产尿小便嘘嘘尿| 午夜欧美在线一二页| 国产精品国产三级国产普通话99| 欧美大尺度电影在线| 欧美三级电影在线观看| 97久久超碰国产精品电影| 国产在线播放一区二区三区| 人禽交欧美网站| 亚洲自拍偷拍图区| 亚洲欧美综合色| 国产校园另类小说区| 日韩欧美国产1| 欧美精品18+| 欧美色欧美亚洲另类二区| 91香蕉视频污在线| 成人不卡免费av| 粉嫩av一区二区三区| 国产最新精品免费| 激情综合亚洲精品| 久久国内精品自在自线400部| 五月激情综合色| 婷婷综合另类小说色区| 亚洲一区二区三区中文字幕在线| 亚洲欧美另类图片小说| 国产精品区一区二区三区| 亚洲国产成人私人影院tom| 久久久精品蜜桃| 久久一区二区视频| 欧美国产综合色视频| 欧美激情在线一区二区三区| 国产精品系列在线| 国产精品久久久久天堂| 国产精品国产三级国产专播品爱网| 国产校园另类小说区| 国产日韩欧美电影| 国产精品久久久久婷婷二区次| 国产精品久久夜| 日韩伦理电影网| 亚洲精品国产精华液| 亚洲大尺度视频在线观看| 亚洲成人黄色小说| 麻豆成人91精品二区三区| 国产乱理伦片在线观看夜一区| 国产精品91一区二区| 成人av先锋影音| 日本高清成人免费播放| 欧美日韩精品一区二区在线播放 | 日韩无一区二区| 精品少妇一区二区三区在线视频| 欧美mv日韩mv国产网站| 国产午夜久久久久| 亚洲视频一区二区免费在线观看| 亚洲另类春色国产| 日本亚洲三级在线| 国产麻豆视频精品| 一本久久a久久免费精品不卡| 欧美三片在线视频观看| 精品噜噜噜噜久久久久久久久试看| www激情久久| 亚洲精品五月天| 久久精品久久精品| 成人免费高清视频| 欧美视频三区在线播放| 精品动漫一区二区三区在线观看| 中文字幕av不卡| 日韩高清一区二区| 成人一区在线观看| 欧洲视频一区二区| 久久众筹精品私拍模特| 亚洲在线观看免费| 国产剧情一区二区三区| 欧美性大战久久| 中文字幕电影一区| 日韩电影在线免费观看| 不卡一区中文字幕| 欧美一三区三区四区免费在线看| 中文字幕第一区| 蜜臀精品久久久久久蜜臀| 91免费观看在线| 2021国产精品久久精品| 亚洲一区二区三区中文字幕| 国产乱码精品一品二品| 在线播放91灌醉迷j高跟美女| 久久精品男人天堂av| 日韩国产精品久久| 91激情五月电影| 国产欧美日韩另类视频免费观看| 亚洲va欧美va天堂v国产综合| 成人免费高清视频在线观看| 日韩免费高清电影| 亚洲国产va精品久久久不卡综合| 国产91精品精华液一区二区三区 | 欧美精品久久一区二区三区| 国产精品午夜在线观看| 久久精品国产99| 欧美精品第1页| 一区二区三区四区高清精品免费观看| 国产精品一区二区不卡| 日韩欧美在线综合网| 亚洲精品高清在线| proumb性欧美在线观看| 久久精品视频免费观看| 久久99热这里只有精品| 欧美电影一区二区| 亚洲国产日韩综合久久精品| 91理论电影在线观看| 国产精品免费久久久久| 国产一区二区三区综合| 精品国产露脸精彩对白| 蜜桃精品视频在线观看| 91精品国产全国免费观看| 图片区日韩欧美亚洲| 欧美日韩一区二区电影| 亚洲小少妇裸体bbw| 欧美在线免费播放| 一区二区三区在线视频免费 | 95精品视频在线| 国产精品美女久久久久久久| 国产一区二区剧情av在线| 精品国产91九色蝌蚪| 狠狠色综合日日| 久久久久久久电影| 国产999精品久久久久久绿帽| 久久久亚洲午夜电影| 国产成人无遮挡在线视频| 国产午夜亚洲精品理论片色戒| 国产精品系列在线观看| 国产欧美一区二区三区鸳鸯浴| 国产一区二区影院| 国产精品无码永久免费888| 成人免费看片app下载| 最新国产成人在线观看| 91精彩视频在线| 天天综合天天做天天综合| 欧美一区在线视频| 国产一区二区三区美女| 国产嫩草影院久久久久| 99久久精品情趣| 一区二区三区四区av| 欧美日韩一本到| 蜜臀av性久久久久蜜臀aⅴ流畅| 欧美www视频| 成人avav在线| 亚洲国产精品久久艾草纯爱| 日韩精品影音先锋| 成人精品视频一区二区三区| 亚洲精品ww久久久久久p站| 91精品国产综合久久小美女| 国产一区二区调教| 亚洲精品日产精品乱码不卡| 欧美一区二区日韩| 成人午夜av在线| 天天综合天天综合色| 久久免费美女视频|