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

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

?? 93c46.asm

?? 匯編的PIC程序
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
;********************************************************************
;*                      PICALC Directives Section                   *
;********************************************************************

	SUBTITL "93C46 3 WIRE INTERFACE ROUTINE"
	LIST     P=16C54,N=40,C=132


;********************************************************************
;*                      Register Assignments                        *
;********************************************************************

indir   equ     0x00            ;Use this register as source/destination for
				;indirect addressing.
pc      equ     0x02            ;PIC Program Counter.
status  equ     0x03            ;PIC Status Register.
fsr     equ     0x04            ;File Select Register.
serial  equ     0x05            ;Port used for 93C46 control.  Since Port A
				;is 4 bits wide, we'll use all of Port A.

				;The following three registers must be
				;located consecutively in memory.
cmd     equ     0x10            ;This register contains the 2 bit 93C46
				;command is the upper 2 bit positions and
				;memory address in the lower 6.
highb   equ     0x11            ;Used in read/write routines to store the
				;upper byte of a 16 bit 93C46 data word.
lowb    equ     0x12            ;Used in read/write routines to store the
				;lower byte of a 16 bit 93C46 data word.

cnthi   equ     0x13            ;Used as the upper byte of a sixteen bit loop
				;counter in RDYCHK routine.
cnt     equ     0x14            ;Used as the lower byte of a sixteen bit loop
				;counter in RDYCHK routine, and elsewhere as
				;an eight bit counter.

;********************************************************************
;*                      Bit Assignments                             *
;********************************************************************

carry   equ     0               ;Carry Flag of Status Register.
zflag   equ     2               ;Zero Flag of Status Register.

;For the 3 wire interface, connect the din and dout to the same
;i/o line of the PIC16C5X.
cs      equ     0               ;Port pin tied to CS on 93C46.
din     equ     1               ;Port pin tied to DI on 93C46.
dout    equ     1               ;Port pin tied to DO on 93C46.
clock   equ     2               ;Port pin tied to CLK on 93C46.

;********************************************************************
;*                      General Assignments                         *
;********************************************************************

no_err  equ     0               ;
error   equ     1               ;
tries   equ     0x04            ;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     0x80            ;93C46 Read command.
write   equ     0x40            ;93C46 Write command.
erase   equ     0xC0            ;93C46 Erase command.
ewen    equ     0x30            ;93C46 Erase/Write Enable command.
ewds    equ     0x00            ;93C46 Erase/Write Disable command.
eral    equ     0x20            ;92CXX Erase All command.
wral    equ     0x10            ;92CXX Write All command.

;********************************************************************
;*                      Macro Definitions                           *
;********************************************************************

sel     MACRO                   ;Selects the 93C46 device.
	bsf     serial,cs       ;Chip Select (CS) = '1' to select the device.
	ENDM

dsel    MACRO                   ;De-select the 93C46 device.
	bcf     serial,cs       ;Chip Select (CS) = '0' to de-select the
				;device.
	ENDM

strtbt  MACRO                   ;Issue the Start Bit to the 93C46.
	bsf     serial,din      ;Start Bit = '1'.
	clkit                   ;Clock it out.
	ENDM

clkit   MACRO                   ;Clocks a serial data bit into or out of the
				;93C46 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 93C46 data for the
				;minimum CLK period.
				
	bcf     serial,clock    ;Clock (CLK) = '0'.
	ENDM

;********************************************************************
;*                      Power-On/Reset Entry Point                  *
;********************************************************************

reset_  org     0x1FF
	goto    main

;********************************************************************
;*                      93C46 Routines                              *
;********************************************************************
	org     0x000           ;Locate all subroutines in the lower half of
				;a Program Memory Page.

;********************************************************************
;*                      DOUT8                                       *
;********************************************************************
				;Dout8 will output 8 bits of data to the
				;93C46.  Before calling this routine, the FSR
				;must point to the byte being transmitted.

