亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
精品精品国产高清一毛片一天堂| 色www精品视频在线观看| 丝袜亚洲精品中文字幕一区| 欧美亚洲日本一区| 天天做天天摸天天爽国产一区| 精油按摩中文字幕久久| 成人av在线一区二区三区| 欧美三级资源在线| 2023国产一二三区日本精品2022| 成人欧美一区二区三区在线播放| 中文字幕av资源一区| 久久亚洲综合av| 中文字幕二三区不卡| 国产精品麻豆网站| 蜜臀av一级做a爰片久久| 一区二区三区四区视频精品免费| 91精品国产一区二区人妖| 国产91高潮流白浆在线麻豆| 夜色激情一区二区| 国产91色综合久久免费分享| 欧美一级午夜免费电影| 亚洲一二三四在线| 91麻豆免费视频| 中文字幕在线一区免费| 国产盗摄一区二区三区| 精品国产伦一区二区三区观看方式| 亚洲大片一区二区三区| 在线看不卡av| 综合久久一区二区三区| 99视频一区二区| 国产精品美女久久久久aⅴ国产馆| 久久精品999| 日韩欧美区一区二| 日韩国产一二三区| 51精品国自产在线| 香蕉成人伊视频在线观看| 欧美精品粉嫩高潮一区二区| 成人在线综合网站| 成人91在线观看| 欧美日韩一级片在线观看| 亚洲欧美日韩精品久久久久| 色综合久久综合中文综合网| 亚洲免费av网站| 91精品1区2区| 日韩精品色哟哟| 91麻豆精品国产| 91在线视频免费观看| 石原莉奈在线亚洲三区| 中文字幕av一区二区三区免费看 | 最近中文字幕一区二区三区| 国产嫩草影院久久久久| 国产亚洲女人久久久久毛片| 欧美一区二区在线免费观看| 日韩午夜av一区| 亚洲最快最全在线视频| 裸体健美xxxx欧美裸体表演| 亚洲午夜免费福利视频| 狠狠色狠狠色合久久伊人| 日韩激情av在线| 黄色精品一二区| 91尤物视频在线观看| 国产精品久久久久久久久搜平片| 色综合久久久久综合99| 69成人精品免费视频| 欧美精品在线观看播放| 欧美一区二区三区性视频| 欧美日本一道本| 国产精品不卡在线| 婷婷开心久久网| 91视频在线观看免费| 777久久久精品| 久久综合999| 婷婷丁香久久五月婷婷| 成人综合婷婷国产精品久久免费| 色8久久人人97超碰香蕉987| 丝瓜av网站精品一区二区 | 在线免费av一区| 欧美高清视频不卡网| 中文字幕制服丝袜成人av| 亚洲愉拍自拍另类高清精品| 国产一区亚洲一区| 三级欧美在线一区| 国产91在线|亚洲| 最新成人av在线| 天天色天天操综合| av电影在线观看一区| 欧美一区二区三区免费大片 | 欧美调教femdomvk| 欧美日本精品一区二区三区| 亚洲视频综合在线| 日产国产高清一区二区三区| 日韩欧美国产综合| 不卡一区二区三区四区| 综合久久久久久| 99久久久久免费精品国产| 中文字幕精品三区| 欧美r级电影在线观看| 不卡一区在线观看| 一区二区三区av电影| jizzjizzjizz欧美| 亚洲三级理论片| 欧美不卡在线视频| 日韩一级高清毛片| 看电视剧不卡顿的网站| 色综合久久久久| 久久久精品tv| 在线视频国内自拍亚洲视频| 婷婷综合久久一区二区三区| 成人欧美一区二区三区1314| 在线观看91视频| 亚洲成人精品在线观看| 精品国产乱码久久久久久图片| 成人毛片在线观看| 国产成人综合网站| 国产自产视频一区二区三区| 国产亚洲一本大道中文在线| 91福利精品视频| 国产电影一区在线| 男人的天堂久久精品| 人妖欧美一区二区| 人人精品人人爱| 一区二区高清免费观看影视大全 | 成人久久视频在线观看| 综合久久国产九一剧情麻豆| 日韩一区二区三区精品视频| 欧美美女黄视频| 91亚洲永久精品| 777色狠狠一区二区三区| 成人h精品动漫一区二区三区| 国产成人精品亚洲777人妖| 国产成人自拍网| 99re热这里只有精品视频| av电影在线不卡| 欧美日韩国产综合草草| 欧美日韩国产一级二级| 91视频www| 欧美日产在线观看| 日韩免费一区二区三区在线播放| 国产日韩v精品一区二区| 欧美精品一区二区久久婷婷| 欧美性大战久久久久久久| 91免费视频观看| 欧美日韩一区二区欧美激情| 久久综合久久综合亚洲| 亚洲乱码中文字幕综合| 夜夜亚洲天天久久| 国产一区二区三区综合| 91蝌蚪porny| 91精品视频网| 日本一区二区动态图| 国产人成亚洲第一网站在线播放| 亚洲人成人一区二区在线观看 | 精品一二三四区| 在线观看日韩国产| 欧美一级欧美三级在线观看| 久久精品综合网| 国产成人啪免费观看软件| 日本韩国一区二区三区视频| 精品欧美乱码久久久久久1区2区| 久久精品国产精品亚洲综合| 国产精品自拍网站| 91丨porny丨在线| 国产日韩欧美a| 秋霞国产午夜精品免费视频| 亚洲1区2区3区4区| 日日骚欧美日韩| 在线观看av一区| 亚洲精品菠萝久久久久久久| 欧美午夜寂寞影院| 日韩毛片一二三区| 91丨porny丨蝌蚪视频| 香蕉成人啪国产精品视频综合网| 色先锋久久av资源部| 亚洲欧美一区二区视频| 青青青伊人色综合久久| 99re成人在线| 色悠悠久久综合| 亚洲超碰精品一区二区| 99久久免费精品高清特色大片| 国产欧美日韩精品一区| 一本大道av伊人久久综合| 亚洲一区成人在线| 亚洲天堂免费看| 6080国产精品一区二区| 久久成人免费网站| 国产精品理伦片| 欧美日韩1区2区| 国产校园另类小说区| 这里是久久伊人| 久久精品国产免费| 一区二区三区成人在线视频| 日韩欧美精品在线视频| 久久国产免费看| 亚洲欧美日韩久久| 国产日韩欧美综合一区| 日韩一区二区免费视频| 久久99最新地址| 精品一区二区三区在线视频| 中文字幕一区二区5566日韩| 精品久久久久久久久久久久久久久久久|