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

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

?? 93c46.asm

?? PIC16CXX C語言工具
?? 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一区二区三区免费野_久草精品视频
亚洲另类色综合网站| 国产福利不卡视频| 国产美女主播视频一区| 91成人免费电影| 久久综合久色欧美综合狠狠| 亚洲激情在线播放| 国产乱码精品一区二区三区忘忧草| 日本乱人伦aⅴ精品| 国产午夜久久久久| 裸体健美xxxx欧美裸体表演| 日本道在线观看一区二区| 久久综合国产精品| 日本美女视频一区二区| 日本黄色一区二区| 国产三级欧美三级日产三级99| 日韩高清在线一区| 日本韩国一区二区三区视频| 国产精品久久久久久久久动漫| 蜜桃av一区二区在线观看| 欧美视频在线播放| 一区二区三区在线免费| 波多野洁衣一区| 国产精品入口麻豆原神| 国内精品写真在线观看| 精品免费一区二区三区| 亚洲成人av一区二区三区| 在线精品观看国产| 一区二区三区视频在线观看| 99久久久精品| 亚洲人成在线观看一区二区| 不卡一区在线观看| 国产精品美女久久久久久2018 | 丰满亚洲少妇av| 欧美成人猛片aaaaaaa| 日本伊人精品一区二区三区观看方式 | 欧美日韩情趣电影| 伊人开心综合网| 色狠狠一区二区三区香蕉| 国产精品日韩成人| 99精品国产99久久久久久白柏| 日本一区二区三区在线不卡| 成人性生交大合| 国产精品色噜噜| 97se亚洲国产综合在线| 亚洲伊人伊色伊影伊综合网| 欧美亚洲国产bt| 日韩精品成人一区二区三区| 日韩午夜小视频| 国产麻豆精品视频| 国产精品色眯眯| 色哦色哦哦色天天综合| 亚洲成av人片一区二区三区| 欧美一区二区三区四区久久| 狠狠色狠狠色合久久伊人| 久久久精品2019中文字幕之3| 国产69精品久久久久毛片| 国产精品短视频| 色婷婷av一区二区| 日日噜噜夜夜狠狠视频欧美人| 欧美一区二区三区免费视频| 精品一区二区三区在线观看国产| 久久久精品一品道一区| 色琪琪一区二区三区亚洲区| 日本成人在线电影网| 337p日本欧洲亚洲大胆色噜噜| 成人一区二区三区中文字幕| 一片黄亚洲嫩模| 2020日本不卡一区二区视频| 色婷婷精品久久二区二区蜜臂av | 久久精品国产999大香线蕉| 国产日韩精品一区二区浪潮av | 亚洲黄色av一区| 日韩一级高清毛片| 99精品国产91久久久久久| 日本亚洲免费观看| 亚洲视频你懂的| 精品av久久707| 欧美三级乱人伦电影| 国产伦精品一区二区三区免费| 亚洲天堂a在线| 日韩你懂的在线播放| 97精品视频在线观看自产线路二| 美女尤物国产一区| 依依成人综合视频| 国产精品欧美一区二区三区| 7777精品伊人久久久大香线蕉最新版| 国产精品一区二区在线播放| 婷婷综合久久一区二区三区| 国产精品欧美一区二区三区| 欧美一激情一区二区三区| 一本色道久久综合亚洲精品按摩| 韩日欧美一区二区三区| 午夜精品久久久久久不卡8050| 日本一区二区三区免费乱视频| 91精品国产手机| 欧美性高清videossexo| 高清国产一区二区| 激情综合网天天干| 亚洲成av人片在线| 一区二区三区精品| 亚洲欧美一区二区三区久本道91| 久久综合色婷婷| 欧美一级久久久久久久大片| 欧美在线观看你懂的| 99久久国产综合精品女不卡 | 视频一区二区中文字幕| 国产精品第五页| 中文字幕一区二区三区四区 | 精品国产3级a| 日韩免费高清av| 91精品啪在线观看国产60岁| 欧美日韩中字一区| 欧美在线一区二区三区| 色欧美片视频在线观看在线视频| av一区二区三区在线| 成人免费视频app| 成人一区二区三区视频在线观看| 国产一区美女在线| 国产在线视频一区二区| 激情五月婷婷综合网| 韩国一区二区视频| 国产电影一区在线| 不卡在线观看av| 一本大道久久a久久综合婷婷| 91麻豆免费在线观看| 色综合天天综合在线视频| 色综合久久久久久久久久久| 日本精品一级二级| 91.com视频| 久久一区二区视频| 国产精品色噜噜| 一区二区三区久久久| 婷婷开心久久网| 国产成人8x视频一区二区| 成人永久免费视频| 91在线精品一区二区| 在线免费不卡视频| 91精品国产高清一区二区三区| 日韩一卡二卡三卡| 国产精品久久久久影院亚瑟 | 亚瑟在线精品视频| 麻豆91小视频| 成人免费三级在线| 欧美日韩亚洲综合在线| 精品久久久三级丝袜| 久久久不卡影院| 亚洲激情校园春色| 韩国精品主播一区二区在线观看 | 久久精品视频免费观看| ●精品国产综合乱码久久久久 | 久久精品免费观看| av在线一区二区三区| 制服丝袜日韩国产| 欧美国产日本韩| 亚洲mv在线观看| 国产99久久久精品| 欧美精品在线视频| 欧美激情资源网| 亚洲国产一区在线观看| 国内成人精品2018免费看| 91麻豆高清视频| 久久久亚洲精品一区二区三区| 亚洲黄色性网站| 国产精品18久久久久久久久| 欧洲激情一区二区| 国产日产欧美一区二区视频| 夜夜嗨av一区二区三区网页 | 久久伊人中文字幕| 亚洲一区二区三区不卡国产欧美| 国产做a爰片久久毛片| 精品视频1区2区3区| 国产精品久久久久久福利一牛影视| 日韩二区在线观看| 91电影在线观看| 国产精品久久看| 国产一区二区三区四区五区美女| 欧美日本一区二区三区四区| 自拍偷拍国产亚洲| 粉嫩一区二区三区在线看| 日韩一区二区三区视频| 亚洲国产一区二区a毛片| 成人黄色在线网站| 欧美精品一区二区蜜臀亚洲| 午夜精品aaa| 在线精品国精品国产尤物884a| 国产精品免费看片| 国产一区二区成人久久免费影院| 91精选在线观看| 亚洲午夜一区二区| 91丨九色丨黑人外教| 国产精品网友自拍| 国产福利不卡视频| 日本一区二区成人| 东方aⅴ免费观看久久av| 久久这里只有精品视频网| 美女网站色91| 日韩欧美专区在线| 蜜桃久久精品一区二区| 日韩视频在线永久播放| 日本欧美肥老太交大片|