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

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

?? 93c46.asm

?? Microchip pic c source code
?? 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一区二区三区免费野_久草精品视频
亚洲狠狠爱一区二区三区| 日韩一区中文字幕| 3d动漫精品啪啪| 欧美日韩三级视频| 欧美精品久久99久久在免费线 | 午夜亚洲国产au精品一区二区| 国产精品久久久久婷婷二区次| 国产欧美精品一区二区色综合| 日韩美女天天操| 久久先锋资源网| 欧美国产禁国产网站cc| 国产精品视频你懂的| 亚洲欧洲99久久| 亚洲一区二区三区在线看| 亚洲午夜av在线| 美腿丝袜在线亚洲一区| 青青草成人在线观看| 久久精品999| 成人精品一区二区三区四区| 一本一道久久a久久精品| 欧美色区777第一页| 日韩欧美亚洲国产精品字幕久久久| 欧美大片免费久久精品三p| 久久麻豆一区二区| 亚洲色图欧美在线| 日韩电影免费一区| 国产成人自拍网| 欧洲av在线精品| 日韩三级在线免费观看| 亚洲国产激情av| 亚洲一二三四久久| 国内精品写真在线观看| 99re66热这里只有精品3直播 | 99麻豆久久久国产精品免费优播| 91黄色激情网站| 精品国产一区二区三区四区四| 欧美国产日韩精品免费观看| 亚洲a一区二区| 丁香另类激情小说| 精品视频一区 二区 三区| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 一本一本大道香蕉久在线精品| 欧美日韩精品一区视频| 国产校园另类小说区| 亚洲国产精品精华液网站| 国产成人精品一区二区三区四区| 欧洲av一区二区嗯嗯嗯啊| 国产亚洲一区二区三区在线观看 | 国产精品亚洲午夜一区二区三区| 日本乱人伦一区| 久久九九全国免费| 蜜臂av日日欢夜夜爽一区| 91视频免费播放| 国产亚洲婷婷免费| 理论片日本一区| 色婷婷综合在线| 国产精品二区一区二区aⅴ污介绍| 久久91精品久久久久久秒播| 欧美亚男人的天堂| 亚洲欧美日韩小说| 成人午夜av电影| 久久免费精品国产久精品久久久久| 日韩综合一区二区| 欧美性三三影院| 亚洲一区在线视频观看| 99久久综合精品| 欧美国产在线观看| 国产成人在线视频网址| 亚洲精品在线网站| 黑人精品欧美一区二区蜜桃| 日韩欧美第一区| 麻豆成人91精品二区三区| 在线播放91灌醉迷j高跟美女| 午夜日韩在线电影| 欧美二区在线观看| 日本91福利区| 精品国产自在久精品国产| 韩国欧美一区二区| 日本一区二区三区国色天香| 国产精品1区二区.| 精品久久久久99| 国产在线国偷精品产拍免费yy| 日韩欧美亚洲国产精品字幕久久久| 蜜臂av日日欢夜夜爽一区| 久久综合中文字幕| 国产精品538一区二区在线| 日本一区二区综合亚洲| 色综合夜色一区| 亚洲精品亚洲人成人网| 欧美视频一区二| 日本va欧美va瓶| 久久久久久免费毛片精品| jvid福利写真一区二区三区| 91精品国产全国免费观看| 亚洲午夜久久久久久久久电影院 | 中文乱码免费一区二区| youjizz久久| 夜夜精品浪潮av一区二区三区| 欧美写真视频网站| 久久成人免费电影| 国产精品久久看| 欧美视频三区在线播放| 精品综合免费视频观看| 国产精品国产自产拍高清av王其 | 免费高清成人在线| 国产女主播在线一区二区| 97精品久久久久中文字幕| 亚洲成人av在线电影| 日韩一区二区在线观看视频| 一区二区三区.www| 欧美日韩亚洲另类| 国产高清成人在线| 亚洲一区在线观看免费观看电影高清| 欧美日韩精品欧美日韩精品一综合| 国内久久精品视频| 亚洲国产精品久久人人爱| 久久久久久久久久久久电影| 一本色道久久加勒比精品| 国内外成人在线| 性感美女久久精品| 亚洲人成网站在线| 2020国产精品自拍| 欧美群妇大交群中文字幕| 成人美女视频在线观看| 蜜桃av一区二区在线观看 | www日韩大片| 欧美性猛交一区二区三区精品| 国产露脸91国语对白| 亚洲一区二区三区视频在线播放| 欧美成人乱码一区二区三区| 99免费精品在线观看| 国模无码大尺度一区二区三区| 一区二区三区av电影| 国产精品久久久久久久岛一牛影视| 91超碰这里只有精品国产| 色综合天天综合狠狠| 国产在线视频不卡二| 午夜精品123| 亚洲综合激情网| 亚洲男同性恋视频| 综合av第一页| 26uuu欧美日本| 91精品视频网| 欧美电影一区二区| 欧美精品日韩一区| 欧美手机在线视频| 欧美性一区二区| 在线观看日韩精品| 欧美三级中文字| 欧美亚洲愉拍一区二区| 欧洲国内综合视频| 在线观看亚洲成人| 欧美日韩久久久久久| 欧美亚洲国产一区二区三区| 欧美在线色视频| 欧美人妖巨大在线| 欧美日韩1234| 欧美日韩不卡在线| 日韩欧美色电影| 久久亚洲综合av| 欧美国产日本视频| 亚洲蜜臀av乱码久久精品蜜桃| 亚洲丝袜自拍清纯另类| 亚洲免费三区一区二区| 一二三区精品视频| 日韩av在线发布| 精品一区二区久久| 国产91精品一区二区麻豆网站 | 欧美三电影在线| 在线91免费看| 久久精品亚洲精品国产欧美| 中文字幕一区二区三区在线播放| 国产精品国产三级国产普通话蜜臀 | 日本高清视频一区二区| 欧美欧美午夜aⅴ在线观看| 精品成人在线观看| 18成人在线观看| 日本成人中文字幕| 国产成人免费视频网站高清观看视频 | 精品日产卡一卡二卡麻豆| 久久一二三国产| 尤物av一区二区| 久久精品国内一区二区三区| www.欧美.com| 4438成人网| 国产精品视频第一区| 午夜精品123| 成人动漫在线一区| 777精品伊人久久久久大香线蕉| 久久久久久久久99精品| 亚洲韩国精品一区| 成人手机电影网| 日韩一区二区免费视频| 夜夜精品视频一区二区 | 一区二区三区在线观看视频| 热久久久久久久| 91香蕉视频在线| 欧美国产亚洲另类动漫| 奇米影视7777精品一区二区| 色偷偷久久一区二区三区|