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

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

?? 93xcxx.asm

?? 基于pic的例子程序
?? 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一区二区三区免费野_久草精品视频
成人高清在线视频| 国产亚洲成年网址在线观看| 亚洲福利视频导航| 色999日韩国产欧美一区二区| 自拍视频在线观看一区二区| 欧美专区亚洲专区| 老司机免费视频一区二区| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 99在线精品观看| 日本成人在线视频网站| 亚洲色图另类专区| 精品久久久久久最新网址| 成av人片一区二区| 精品一区二区三区免费视频| 亚洲嫩草精品久久| 亚洲精品一区二区三区在线观看| 色哟哟一区二区三区| 成人免费视频免费观看| 日韩国产欧美三级| 亚洲国产一区二区a毛片| 国产日产精品1区| 欧美一区二区三区日韩视频| 成人av一区二区三区| 国产成人精品亚洲777人妖| 久久精品国产99| 蜜桃久久av一区| 日韩国产欧美三级| 日韩av一级电影| 午夜精品久久久久久久久久| 亚洲成av人片一区二区梦乃| 婷婷久久综合九色综合绿巨人| 亚洲成人1区2区| 久久99热这里只有精品| 国产一区二区在线看| 丁香五精品蜜臀久久久久99网站| 成人美女在线视频| 色婷婷久久久综合中文字幕 | 久久精工是国产品牌吗| 青青国产91久久久久久| 麻豆精品一区二区综合av| 精品一区二区综合| 国产91丝袜在线18| 99国产精品久久久久久久久久| 日本电影欧美片| 日韩欧美国产wwwww| 国产精品色噜噜| 日本麻豆一区二区三区视频| 成人免费精品视频| 国产盗摄精品一区二区三区在线| 92国产精品观看| 欧美精品一区二区在线播放 | 午夜国产精品一区| 成人影视亚洲图片在线| 欧美男女性生活在线直播观看| 国产精品欧美综合在线| 美女脱光内衣内裤视频久久网站| 色偷偷一区二区三区| 国产精品三级av在线播放| 三级精品在线观看| 色老汉av一区二区三区| 国产精品美女久久久久久2018| 裸体在线国模精品偷拍| 在线播放视频一区| 亚洲第一av色| 欧美精品国产精品| 亚洲高清免费视频| 欧美日韩高清一区二区不卡 | 伊人夜夜躁av伊人久久| www.亚洲精品| ●精品国产综合乱码久久久久 | 水野朝阳av一区二区三区| 在线视频中文字幕一区二区| 亚洲超碰97人人做人人爱| 欧美亚洲国产bt| 日本v片在线高清不卡在线观看| 欧美色中文字幕| 精品一区二区三区在线播放视频 | 亚洲一本大道在线| 欧美久久一二区| 国产一区二区三区四| 久久久99精品免费观看不卡| 99在线精品观看| 久久精品久久99精品久久| 中文久久乱码一区二区| 欧美日韩视频在线观看一区二区三区| 亚洲一区在线观看免费| 欧美一区二区三区四区高清| 国产一区二区网址| 亚洲国产一区二区三区| 精品国产亚洲在线| 91麻豆福利精品推荐| 日本在线不卡视频一二三区| 国产日韩欧美不卡| 91精品国产综合久久香蕉麻豆| 国产高清亚洲一区| 天天色综合成人网| 一区二区三区在线看| 国产午夜精品一区二区三区四区| 欧美午夜在线一二页| 国产成人在线观看免费网站| 视频在线在亚洲| 亚洲成人av中文| 亚洲午夜精品在线| 一区二区高清免费观看影视大全| 精品久久一二三区| 亚洲精品在线免费观看视频| 日韩午夜激情av| 日韩三级视频中文字幕| 5858s免费视频成人| 欧美视频三区在线播放| 色猫猫国产区一区二在线视频| 国产精品一二三四五| 国产成人亚洲精品青草天美| 狠狠色丁香久久婷婷综合_中| 日本特黄久久久高潮| 午夜伊人狠狠久久| 国产99久久久国产精品潘金| 极品美女销魂一区二区三区免费 | 婷婷综合五月天| 国产麻豆午夜三级精品| 国产一区二区91| 99久久国产综合精品麻豆| 欧美在线观看你懂的| 91精品综合久久久久久| 91麻豆精品国产91久久久使用方法| 欧美哺乳videos| 国产精品免费观看视频| 午夜精品影院在线观看| 免费看欧美女人艹b| 成人性生交大片免费看在线播放| 成人18视频在线播放| 日韩一二三四区| 亚洲欧美在线高清| 无码av中文一区二区三区桃花岛| 久久av老司机精品网站导航| bt欧美亚洲午夜电影天堂| 日韩欧美国产三级电影视频| 亚洲欧洲国产日韩| 国内一区二区在线| 欧美午夜片在线看| 国产精品欧美精品| 久久精品国产精品青草| 欧美一a一片一级一片| 亚洲精品在线观看网站| 日韩成人免费电影| 91久久国产最好的精华液| 久久久久久免费| 日本网站在线观看一区二区三区| 一本大道综合伊人精品热热| 中文字幕一区二区三区在线观看 | 国产精品综合一区二区三区| 欧美日韩视频在线观看一区二区三区 | 精品乱人伦小说| 亚洲大片一区二区三区| 在线一区二区三区四区五区| 亚洲天天做日日做天天谢日日欢| 成人动漫av在线| 国产亚洲福利社区一区| 国产福利一区二区三区视频在线 | 白白色 亚洲乱淫| 日本一区二区动态图| a级高清视频欧美日韩| 一区二区三区av电影| 91精品国产91久久综合桃花 | 亚洲欧洲制服丝袜| 欧美日韩视频第一区| 麻豆高清免费国产一区| 欧美xxxxx裸体时装秀| 国产99久久久国产精品免费看| 中文字幕人成不卡一区| 在线精品国精品国产尤物884a| 亚洲小少妇裸体bbw| 国产成人精品免费在线| 亚洲精品一区二区三区影院| 日日夜夜免费精品| 国产亚洲一区二区三区在线观看| 色综合亚洲欧洲| 久久97超碰国产精品超碰| 亚洲色欲色欲www| 欧美刺激脚交jootjob| proumb性欧美在线观看| 亚洲成人一区二区在线观看| 国产偷国产偷亚洲高清人白洁| 在线观看av不卡| 懂色av一区二区夜夜嗨| 黄页视频在线91| 日本视频一区二区三区| 亚洲在线一区二区三区| 久久久噜噜噜久久人人看| 91精品视频网| 欧美视频一区二| 欧美无砖专区一中文字| 91久久精品一区二区二区| 99久久精品99国产精品| 丁香婷婷深情五月亚洲| 国产精品自拍av| 懂色av一区二区三区免费观看| 国内精品伊人久久久久av影院| 亚洲激情自拍偷拍| 亚洲高清一区二区三区|