dout8   movlw   0x08            ;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 93C46.
	decfsz  cnt             ;Repeat until cnt = 0.
	goto    d_o_8           ;Cnt still > 0.
	rlf     indir           ;Restore register to its original condition.
	retlw   no_err          ;Exit with good status.

;********************************************************************
;*                      DIN8                                        *
;********************************************************************
				;Din8 will input 8 bits of data from the
				;93C46.  Before calling this routine, the FSR
				;must point to the register being used to
				;hold the incomming data.
din8    movlw   0x08            ;Initialize loop counter.
	movwf   cnt             ;
;for the 3 wire interface the direction of the i/o line connected to
;din and dout has to converted from an output to an input.
	movlw   b'00000010'     ;convert RA1 to an input
	tris    serial          ;       /

d_i_8   clkit                   ;Clock a bit out of the 93C46.
	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.
	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
;for a 3 wire interface, convert the RA1 line back to an output
	movlw   0               ;make RA1 to an output
	tris    serial          ;       /
	retlw   no_err          ;Exit with good status.

;********************************************************************
;*                      RDYCHK                                      *
;********************************************************************
				;Rdychk will read the 93C46 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  movlw   tries           ;Initialize time-out counter.
	movwf   cnthi           ;
	clrf    cnt             ;
;for a 3 wire interface, make the RA1 line an input

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产成人精品| 久久国产麻豆精品| 欧美日韩在线综合| 91啪亚洲精品| 色网综合在线观看| 91精品国产色综合久久不卡电影| 制服丝袜亚洲色图| 99热精品一区二区| 欧美亚洲一区二区在线| 欧美久久高跟鞋激| 国产亚洲制服色| 最新日韩av在线| 日韩精品色哟哟| 日韩丝袜美女视频| 亚洲大尺度视频在线观看| 亚洲免费观看高清完整版在线观看熊| 欧美国产乱子伦 | 久久精品日韩一区二区三区| 久久久久高清精品| 亚洲免费大片在线观看| 久久国产生活片100| 色香蕉久久蜜桃| 国产三级三级三级精品8ⅰ区| 日韩欧美国产一区二区在线播放| 国产精品国产a| 美国精品在线观看| 欧美人与性动xxxx| 一区二区三区资源| 成人午夜电影网站| 国产欧美综合在线| 国产91精品一区二区麻豆网站| 欧美熟乱第一页| 午夜欧美电影在线观看| 一本色道久久综合精品竹菊| 欧美极品aⅴ影院| 国产精品影视在线观看| 欧美岛国在线观看| 激情图片小说一区| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 成人在线综合网| 日本一区二区视频在线观看| 丰满亚洲少妇av| 亚洲欧美区自拍先锋| 99国产精品久久久| 日韩成人免费看| 久久国产综合精品| 国产精品久久久久久久久免费丝袜 | 国产精品污www在线观看| 国产在线精品一区二区不卡了| 精品99一区二区三区| 成人国产精品免费观看| 亚洲一区二区视频| 日韩欧美精品在线视频| av在线播放不卡| 免费xxxx性欧美18vr| 国产精品美女久久久久久久网站| 91久久香蕉国产日韩欧美9色| 韩国女主播一区| 久久这里只有精品首页| 99精品久久久久久| 国产精品亚洲专一区二区三区| 一区二区三区欧美在线观看| 久久免费国产精品| 欧美午夜精品一区二区三区| 国产九色sp调教91| 国产一区二区0| 亚洲精品美国一| 精品久久免费看| 精品国产精品一区二区夜夜嗨| 在线精品国精品国产尤物884a| 狠狠色丁香婷婷综合| 久久精品久久久精品美女| 亚洲一区二区三区中文字幕 | 日本一区二区免费在线| 欧美videossexotv100| 欧美二区在线观看| 欧美一区二区三区在线视频| 欧美日免费三级在线| 欧美日本国产视频| 日韩视频中午一区| 国产亚洲成aⅴ人片在线观看| 日韩精品一区二区在线观看| 久久久久99精品一区| 中文字幕乱码一区二区免费| 精品国产91乱码一区二区三区| 精品国精品国产| 国产亚洲综合在线| 1024亚洲合集| 亚洲成人免费看| 国产精品1区2区3区| 久久99久久久久久久久久久| 综合欧美亚洲日本| 欧美色手机在线观看| 欧美日韩免费一区二区三区| av网站一区二区三区| 欧美日韩亚洲丝袜制服| 色999日韩国产欧美一区二区| 欧美性猛交xxxx黑人交| 色综合天天性综合| 欧美电视剧免费全集观看| 日韩理论片中文av| 国产白丝精品91爽爽久久| 欧美自拍偷拍午夜视频| 日韩欧美成人一区二区| 亚洲精品成人悠悠色影视| 久久99精品久久久久久国产越南 | 激情文学综合网| 欧美日韩亚洲另类| 亚洲一区二区三区视频在线播放 | 天天综合网 天天综合色| 99热在这里有精品免费| 国产日韩精品一区| 九九热在线视频观看这里只有精品| 一本色道久久综合狠狠躁的推荐 | 国产精品萝li| 久久97超碰国产精品超碰| 欧美一区二区三区在线观看| 亚洲美女屁股眼交3| 色综合中文字幕国产| 欧美一区二区日韩一区二区| 亚洲老司机在线| 成人国产免费视频| 亚洲三级理论片| 99精品视频在线播放观看| 欧美高清在线精品一区| 色综合久久久网| 日本欧美一区二区三区乱码| 欧美一区二区福利在线| 精品一区二区三区日韩| 亚洲精品一区二区三区香蕉 | 成人免费毛片片v| 日韩美女精品在线| 欧美日韩黄色一区二区| 蜜桃一区二区三区四区| 欧美韩国一区二区| 色一情一乱一乱一91av| 男女性色大片免费观看一区二区| 在线成人免费视频| 色8久久人人97超碰香蕉987| 丝袜诱惑亚洲看片| 中文字幕一区二区5566日韩| 欧美视频中文字幕| 丰满白嫩尤物一区二区| 日韩精品欧美成人高清一区二区| 久久久久亚洲蜜桃| 日韩一区二区电影在线| 欧美中文字幕一区二区三区亚洲| 老司机精品视频线观看86| 香蕉加勒比综合久久| 国产精品久久久久久久久免费桃花| 日韩欧美激情四射| 91精品国产色综合久久不卡蜜臀| 91麻豆精品视频| 波多野结衣在线一区| 国产精品66部| 国产成人精品一区二| 蓝色福利精品导航| 秋霞电影网一区二区| 久久99在线观看| 成人免费av网站| 成人黄色小视频在线观看| www.66久久| 国产精品影视网| 国产黄色精品网站| 国产高清久久久久| 91片在线免费观看| 777午夜精品免费视频| 精品久久久久久久久久久久久久久| 欧美一区二区黄| 1024国产精品| 日本伊人色综合网| 成人av免费在线播放| 欧美日本韩国一区二区三区视频| 91精品免费观看| 国产精品不卡在线| 三级欧美在线一区| 91视频91自| 国产肉丝袜一区二区| 亚洲国产成人va在线观看天堂| 日韩精品每日更新| 91官网在线免费观看| 26uuu久久天堂性欧美| 三级久久三级久久久| eeuss国产一区二区三区| 欧美美女直播网站| 亚洲乱码日产精品bd| 国产精品亚洲第一| 日韩视频123| 午夜精品视频一区| 色欧美乱欧美15图片| 国产精品视频九色porn| 国产真实乱对白精彩久久| 日韩欧美不卡一区| 久久国产婷婷国产香蕉| 欧美一区二区在线免费观看| 亚洲最新在线观看| 欧美精品乱人伦久久久久久| 午夜精品国产更新| 欧美一区二区日韩| 久久疯狂做爰流白浆xx|