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

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

?? 93xcxx.asm

?? PIC16CXX C語言工具
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
		TITLE        "R/W EEPROM"
LIST  P = 16C54
;Serial Eprom interface to PIC16C5X.
;REV 2.0        8/26/92.
;
;Define Equates:
;       
	PIC54   EQU     1FFH
;
PAGE
;
	ORG     0
START
	goto    main            ;run test program
;
PAGE
;
TRUE    EQU     1
FALSE   EQU     0
S93C46  EQU     FALSE
S93LC46 EQU     FALSE
S93C56  EQU     FALSE
S93LC56 EQU     FALSE
S93C66  EQU     TRUE
S93LC66 EQU     FALSE
wire3   equ     TRUE
org8    EQU     FALSE
;
IF      S93LC46
	IF      org8
	LC468   EQU     TRUE
	XC46    EQU     FALSE
	H16     EQU     FALSE
	H8      EQU     FALSE
	ELSE
	LC468   EQU     FALSE
	XC46    EQU     TRUE
	H16     EQU     FALSE
	H8      EQU     FALSE
	ENDIF
ELSE
ENDIF
IF      S93C46
	LC468   EQU     FALSE
	XC46    EQU     TRUE
	H16     EQU     FALSE
	H8      EQU     FALSE
ENDIF
IF      S93C56 + S93C66 + S93LC56 + S93LC66
	IF      org8
	H8      EQU     TRUE
	H16     EQU     FALSE
	LC468   EQU     FALSE
	XC46    EQU     FALSE
	ELSE
	H16     EQU     TRUE
	H8      EQU     FALSE
	LC468   EQU     FALSE
	XC46    EQU     FALSE
	ENDIF
ELSE
ENDIF



;********************************************************************
;*                      Register Assignments                        *
;********************************************************************

indir   equ     0       ;Use this register as source/destination
			;for indirect addressing.
pc      equ     2       ;PIC Program Counter.
status  equ     3       ;PIC Status Register.
fsr     equ     4       ;File Select Register.
serial  equ     5       ;Port used for 93CX6 control. 
			;The following four registers must be
			;located consecutively in memory.
cmd     equ     1a      ;This register contains the 4 bit
			;command op code for 93CX6 as follows:
			;bit 7 msb of command op code
			;bit 6 next bit of op code
			;bit 5 next bit of op code
			;bit 4 lsb of op code
			;bit 3 A8 of address in case of
			;56/66 in 8 bit mode.
addr    equ     1b      ;memory address of lower 7/8 bits
highb   equ     1c      ;Used in read/write routines to store the
			;upper byte of a 16 bit data word,
			;or the data in a 8 bit data word
lowb    equ     1d      ;Used in read/write routines to store the
			;lower byte of a 16 bit data word,
			;or not used in 8 bit data word.

cnthi   equ     1e      ;Used as the upper byte of a sixteen bit
			;loop counter in RDYCHK routine.
cnt     equ     1f      ;Used as the lower byte of a sixteen bit 
			;loop counter in RDYCHK routine, and 
			;elswhere as an eight bit counter.
temp_cmd equ    1e      ;doubles as a temp register for cmd        
temp_addr equ   1f      ;doubles as a temp register for addr

;********************************************************************
;*                      Bit Assignments                             *
;********************************************************************

carry   equ     0               ;Carry Flag of Status Register.
zflag   equ     2               ;Zero Flag of Status Register.

cs      equ     2               ;Port pin tied to CS on 93CX6.
din     equ     1               ;Port pin tied to DI on 93CX6.
dout    equ     1               ;Port pin tied to DO on 93CX6.
clock   equ     3               ;Port pin tied to CLK on 93CX6.

;********************************************************************
;*                      General Assignments                         *
;********************************************************************

no_err  equ     0               
error   equ     1               
tries   equ     20      ;After issuing a WRITE, ERASE, ERAL, or WRAL
			;command, the approximate number of machine
			;cycles X 256 to wait for the RDY status.
			;This value must be adjusted for operating
			;frequencies other than 4 MHz.

read    equ     b'10000000'     ;read command op code
write   equ     b'01000000'     ;write command op code
erase   equ     b'11000000'     ;erase command op code
ewen    equ     b'00110000'     ;erase enable command op code
ewds    equ     b'00000000'     ;erase disable command op code
eral    equ     b'00100000'     ;erase all command op code
wral    equ     b'00010000'     ;write all command op code

