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
16c5x/7x Cross-Assembler V4.12 Released Mon Jun 06 10:49:06 1994 Page 1
Line PC Opcode
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0005
0006
000A
000C
000D
000E
0010
LIST P=16C54,c=132
;****************************************************************
;
3-Wire Byte Write Program (106 bytes)
;
;
This program demonstrates how to interface a
;
Microchip PIC16C54 to a 93LC56 or 93LC66 Serial EE
;
device. This program will execute the erase/write enable
;
command, write to 8 consecutive addresses, and then
;
execute the erase/write disable command. This
;
sequence will repeat forever.
;
;
After each byte is written, time must be given to the
;
device for it to complete the write cycle before
;
the next command can be sent. The easiest solution
;
is to consult the data book for the maximum write
;
cycle time and just wait that long before the next
;
command is sent. This program demonstrates that
;
solution.
;
;
Another, more efficient method of determining when the
;
write cycle is complete is called ‘data polling.’ This
;
method is demonstrated in the program “3wdpoll.”
;
;
This program communicates to the serial EE in the
;
x16 mode, and ASSUMES THE USER HAS SET THE ORG PIN
;
ON THE DEVICE TO Vcc.
;
;
Timing is based on using the PIC16C54 in ‘XT’ mode
;
using a 4Mhz crystal. Clock speeds to the serial EE
;
will be approximately 40 kHz for this setup.
;
;
PIC16C54 to Serial EE Connections:
;
;
PIC16C54
Serial EE
;
——————
——————
;
Pin 10 (RB4) —> Chip Select
;
Pin 11 (RB5) —> Clock
;
Pin 12 (RB6) —> Data In
;
Pin 13 (RB7) —> Data Out
;
ORG=Vcc
;
;************************************************************
;
Register Assignments
;************************************************************
port_a equ
5h
; port 5 (port_a)
port_b equ
6h
; port 6 (port b) comm lines to serial EE
eeprom equ 0ah
; bit buffer
addr equ 0ch
; address register
datai equ 0dh
; stored data input reg.
datao equ 0eh
; stored data output reg.
txbuf equ 10h
; transmit buffer
16c5x/7x Cross-Assembler V4.12 Released Mon Jun 06 10:49:06 1994 Page 2
Line PC Opcode
0052
0053
0054
0055
0056
0057
0058
0059
0060
0011
0012
0013
0015
0016
0007
count equ 11h
; bits transmitted so far
bits equ 12h
; bits to transmit
bytcnt equ 13h
; byte counter for write routine
loops equ 15h
; delay loop counter
loops2 equ 16h
; delay loop counter
;
;************************************************************
;
Bit Assignments
;************************************************************
di
equ 7
; eeprom input
DS00560D-page 6
8-104
© 1994 Microchip Technology Inc.

Share Link: 

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