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

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

?? 93xcxx.asm

?? Microchip pic c source code
?? 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一区二区三区免费野_久草精品视频
7777精品久久久大香线蕉| 麻豆精品视频在线观看视频| 欧美www视频| 精品欧美一区二区三区精品久久 | 亚洲视频你懂的| 欧美大片在线观看一区| 精品日韩99亚洲| 国产三级三级三级精品8ⅰ区| 精品国产不卡一区二区三区| 久久亚洲一级片| 久久精品欧美日韩精品| 国产精品丝袜黑色高跟| 亚洲黄网站在线观看| 石原莉奈一区二区三区在线观看| 日韩精品久久理论片| 开心九九激情九九欧美日韩精美视频电影| 麻豆国产精品官网| 国产精品538一区二区在线| eeuss鲁片一区二区三区在线看| 91香蕉视频污在线| 欧美日韩美少妇| 91精品国产免费| 欧美激情中文不卡| 亚洲一区国产视频| 激情文学综合丁香| 91小视频免费观看| 精品久久久久av影院| 亚洲欧美国产77777| 日韩电影在线观看电影| 国产精品一区一区| 欧美日韩免费观看一区二区三区 | 天涯成人国产亚洲精品一区av| 日本美女视频一区二区| 懂色一区二区三区免费观看| 欧美丝袜丝交足nylons| 久久一日本道色综合| 亚洲另类中文字| 激情图片小说一区| 欧美在线观看禁18| 国产午夜精品一区二区三区嫩草| 夜夜嗨av一区二区三区四季av | 日本电影欧美片| 日韩精品一区二区三区在线| 中文字幕一区二区三区精华液| 亚洲国产成人av网| 9久草视频在线视频精品| 日韩三区在线观看| 亚洲精品v日韩精品| 国产不卡在线视频| 欧美一二三四在线| 亚洲成在线观看| 成人动漫中文字幕| 久久综合色婷婷| 亚洲综合免费观看高清完整版 | 欧美色倩网站大全免费| 久久精品一区二区三区av| 日韩在线卡一卡二| 欧美午夜寂寞影院| 亚洲日韩欧美一区二区在线| 岛国一区二区三区| 国产日产欧美一区二区三区| 极品尤物av久久免费看| 欧美一区二区三区在线电影| 亚洲一线二线三线视频| 91蝌蚪porny成人天涯| 国产精品网曝门| 国产麻豆午夜三级精品| xfplay精品久久| 激情五月激情综合网| 日韩欧美一区电影| 免费成人在线网站| 日韩欧美国产三级| 六月丁香婷婷久久| 久久精品无码一区二区三区| 国产精品一区二区视频| 精品少妇一区二区三区视频免付费| 天天射综合影视| 日韩一区二区精品在线观看| 青青草97国产精品免费观看| 日韩一区二区免费在线电影 | 国产成人在线观看免费网站| 久久这里都是精品| 国产成人在线视频免费播放| 国产精品免费视频观看| 色综合色狠狠综合色| 亚洲一区二区黄色| 337p亚洲精品色噜噜噜| 老司机精品视频导航| 中文一区二区完整视频在线观看| 福利一区二区在线观看| 亚洲免费观看高清完整版在线观看| 色一情一乱一乱一91av| 日本午夜精品一区二区三区电影| 精品噜噜噜噜久久久久久久久试看 | 免费美女久久99| 亚洲精品一区二区在线观看| 成人免费高清在线| 亚洲成人综合视频| 精品国产自在久精品国产| www.亚洲色图.com| 婷婷六月综合亚洲| 久久九九99视频| 欧美日韩一区精品| 国产呦精品一区二区三区网站| 欧美激情艳妇裸体舞| 在线观看91视频| 久久99精品久久久久婷婷| 中文字幕综合网| 欧美一级艳片视频免费观看| 成人亚洲一区二区一| 天天亚洲美女在线视频| 国产精品久久久久一区二区三区共| 欧美日韩日日骚| 国产成人鲁色资源国产91色综| 亚洲韩国一区二区三区| 337p粉嫩大胆色噜噜噜噜亚洲| 91麻豆免费观看| 久久不见久久见中文字幕免费| 自拍偷拍亚洲综合| 国产午夜精品一区二区三区四区| 欧日韩精品视频| 不卡的av中国片| 久久99精品久久只有精品| 亚洲黄色av一区| 国产三级精品三级| 日韩一级欧美一级| 欧美亚洲国产一区二区三区va| 国产成人精品亚洲日本在线桃色| 五月天精品一区二区三区| 亚洲视频 欧洲视频| 国产色一区二区| 久久免费电影网| 日韩美女视频一区二区在线观看| 欧美在线短视频| 一本久道中文字幕精品亚洲嫩| 国产精品自产自拍| 麻豆精品视频在线| 三级不卡在线观看| 亚洲成人tv网| 亚洲国产视频直播| 一个色在线综合| 亚洲一区二区精品久久av| 一区二区免费看| 一区二区欧美视频| 亚洲国产wwwccc36天堂| 夜夜嗨av一区二区三区| 亚洲九九爱视频| 一区二区三区在线播放| 亚洲黄色小视频| 亚洲成人tv网| 免费久久99精品国产| 免费观看一级欧美片| 欧美aⅴ一区二区三区视频| 天天影视涩香欲综合网| 秋霞午夜鲁丝一区二区老狼| 天天色天天操综合| 欧美aaa在线| 狠狠色狠狠色综合系列| 国产成人亚洲综合a∨婷婷| 国产91丝袜在线播放| 成人av资源站| 欧美日韩在线免费视频| 日韩午夜av电影| 久久伊99综合婷婷久久伊| 中文字幕 久热精品 视频在线| 综合在线观看色| 亚洲午夜免费福利视频| 美女一区二区视频| 国产激情一区二区三区四区| 成人aa视频在线观看| 在线观看av不卡| 日韩三区在线观看| 国产精品日产欧美久久久久| 亚洲乱码日产精品bd| 午夜精品一区二区三区免费视频| 日本欧美在线观看| 成人性生交大片免费看视频在线 | 亚洲卡通动漫在线| 人人超碰91尤物精品国产| 国产九色精品成人porny| 国产成人啪免费观看软件| 成人看片黄a免费看在线| 欧美日韩国产一区二区三区地区| 日韩午夜激情av| 亚洲欧美日韩精品久久久久| 日韩不卡一区二区三区| 国产成人精品免费| 欧美精选一区二区| 国产色产综合产在线视频| 亚洲v日本v欧美v久久精品| 国内精品国产成人| 在线观看欧美精品| 欧美激情综合网| 日韩黄色免费电影| 91在线国内视频| 日韩精品一区二区三区在线观看 | 一区二区三区国产精品| 久久99精品久久久久久动态图| av电影在线不卡| 日韩欧美国产高清|