;********************************************************************
;*                      Macro Definitions                           *
;********************************************************************

sel     MACRO                   ;Selects the 93CX6 device.
	bsf     serial,cs       ;Chip Select (CS) = '1' to select
	ENDM                    ;the device                

dsel    MACRO                   ;De-select the 93CX6 device.
	bcf     serial,cs       ;Chip Select (CS) = '0' to de-select
				;the device.
	ENDM

strtbt  MACRO                   ;Issue the Start Bit to the 93CX6.
	bsf     serial,din      ;Start Bit = '1'.
	clkit                   ;Clock it out.
	ENDM

clkit   MACRO                   ;Clocks a serial data bit into or out
				;of the 93CX6 device.
	bsf     serial,clock    ;Clock (CLK) = '1'.

	nop             ;Adjust the number of nop instructions
			;between the assertion and de-assertion of
			;CLK in proportion to the PIC operating
			;frequency.  Refer to the 93CX6 data for the
			;minimum CLK period.
				
	bcf     serial,clock    ;Clock (CLK) = '0'.
	ENDM
;
PAGE
;********************************************************************
;*                      DOUTx                                       *
;********************************************************************
;doutxx, outputs up to 11 bits of op code/data, depending on whether
;a 46/56/66 serial eeprom is being used. The number of bits over 8 are
;saved in the cmd register and the rest in the addr register. Before
;calling this routine the cmd and the addr registers should be loaded
;as follows:
;cmd reg.bits 7|6|5|4|3|2|1|0
;--------------|-|-|-|-|-|-|-|
;             X|X|X|X|X|X|X|Y| --> not used
;             X|X|X|X|X|X|Y|X| --> mot used
;             X|X|X|X|X|Y|X|X| --> not used
;             X|X|X|X|Y|X|X|X| --> 9th bit of address if necessary
;             X|X|X|Y|X|X|X|X| --> lsb of command op code
;             X|X|Y|X|X|X|X|X| --> 3rd bit of command op code
;             X|Y|X|X|X|X|X|X| --> 2nd bit of command op code
;             Y|X|X|X|X|X|X|X| --> msb of command op code
;
;addr reg. 6/7/8 bits of address if necessary.

IF      H8
dout11
	bcf     serial,din
	rlf     indir           ;rotate thru carry
	btfsc   status,carry    ;set?        
	bsf     serial,din      ;yes, set output to 1
	clkit                   ;clk data
ENDIF
IF      H16+H8
dout10
	rlf     indir           ;rotate thru carry
	bcf     serial,din      ;set output to 0
	btfsc   status,carry    ;set?
	bsf     serial,din      ;else set output to 1
	clkit                   ;clk data
ENDIF
IF      H8+H16+LC468
dout9
	rlf     indir           ;rotate thru carry
	bcf     serial,din      ;set output to 0
	btfsc   status,carry    ;set?
	bsf     serial,din      ;else set output to 1
	clkit                   ;clk data
	incf    fsr             ;inc pointer
ENDIF
dout8
	movlw   8               ;Initialize loop counter.
	movwf   cnt             
;
d_o_8   bcf     serial,din      ;Assume that the bit to be transfered is a
				;'0'.  Hence, de-assert DI.
	rlf     indir           ;Rotate the actual bit to be transferred into
				;the carry bit.
	btfsc   status,carry    ;Test the carry, if our assumption was
				;correct, skip the next instruction.
	bsf     serial,din      ;No, actual bit was a '1'.  Assert DI.
	clkit                   ;Clock the 93CX6.
	decfsz  cnt             ;Repeat until cnt = 0.
	goto    d_o_8           ;Cnt still > 0.
	rlf     indir           ;Restore register to its original condition.
	bcf     serial,din      ;make sure din is low        
	retlw   no_err          ;Exit with good status.

;********************************************************************
;*                      DIN8                                        *
;********************************************************************
				;Din8 will input 8 bits of data from the
				;93CX6.  Before calling this routine, the FSR
				;must point to the register being used to
				;hold the incomming data.
din8    
IF      wire3
;set up the RA1 as a input before proceeding        
	movlw   b'00000010'     ;set up porta
	tris    serial          ;
ENDIF
	movlw   8               ;Initialize loop counter.
	movwf   cnt             ;

