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

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

?? 93c46.asm

?? Microchip pic c source code
?? ASM
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
;********************************************************************
;*                      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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人a视频| 欧美一a一片一级一片| 日韩丝袜美女视频| 天堂在线一区二区| 国产亚洲精品资源在线26u| 99久久精品99国产精品| 性做久久久久久免费观看| 精品国产伦一区二区三区观看体验| 国产麻豆视频一区| 亚洲一区二区偷拍精品| 日韩女优av电影| 91婷婷韩国欧美一区二区| 男女男精品网站| 国产精品久久久久久久久久久免费看 | 激情文学综合网| 国产精品传媒视频| 日韩精品一区二区三区swag | 国产精品久久久久一区| 色诱视频网站一区| 国产一区二区在线看| 一区二区免费视频| 日韩精品一区二区三区视频播放| 色噜噜狠狠成人中文综合| 日韩成人精品在线观看| 亚洲人成小说网站色在线 | 99久久国产免费看| 免费av成人在线| 国产精品嫩草99a| 日韩一区二区不卡| 欧美亚洲高清一区二区三区不卡| 成人国产精品免费观看视频| 另类人妖一区二区av| 亚洲成人免费视| 亚洲色图色小说| 欧美激情艳妇裸体舞| 日韩欧美成人一区二区| 67194成人在线观看| 日本久久电影网| 大美女一区二区三区| 久久 天天综合| 亚洲高清免费在线| 国产精品国产三级国产aⅴ中文| 日韩欧美国产三级| 欧美色爱综合网| 欧美性大战xxxxx久久久| 菠萝蜜视频在线观看一区| 黄色精品一二区| 蜜臀av性久久久久av蜜臀妖精| 亚洲国产视频一区| 18涩涩午夜精品.www| 久久看人人爽人人| 精品国产免费视频| 久久综合久久鬼色中文字| 91精品免费在线| 91精品婷婷国产综合久久性色 | 日韩欧美国产高清| 欧美日本精品一区二区三区| 色久综合一二码| 色综合色综合色综合色综合色综合 | 欧美精品一区二区三区在线| 日韩欧美在线网站| 日韩欧美中文一区二区| 日韩一区二区在线免费观看| 91精品国产一区二区三区香蕉| 51午夜精品国产| 91精品国产综合久久久蜜臀图片 | 蜜臀va亚洲va欧美va天堂| 午夜视黄欧洲亚洲| 日韩精品国产欧美| 日韩国产高清在线| 日本午夜一本久久久综合| 一区二区三区免费看视频| 国产精品麻豆久久久| 亚洲欧洲日产国产综合网| 综合久久久久久| 一区二区三国产精华液| 日韩福利视频网| 蜜桃久久精品一区二区| 国产高清亚洲一区| 99精品久久只有精品| 在线免费一区三区| 9191久久久久久久久久久| 精品少妇一区二区三区视频免付费| 精品国产一区二区三区久久影院| 久久你懂得1024| 亚洲视频在线一区| 午夜久久久久久电影| 捆绑紧缚一区二区三区视频| 国产福利一区二区三区视频在线 | 国产欧美一二三区| 国产精品超碰97尤物18| 亚洲一区二区三区中文字幕| 免费一级欧美片在线观看| 国产精品123| 精品视频一区 二区 三区| 欧美一区欧美二区| 欧美国产欧美亚州国产日韩mv天天看完整| 久久亚洲一级片| 亚洲视频一区二区免费在线观看| 午夜一区二区三区在线观看| 国模少妇一区二区三区| 色婷婷综合久久久中文一区二区 | 久久午夜羞羞影院免费观看| 1024精品合集| 日本午夜精品视频在线观看| gogogo免费视频观看亚洲一| 在线欧美一区二区| 久久精品人人爽人人爽| 一区二区三区在线视频观看58| 久久精品久久99精品久久| 成人av动漫网站| 欧美变态口味重另类| 一区二区三区欧美激情| 国产大陆a不卡| 91精品国产全国免费观看| 精品精品欲导航| 夜色激情一区二区| 成人精品亚洲人成在线| 91精品国产黑色紧身裤美女| 国产精品色哟哟网站| 日本va欧美va欧美va精品| 国产麻豆成人传媒免费观看| 欧美人成免费网站| 亚洲欧美电影一区二区| 日韩成人一级片| 粗大黑人巨茎大战欧美成人| 日韩欧美精品在线| 日韩精品久久久久久| av午夜一区麻豆| 日韩欧美综合一区| 亚洲国产日韩综合久久精品| 99久久综合精品| 久久久亚洲高清| 美国欧美日韩国产在线播放| 欧美人动与zoxxxx乱| 亚洲精品视频在线| 91网上在线视频| 国产精品视频一二| 国产在线播放一区三区四| 日韩欧美中文一区| 日韩精品亚洲专区| 欧美精品在线一区二区三区| 亚洲免费在线视频| 99久久综合狠狠综合久久| 91精品国产麻豆国产自产在线| 亚洲香肠在线观看| 91极品视觉盛宴| 亚洲欧美另类久久久精品2019| 成人h动漫精品一区二| 久久久91精品国产一区二区精品 | 久久综合资源网| 麻豆成人91精品二区三区| 91精品一区二区三区久久久久久| 午夜视频在线观看一区二区| 在线免费av一区| 一区二区三区国产| 欧洲精品视频在线观看| 亚洲一级不卡视频| 国产日本欧美一区二区| 国产sm精品调教视频网站| 中文字幕不卡的av| 欧美日精品一区视频| 久久精品国产网站| 亚洲国产精品v| 欧美日韩一级视频| 另类中文字幕网| 亚洲视频免费看| 91精品国产综合久久精品| 国产黑丝在线一区二区三区| 一区二区三区中文在线| 精品欧美一区二区三区精品久久| 国产成人精品亚洲午夜麻豆| 亚洲欧美一区二区三区极速播放| 欧美精品777| 粉嫩av一区二区三区在线播放 | 成人av在线资源网站| 午夜精品久久久久久久99水蜜桃| 日韩欧美不卡在线观看视频| jvid福利写真一区二区三区| 日韩精品乱码av一区二区| 欧美韩国日本一区| 7777精品伊人久久久大香线蕉的| 国产精品1区2区| 亚洲地区一二三色| 国产三级一区二区| 欧美电影在哪看比较好| av在线不卡免费看| 喷水一区二区三区| 亚洲黄色免费网站| 久久久久久久久久久久电影| 欧美亚洲自拍偷拍| 成人动漫视频在线| 久久精品国产网站| 亚洲第一搞黄网站| 日韩理论在线观看| 久久先锋影音av| 日韩情涩欧美日韩视频| 欧美亚洲国产怡红院影院| 波多野结衣91| 国产风韵犹存在线视精品|