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
1 2 3 4 5 6 7 8 9 10 Next Last
Using the 93LC56 and 93LC66
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
003B
003C
003D
003E
003F
0040
0032
0CC0
0030
0925
0486
0000
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
;
;**************************************************************
;
Byte Write Routine
;
This routine writes an AA55h pattern into
;
8 consecutive addresses starting at address 00.
;
A delay of about 10ms is given after each byte
;
for the write cycle to complete.
16c5x/7x Cross-Assembler V4.12 Released Mon Jun 06 10:49:06 1994 Page 5
Line PC Opcode
0205
;
The write is done in the x16 mode: the user must
0206
;
have the ORG pin tied to Vcc on the device
0207
;****************************************************************
0208
WRITE
0209
;
0210 0041 0C00
movlw .0
; set starting address to 00
0211 0042 002C
movwf addr
;
0212 0043 0C08
movlw .8
; set number of bytes to write as 8
0213 0044 0033
movwf bytcnt
;
0214
;
0215 0045 090E topwr call BSTART
; generate the start bit
0216
;
0217 0046 0C02
movlw .2
; set # bits to 2 for the opcode
0218 0047 0032
movwf bits
;
0219 0048 0C40
movlw b’01000000' ; get opcode (01b)
0220 0049 0030
movwf txbuf
; into the transmit buffer
0221 004A 0925
call TX
; and send it
0222
;
0223 004B 0C08
movlw .8
; set # of bits to 8 for the
0224 004C 0032
movwf bits
; address
0225 004D 020C
movf addr,w
; get address counter
0226 004E 0030
movwf txbuf
; into output buffer
0227 004F 0925
call TX
; and send it
0228 0050 0CAA
movlw b’10101010' ; get upper byte of data (AAh)
0229 0051 0030
movwf txbuf
; into the transmit buffer
0230 0052 0925
call TX
; and send it
0231 0053 0C55
0232 0054 0030
movlw b’01010101' ; get lower byte of data (55h)
movwf txbuf
; into transmit buffer
8
0233 0055 0925
call TX
; and send it
0234
;
0235 0056 0486
bcf
port_b,chpsel ; clear the chip select line
0236
; to initiate write cycle
0237
;
0238 0057 0C0A
movlw .10
;
0239 0058 0035
movwf loops
; set delay time to 10mS
0240 0059 0901
call WAIT
; and wait
0241
;
0242 005A 02AC
incf addr
; increment address counter
0243 005B 02F3
decfsz bytcnt
; all bytes written?
0244 005C 0A45
goto topwr
; no, do another
0245
; yes, go on
0246
;
0247
;
Now continue on to the erase/write disable command
0248
;
0249
;****************************************************************
0250
;
EWDS (Erase/Write Disable Routine)
0251
;
This routine executes the erase/write disable command
0252
;
which prevents the contents of the array from being
© 1994 Microchip Technology Inc.
8-107
DS00560D-page 9

Share Link: 

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