亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
一级女性全黄久久生活片免费| 欧美精品一区二区三区一线天视频 | 精品一区二区三区蜜桃| 香蕉成人伊视频在线观看| 亚洲精品视频一区| 一区二区三区不卡视频在线观看| 国产精品欧美一级免费| 日本一区二区免费在线| 中文字幕国产精品一区二区| 国产日韩欧美综合在线| 最新高清无码专区| 亚洲宅男天堂在线观看无病毒| 一片黄亚洲嫩模| 亚洲午夜在线观看视频在线| 日韩**一区毛片| 精品一区二区三区在线播放视频| 韩日av一区二区| 99久久久国产精品免费蜜臀| 色成年激情久久综合| 欧美一区二区日韩| 久久精品人人做人人爽人人| 国产精品福利影院| 亚洲综合激情网| 久久99精品久久久| 99精品1区2区| 欧美一区二区黄色| 欧美激情一区二区三区| 亚洲一二三区在线观看| 韩国精品主播一区二区在线观看 | 亚洲卡通动漫在线| 日韩二区在线观看| av不卡免费电影| 欧美成人vps| 亚洲欧美另类小说视频| 久久99久久99| 91国偷自产一区二区三区观看| 91精品国产免费| 亚洲人午夜精品天堂一二香蕉| 亚洲v日本v欧美v久久精品| 国产乱子伦一区二区三区国色天香| 91美女片黄在线观看91美女| 91精品国产入口| 亚洲欧美aⅴ...| 国产精品一区二区三区网站| 欧美探花视频资源| 国产精品久久久久久久裸模| 午夜伦欧美伦电影理论片| 99久久精品国产毛片| 欧美精品一区二区蜜臀亚洲| 亚洲国产日韩av| 91欧美一区二区| 国产精品美女一区二区| 国内精品视频一区二区三区八戒| 69p69国产精品| 亚洲男人天堂一区| 波多野结衣中文字幕一区| 欧美成人猛片aaaaaaa| 日韩精品一二三| 精品视频一区三区九区| 国产精品福利一区二区三区| 国产制服丝袜一区| 精品久久久久久久久久久久久久久久久| 亚洲精品乱码久久久久久黑人| av欧美精品.com| 国产性做久久久久久| 韩国成人精品a∨在线观看| 欧美一区二区性放荡片| 午夜视频在线观看一区二区三区| 一本色道久久综合狠狠躁的推荐| 久久久亚洲精品石原莉奈| 国产一区在线视频| 欧美成人免费网站| 国产中文字幕精品| 国产日产欧美一区二区视频| 日本伊人精品一区二区三区观看方式 | 丁香激情综合国产| 国产视频亚洲色图| 国产精品一二三四| 国产精品久久久久一区二区三区共| 岛国精品在线观看| 亚洲同性gay激情无套| 91免费版在线看| 亚洲成av人**亚洲成av**| 6080日韩午夜伦伦午夜伦| 天天av天天翘天天综合网色鬼国产| 欧美日本一道本在线视频| 日韩电影网1区2区| 国产亚洲女人久久久久毛片| www.亚洲免费av| 亚洲靠逼com| 欧美一区二区三区在线观看| 激情五月激情综合网| 中文字幕欧美三区| 在线观看不卡一区| 久久精品国产亚洲a| 国产精品乱人伦| 在线欧美小视频| 免费成人av在线播放| 久久精品综合网| 色综合天天视频在线观看| 日本亚洲欧美天堂免费| 精品国偷自产国产一区| av不卡免费电影| 免播放器亚洲一区| 国产精品久久久久久妇女6080| 在线看一区二区| 激情五月婷婷综合| 亚洲成人手机在线| 欧美经典一区二区| 日韩一区二区三区高清免费看看| 国产成人综合网| 丝袜诱惑亚洲看片| 亚洲欧洲av一区二区三区久久| 在线不卡的av| 色一情一乱一乱一91av| 久久99久久99| 午夜电影一区二区| 亚洲欧美日韩中文播放| 2017欧美狠狠色| 欧美亚洲尤物久久| 成人免费观看视频| 精品亚洲国产成人av制服丝袜| 亚洲色图一区二区三区| 精品国免费一区二区三区| 欧美午夜精品久久久久久孕妇| 国产黄色精品网站| 奇米一区二区三区| 亚洲国产中文字幕| 亚洲情趣在线观看| 国产精品久久免费看| 精品三级av在线| 制服丝袜激情欧洲亚洲| 在线亚洲精品福利网址导航| 成人午夜精品一区二区三区| 蜜臀91精品一区二区三区| 亚洲一区二区三区免费视频| 亚洲欧洲三级电影| 国产蜜臀av在线一区二区三区| 日韩欧美视频一区| 欧美日韩精品综合在线| 欧美私人免费视频| 欧美性videosxxxxx| 在线免费av一区| 欧美特级限制片免费在线观看| 在线一区二区观看| 欧美在线制服丝袜| 91黄色激情网站| 欧美日韩亚洲丝袜制服| 欧美日韩精品一区二区三区蜜桃 | 国产无一区二区| 精品久久久久久久久久久久久久久| 日韩欧美综合一区| 日韩视频在线你懂得| 精品国产123| 久久久国产精品午夜一区ai换脸| 精品av综合导航| 久久精品一区二区三区不卡牛牛| 精品国产乱码91久久久久久网站| 欧美xxxx在线观看| 久久精品在这里| 中文字幕一区二区三区乱码在线| 亚洲欧美色综合| 丝瓜av网站精品一区二区| 免费的国产精品| 国产成人亚洲综合a∨婷婷图片| 国产99久久久久久免费看农村| 国产成人高清在线| 色婷婷激情综合| 日韩一级片在线播放| 久久久国产综合精品女国产盗摄| 中文字幕不卡一区| 亚洲尤物视频在线| 免费观看成人鲁鲁鲁鲁鲁视频| 国产成人综合在线观看| 91网上在线视频| 在线播放中文字幕一区| 国产欧美日韩综合精品一区二区| 成人欧美一区二区三区1314| 亚洲精品久久久蜜桃| 欧美a一区二区| av电影天堂一区二区在线| 91精品国产色综合久久| 亚洲国产成人在线| 午夜国产精品一区| 波多野结衣欧美| 91精品国产91久久久久久一区二区| 久久婷婷久久一区二区三区| 亚洲婷婷综合久久一本伊一区| 日韩激情av在线| 播五月开心婷婷综合| 日韩欧美在线不卡| 亚洲图片另类小说| 国产在线精品免费| 欧美视频在线观看一区| 国产女人水真多18毛片18精品视频| 亚洲成av人片在线观看| 大白屁股一区二区视频| 日韩女优制服丝袜电影| 亚洲伊人色欲综合网| caoporn国产一区二区|