DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

AN560 데이터 시트보기 (PDF) - Microchip Technology

부품명
상세내역
제조사
AN560
Microchip
Microchip Technology Microchip
AN560 Datasheet PDF : 22 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
Using the 93LC56 and 93LC66
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0040
0041
0042
0043
0044
0C11
0005
0065
0C80
0006
;
movlw b’00010001'
tris port_a
; set RA0 as input, rest output
clrf port_a
; all lines low
movlw b’10000000'
tris port_b
; set RB7 as input, rest output;
;
;
Fall through and do the read
;
;*********************************************************************
;
READ ROUTINE (Sequential read mode)
;
This routine reads 8 consecutive addresses in
;
sequential mode starting at address 0. This
;
program will repeat forever
;*********************************************************************
READ
16c5x/7x Cross-Assembler V4.12 Released Mon Jun 06 10:49:20 1994 Page 5
Line PC Opcode
0205
;
0206 0045 0C00
movlw .0
; set starting address to 00
0207 0046 002C
movwf addr
;
0208 0047 0C08
movlw .8
; set number of addresses to
0209 0048 0033
movwf bytcnt
; read as 8
0210
;
0211 0049 090E
call BSTART
; generate the start bit
0212 004A 0C02
movlw .2
; set # bits to 2
0213 004B 0032
movwf bits
;
0214 004C 0C80
movlw b’10000000' ; get opcode (10b)
0215 004D 0030
movwf txbuf
; into output buffer
0216 004E 0936
call TX
; and transmit it
0217 004F 0C08
movlw .8
;
0218 0050 0032
movwf bits
; set number of bits to 8
0219 0051 020C
movf addr,w
; get the address
0220 0052 0030
movwf txbuf
; into the output buffer
0221 0053 0936
call TX
; and transmit it
0222
0223 0054 0921 rbyte call RX
; read the high byte
0224 0055 020D
movf datai,w
; move input data to w
0225 0056 0037
movwf hbyte
; xfer it to high byte
0226
0227 0057 0921
call RX
; read the low byte
0228 0058 020D
movf datai,w
; move input data to w
0229 0059 0037
movwf hbyte
; xfer it to low byte
0230
0231 005A 02AC
0232 005B 02F3
incf addr
decfsz bytcnt
; add 1 to the address
; have all bytes been read?
8
0233 005C 0A54
goto rbyte
; no, read another byte
0234
0235 005D 0486
bcf
port_b,chpsel ; yes,clear the chip select line
0236 005E 0A45
goto READ
; and start over
0237
0000 END
© 1994 Microchip Technology Inc.
8-117
DS00560D-page 19

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]