亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
久久久久99精品一区| 欧美日韩免费电影| 久久av资源站| 麻豆传媒一区二区三区| 日本亚洲免费观看| 九色综合国产一区二区三区| 亚洲综合成人在线视频| 一级女性全黄久久生活片免费| 亚洲天堂中文字幕| 国产亚洲欧洲一区高清在线观看| 精品久久久久久最新网址| 精品成人a区在线观看| 精品动漫一区二区三区在线观看| 欧美激情一区二区在线| 国产精品美女久久久久久久久 | 久久精品久久久精品美女| 奇米精品一区二区三区在线观看一| 喷白浆一区二区| 激情文学综合网| 99久久婷婷国产精品综合| 在线观看av一区二区| 91精品在线免费观看| 久久久久国产精品麻豆ai换脸| 亚洲国产成人午夜在线一区| 亚洲欧洲成人精品av97| 首页国产欧美久久| 国产乱对白刺激视频不卡| 91一区一区三区| 91精品国产麻豆| 国产欧美日韩精品一区| 亚洲国产精品一区二区久久恐怖片 | 免费观看久久久4p| www.亚洲免费av| 欧美日韩不卡一区二区| 久久你懂得1024| 亚洲福利一区二区| 成人久久18免费网站麻豆 | 色猫猫国产区一区二在线视频| 欧美日韩国产a| 欧美激情艳妇裸体舞| 首页国产欧美久久| av色综合久久天堂av综合| 日韩精品在线一区| 一区二区激情视频| 成人黄色av电影| 欧美sm美女调教| 午夜精品免费在线观看| 成人网页在线观看| 日韩精品一区二区三区在线播放| 亚洲男人的天堂网| 国产尤物一区二区在线| 欧美日韩一区二区三区高清| 国产精品日韩精品欧美在线| 乱中年女人伦av一区二区| 欧美色图激情小说| 综合久久国产九一剧情麻豆| 国产真实乱偷精品视频免| 337p亚洲精品色噜噜狠狠| 一区二区三区精品在线| 波多野结衣中文一区| 337p日本欧洲亚洲大胆精品| 婷婷久久综合九色综合伊人色| 日本乱人伦一区| 综合色天天鬼久久鬼色| 99久久精品99国产精品| 久久久久久久精| 国产一区二区三区| 精品sm在线观看| 精品一区二区三区在线观看| 日韩欧美区一区二| 六月婷婷色综合| 精品日韩99亚洲| 韩国成人在线视频| 久久夜色精品国产欧美乱极品| 激情文学综合插| 国产欧美日韩在线| 成人av集中营| 亚洲免费观看高清完整版在线| 99国产麻豆精品| 一区二区不卡在线播放 | 91在线精品一区二区三区| 国产精品久久久久久久久搜平片| 丁香六月综合激情| 国产精品电影一区二区| 日本福利一区二区| 爽爽淫人综合网网站| 欧美成人综合网站| 国产成人午夜99999| 亚洲人一二三区| 欧美日韩精品三区| 老司机精品视频在线| 国产女人aaa级久久久级| 91精品国产黑色紧身裤美女| 另类欧美日韩国产在线| 国产精品午夜免费| 欧美私人免费视频| 精品一区二区免费视频| 国产精品麻豆一区二区| 欧美午夜精品免费| 极品少妇xxxx精品少妇偷拍| 一色屋精品亚洲香蕉网站| 91福利国产成人精品照片| 日本视频免费一区| 国产精品视频一二三| 欧美三级韩国三级日本三斤| 国产自产高清不卡| 一区二区免费在线| 国产午夜亚洲精品不卡| 在线一区二区观看| 国产在线国偷精品免费看| 亚洲精品中文在线观看| 日韩欧美精品三级| 91美女在线观看| 久久99精品国产麻豆婷婷| 亚洲欧美日韩在线| 久久久噜噜噜久久中文字幕色伊伊| 91玉足脚交白嫩脚丫在线播放| 亚洲成人午夜影院| 中文字幕第一区综合| 555夜色666亚洲国产免| av网站免费线看精品| 韩国三级电影一区二区| 婷婷综合另类小说色区| 国产精品久久夜| 欧美成人一区二区三区在线观看| 色美美综合视频| 99视频精品全部免费在线| 激情综合五月婷婷| 五月婷婷激情综合网| 亚洲精品乱码久久久久久久久| 久久这里只有精品6| 7777精品伊人久久久大香线蕉最新版| av亚洲精华国产精华| 国产白丝精品91爽爽久久| 日韩va亚洲va欧美va久久| 亚洲一区在线视频观看| 亚洲麻豆国产自偷在线| 亚洲国产电影在线观看| 久久久国产综合精品女国产盗摄| 3d动漫精品啪啪1区2区免费| 欧美日韩免费观看一区三区| 在线欧美一区二区| 色拍拍在线精品视频8848| 成人精品一区二区三区四区| 国产精品一区二区在线看| 老司机精品视频在线| 久久精品国产99久久6| 免费精品视频在线| 蜜桃一区二区三区在线观看| 亚洲高清免费在线| 日韩综合在线视频| 日韩激情一区二区| 麻豆国产91在线播放| 精品在线你懂的| 国产精品伊人色| 成人午夜精品在线| 91视频.com| 欧美色图激情小说| 日韩午夜精品电影| 日韩欧美另类在线| 久久九九久精品国产免费直播| 久久久精品综合| 国产精品你懂的| 亚洲色欲色欲www| 亚洲高清视频中文字幕| 日韩国产欧美在线视频| 九一九一国产精品| 成人自拍视频在线观看| 91色porny蝌蚪| 777色狠狠一区二区三区| 亚洲精品一区二区精华| 中文无字幕一区二区三区| 最新欧美精品一区二区三区| 亚洲午夜国产一区99re久久| 日韩电影免费一区| 国产馆精品极品| 日本道色综合久久| 日韩欧美一卡二卡| 国产精品成人在线观看| 午夜欧美一区二区三区在线播放| 蜜臀a∨国产成人精品| av在线不卡观看免费观看| 欧美日韩五月天| 国产精品网站在线播放| 亚洲国产精品久久人人爱| 国产在线播放一区三区四| 在线看国产一区二区| www一区二区| 一区二区三区在线观看动漫| 精品在线一区二区三区| 在线观看精品一区| 国产亚洲女人久久久久毛片| 亚洲成a人片在线不卡一二三区 | 99精品视频在线免费观看| 欧美一级一级性生活免费录像| 欧美激情一区二区三区全黄| 日韩va欧美va亚洲va久久| 9i看片成人免费高清| 久久综合九色综合97婷婷女人 | 欧美不卡在线视频|