d_i_8   
	rlf     indir           ;Make room for the incomming bit in the
				;destination register.
	bcf     indir,0         ;Assume that the incomming bit is a '0' and
				;clear the LSB of the destination register.
	clkit                   ;Clock a bit in the 93CX6.
	btfsc   serial,dout     ;Test the incomming bit, if our assumption
				;was correct, skip the next instruction.
	bsf     indir,0         ;No, actual bit is a '1'.  Set the LSB of the
				;destination register.
	decfsz  cnt             ;Repeat until cnt = 0.
	goto    d_i_8           ;Cnt still > 0.
IF      wire3
;setup RA1 back to output
	movlw   0               ;set RA1 as output
	tris    serial          ;      / 
ENDIF
	retlw   no_err          ;Exit with good status.

;********************************************************************
;*                      RDYCHK                                      *
;********************************************************************
				;Rdychk will read the 93CX6 READY/BUSY status
				;and wait for RDY status within the alloted
				;number of processor cycles.  If RDY status
				;is not present after this set period, the
				;routine will return with an error status.

rdychk  
IF      wire3
;set up RA1 as a input before proceeding        
	movlw   b'00000010'     ;set up porta
	tris    serial          ;
ENDIF
	movlw   tries           ;Initialize time-out counter.
	movwf   cnthi           ;
	clrf    cnt             ;
	dsel                    ;De-select the 93CX6.

;       nop                     ;NOTE:  Check the 93CX6 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 93CX6.
notrdy  btfsc   serial,dout     ;If DO is a '0', 93CX6 has yet to completed
				;the last operation (still busy).
	goto    rdynoerr        ;skip to no error
	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.
IF      wire3
;setup RA1 back to output
	movlw   0               ;set RA1 as output
	tris    serial          ;      / 
