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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一二三级电影| 亚洲色图.com| 婷婷综合另类小说色区| 成人av中文字幕| 精品久久久久久久久久久久久久久 | 在线日韩av片| 亚洲国产精品国自产拍av| 美女视频网站黄色亚洲| 一区二区三区.www| 国产精品一区在线| 日韩免费观看2025年上映的电影| 亚洲乱码日产精品bd| 国产 欧美在线| 久久无码av三级| 奇米色一区二区| 9191成人精品久久| 亚洲尤物视频在线| 色婷婷av一区二区三区gif| 国产欧美日韩综合精品一区二区| 久久精品国产一区二区三| 337p亚洲精品色噜噜| 夜夜爽夜夜爽精品视频| 91麻豆免费在线观看| 国产精品美女一区二区三区| 国产伦精品一区二区三区免费| 91精品国产综合久久久久久漫画| 亚洲午夜久久久久久久久久久 | 麻豆国产91在线播放| 91精品啪在线观看国产60岁| 亚洲va天堂va国产va久| 在线免费观看不卡av| 一区二区三区四区乱视频| 97精品国产97久久久久久久久久久久| 国产女人18水真多18精品一级做| 国产精品自产自拍| 国产三区在线成人av| 国产精品一区免费在线观看| 久久嫩草精品久久久久| 国产精品中文字幕日韩精品 | 日韩你懂的在线播放| 欧美日韩三级视频| 亚洲综合视频在线| 欧美日韩一本到| 午夜精品福利一区二区三区av | 成人免费高清在线| 国产精品动漫网站| 色悠悠久久综合| 亚洲伦理在线精品| 欧美日韩免费在线视频| 午夜精品视频在线观看| 日韩欧美亚洲国产另类| 国产一区二区三区精品欧美日韩一区二区三区 | eeuss鲁一区二区三区| 国产精品天天摸av网| av在线不卡电影| 亚洲精品国产成人久久av盗摄| 91福利资源站| 日韩电影在线免费观看| 精品国产乱码久久| 成人免费av在线| 亚洲蜜臀av乱码久久精品| 欧美色图12p| 免费观看91视频大全| 国产亚洲一区二区三区在线观看| 成人一区在线观看| 91视频国产资源| 夜夜嗨av一区二区三区中文字幕| 欧美日韩电影在线| 国产一区二区三区免费看| 中文字幕一区二区三区在线不卡 | 欧美高清视频不卡网| 老汉av免费一区二区三区| 国产婷婷色一区二区三区| 一本一本大道香蕉久在线精品 | 国产亚洲人成网站| 97久久久精品综合88久久| 香蕉成人伊视频在线观看| 精品区一区二区| 北条麻妃国产九九精品视频| 亚洲成人综合视频| 久久久久久久综合狠狠综合| 日本韩国一区二区三区视频| 美女在线视频一区| 中文字幕一区二区5566日韩| 欧美日韩国产色站一区二区三区| 韩国欧美国产1区| 亚洲同性gay激情无套| 日韩一区二区精品葵司在线| 成人午夜大片免费观看| 午夜精品一区在线观看| 日本一区二区三区免费乱视频 | 色综合欧美在线视频区| 日韩va欧美va亚洲va久久| 欧美激情一区三区| 欧美精品一卡两卡| 成人黄色av电影| 日本美女一区二区三区| ●精品国产综合乱码久久久久 | www.日韩精品| 肉色丝袜一区二区| 国产精品久久网站| 日韩视频免费观看高清完整版在线观看 | 91影视在线播放| 精品一区二区三区在线观看国产| 亚洲人亚洲人成电影网站色| 精品国一区二区三区| 亚洲欧洲精品一区二区三区| 日韩欧美一级二级三级| 色94色欧美sute亚洲线路二| 国产美女精品人人做人人爽| 天天影视网天天综合色在线播放| 国产精品网站在线观看| 欧美一卡二卡三卡| 91国内精品野花午夜精品| 国产a久久麻豆| 蜜臀av性久久久久av蜜臀妖精| 亚洲激情网站免费观看| 久久久久久久av麻豆果冻| 日韩一区和二区| 欧美色视频在线观看| 99久久99精品久久久久久| 国产久卡久卡久卡久卡视频精品| 日韩精品亚洲一区二区三区免费| 日韩美女视频一区| 久久精品这里都是精品| 欧美成人一区二区三区| 欧美日本视频在线| 欧美做爰猛烈大尺度电影无法无天| 成人性生交大合| 国产一区二区91| 九色综合狠狠综合久久| 日本成人在线一区| 视频一区二区三区中文字幕| 亚洲精品综合在线| 中文一区在线播放| 久久久久久久久99精品| 精品粉嫩超白一线天av| 欧美一区二区三区影视| 91精品国产综合久久福利 | 精品亚洲国内自在自线福利| 日日夜夜一区二区| 亚洲v日本v欧美v久久精品| 伊人色综合久久天天| 亚洲视频香蕉人妖| 亚洲视频在线观看三级| 亚洲特黄一级片| 亚洲精品中文在线| 亚洲伦理在线免费看| 亚洲欧美国产三级| 亚洲精品免费一二三区| 亚洲人成网站影音先锋播放| 亚洲色图一区二区三区| 亚洲素人一区二区| 夜夜嗨av一区二区三区中文字幕| 亚洲激情五月婷婷| 亚洲无线码一区二区三区| 亚洲国产欧美另类丝袜| 亚洲一区二区欧美日韩| 亚洲成人免费看| 日本午夜精品视频在线观看| 青青草国产精品亚洲专区无| 麻豆久久一区二区| 国内精品久久久久影院一蜜桃| 国产乱子轮精品视频| 成人免费高清在线| 色爱区综合激月婷婷| 欧美日韩在线播放三区四区| 7777精品伊人久久久大香线蕉超级流畅 | 99久久99久久精品国产片果冻 | 久久精品国产999大香线蕉| 久久国产剧场电影| 国产精品1区2区| www.在线成人| 欧美无人高清视频在线观看| 欧美日韩一区二区在线观看 | 欧美zozozo| 国产欧美一区二区精品秋霞影院| 中文字幕精品在线不卡| 18成人在线视频| 亚洲成人一区二区| 激情小说亚洲一区| 成人免费三级在线| 在线观看视频一区二区欧美日韩| 欧美精品自拍偷拍动漫精品| 精品国产一区二区三区四区四| 国产午夜精品一区二区三区嫩草| 亚洲欧洲一区二区在线播放| 亚洲第四色夜色| 韩国视频一区二区| 91免费国产视频网站| 欧美丰满少妇xxxxx高潮对白| 精品国产精品一区二区夜夜嗨 | 欧美精品久久一区| 欧美精品一区二区在线观看| 中文字幕一区免费在线观看| 午夜视频一区在线观看| 国模娜娜一区二区三区| 一本一道久久a久久精品综合蜜臀| 欧美日韩国产综合一区二区三区| 26uuu国产日韩综合|