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
002E
002F
0030
0031
0032
0033
0034
0035
0036
0037
0C00
0030
091C
0C08
0032
0CC0
0030
091C
0486
0000
movlw b’00000000' ; get the opcode (00b)
movwf txbuf
; into the output buffer
call TX
; and transmit it
movlw .8
; set # bits to 8
movwf bits
;
movlw b’11000000' ; get opcode and address
;
(11XXXXXX)
movwf txbuf
; into output buffer
call TX
; and transmit it
bcf
port_b,chpsel ; set chip select line low
nop
;
;
Now continue on to the write command
;
;**************************************************************
;
WRITE
16c5x/7x Cross-Assembler V4.12 Released Mon Jun 06 10:49:00 1994 Page 5
Line PC Opcode
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0038
0039
003A
003B
003C
003D
003E
003F
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
004A
004B
004C
004D
004E
004F
0050
0051
0052
0053
0054
0055
0C00
002C
0C08
0033
0907
0C02
0032
0C40
0030
091C
0C08
0032
020C
0030
091C
0CAA
0030
091C
0C55
0030
091C
0486
0000
0586
0CC8
0035
0901
06E6
0A59
02F5
;
This routine writes a AA55h pattern into
;
8 consecutive addresses starting at address 00.
;
It will then ‘poll’ the data out line to determine
;
when the write cycle is complete. If the cycle has
;
not completed within 20 ms, then it will continue
;
anyway and turn the timeout fail LED on.
;
The write is done in the x16 mode: the user must
;
have the ORG pin tied to Vcc on the device. This
;
program will repeat forever.
;****************************************************************
WRITE
;
movlw .0
; set starting address to 00
movwf addr
;
movlw .8
; set number of bytes to write as 8
movwf bytcnt
;
;
topwr call BSTART
; generate the start bit
;
movlw .2
; set # bits to 2 for the opcode
movwf bits
;
movlw b’01000000' ; get opcode (01b)
movwf txbuf
; into the transmit buffer
call TX
; and send it
;
movlw .8
; set # of bits to 8 for the
movwf bits
; address
movf addr,w
; get address counter
movwf txbuf
; into output buffer
call TX
; and send it
movlw b’10101010' ; get first half of data (AAh)
movwf txbuf
; into the transmit buffer
call TX
; and send it
movlw b’01010101' ; get second half of data (55h)
movwf txbuf
; into transmit buffer
call TX
; and send it
;
bcf
port_b,chpsel ; clear the chip select line
; to initiate write cycle
nop
bsf
port_b,chpsel ; set the chip sel line high
; to begin data polling
movlw .200
;
movwf loops
; poll 100 times before timeout(about 20ms)
polltop call dpdelay
; wait 100us
btfsc port_b,datout ; is the data out line high?
goto okpoll
; yes-cycle complete: do another
decfsz loops
; has it timed out?
DS00560D-page 14
8-112
© 1994 Microchip Technology Inc.

Share Link: 

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