ENDIF

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久综合色一本| 国产三级精品视频| 粉嫩在线一区二区三区视频| 一区二区三区国产豹纹内裤在线| 欧美一级日韩一级| 91亚洲精品久久久蜜桃| 国产一区欧美日韩| 亚洲午夜久久久久中文字幕久| 26uuu国产电影一区二区| 欧美午夜电影一区| 成人性生交大片免费看在线播放| 不卡欧美aaaaa| 国产在线看一区| 图片区小说区区亚洲影院| 中文字幕一区在线观看视频| 26uuu精品一区二区| 91精品国产手机| 在线视频国产一区| 成人av一区二区三区| 国产精品中文有码| 老司机精品视频导航| 亚洲高清不卡在线观看| 综合激情成人伊人| 亚洲国产精品黑人久久久| 精品人在线二区三区| 6080国产精品一区二区| www.亚洲激情.com| 国产**成人网毛片九色| 狠狠色丁香久久婷婷综| 日韩av电影免费观看高清完整版 | 五月婷婷久久综合| 亚洲精品第1页| 国产精品第一页第二页第三页| 91精品国产一区二区三区蜜臀| 色狠狠av一区二区三区| 91在线观看污| 99视频超级精品| 亚洲va韩国va欧美va| 蜜臀91精品一区二区三区| 欧美人伦禁忌dvd放荡欲情| 日本中文字幕一区| 久久婷婷久久一区二区三区| 日韩无一区二区| 久久激情五月婷婷| 日韩精品一区第一页| 一区二区不卡在线播放| 亚洲男女一区二区三区| 一区二区视频在线| 一区二区三区四区激情| 亚洲午夜免费视频| 日日夜夜精品视频免费| 丝袜亚洲精品中文字幕一区| 三级欧美在线一区| 久久精品国产免费看久久精品| 久久99国产精品免费网站| 久久av资源站| 国产精品亚洲专一区二区三区 | 国产精品中文字幕日韩精品| 成人在线视频一区二区| 成人av在线观| 欧美色视频一区| 91精品国产综合久久婷婷香蕉| 精品国产一区二区三区av性色| 久久午夜国产精品| 中文字幕在线不卡| 婷婷丁香久久五月婷婷| 精品在线观看视频| 99久久99久久精品国产片果冻 | 日韩一级片网址| 欧美成人精品福利| 亚洲国产精品成人综合| 一区二区免费看| 理论片日本一区| 成人av午夜影院| 欧美精品1区2区3区| 日韩三级电影网址| 中文字幕一区二区三区精华液| 亚洲一区二区三区激情| 老司机免费视频一区二区| 成人午夜电影久久影院| 欧美日韩中文国产| 欧美高清在线精品一区| 一区二区三区在线观看视频 | 国产精品一区二区不卡| 色婷婷综合久久久久中文一区二区 | 国产欧美日韩麻豆91| 亚洲国产中文字幕| 国产精品亚洲视频| 欧美精品三级日韩久久| 国产精品久久久久久久久久久免费看| 亚洲第一久久影院| 国产成人亚洲综合色影视| 欧美午夜一区二区三区免费大片| 欧美mv日韩mv国产网站app| 一区二区三区在线不卡| 国产伦精品一区二区三区视频青涩| 国产精品一区二区三区乱码| 久久精品999| 91国内精品野花午夜精品| 精品国产123| 亚洲高清视频的网址| 成人影视亚洲图片在线| 日韩一区二区三| 午夜电影一区二区三区| 91在线观看下载| 久久久午夜精品| 日本伊人色综合网| 欧美日韩亚洲另类| 亚洲欧美日本韩国| 国产99久久久久久免费看农村| 7777精品伊人久久久大香线蕉经典版下载 | 久久美女高清视频| 日韩高清在线一区| 欧美三级欧美一级| 一级精品视频在线观看宜春院 | 亚洲成人免费视频| 99精品欧美一区二区三区小说 | 青青青爽久久午夜综合久久午夜| 91视频一区二区三区| 国产女人18毛片水真多成人如厕| 久久电影国产免费久久电影| 欧美日韩国产成人在线免费| 亚洲一区二区四区蜜桃| 99精品视频一区二区三区| 国产精品私人影院| 国产成人精品亚洲午夜麻豆| 久久综合成人精品亚洲另类欧美| 免费人成黄页网站在线一区二区| 欧美日韩精品免费观看视频| 亚洲综合色自拍一区| 色综合天天性综合| 亚洲欧洲制服丝袜| 色婷婷久久99综合精品jk白丝| 国产精品视频九色porn| 成人免费观看视频| 国产精品久久久久久久久免费樱桃| 国产乱码精品一区二区三区忘忧草 | 懂色中文一区二区在线播放| 久久久91精品国产一区二区精品| 激情成人午夜视频| 国产三级久久久| 成人毛片视频在线观看| 亚洲图片激情小说| 91国偷自产一区二区三区观看 | 精品国产乱码久久久久久影片| 日本强好片久久久久久aaa| 欧美一级黄色录像| 国产一区二区不卡| 国产精品剧情在线亚洲| 色综合久久精品| 亚洲高清不卡在线| 欧美一区二区三区视频| 美日韩一区二区三区| 精品久久久久久久久久久久久久久| 国产一区二区影院| 中文字幕欧美国产| 色一情一伦一子一伦一区| 一区二区成人在线观看| 日韩视频免费观看高清完整版| 国产一区二区三区电影在线观看| 国产精品污www在线观看| 色婷婷av一区二区三区gif| 五月天中文字幕一区二区| 欧美va亚洲va香蕉在线| 成人av电影在线网| 亚洲成人资源在线| 精品福利一二区| av午夜一区麻豆| 午夜精品久久久久久久| 精品国产1区二区| 97久久人人超碰| 欧美aaaaa成人免费观看视频| 欧美精品一区二区三区蜜桃| 9l国产精品久久久久麻豆| 亚洲另类在线视频| 欧美一个色资源| 粉嫩aⅴ一区二区三区四区五区 | 美女网站色91| 中文字幕在线一区免费| 欧美精品日韩一本| 国产福利一区二区三区视频| 国产精品久久福利| 91精品国产高清一区二区三区蜜臀| 韩国精品主播一区二区在线观看| 中文字幕一区二区三区在线播放| 在线播放国产精品二区一二区四区| 国产ts人妖一区二区| 天堂va蜜桃一区二区三区| 国产午夜亚洲精品理论片色戒 | 精品电影一区二区三区| 欧洲精品视频在线观看| 欧美精品电影在线播放| 国内成+人亚洲+欧美+综合在线| 一区二区三区在线观看网站| 久久精品一区四区| 日韩一区二区三区av| 欧洲精品视频在线观看| 波多野结衣精品在线| 久久精品国产亚洲高清剧情介绍| 亚洲人成在线播放网站岛国|