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
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
01FF
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
000A
000B
000C
000D
000E
000F
0010
0011
0004
0000
0A40
0000
0A40
0C6E
0036
0000
0000
0000
0000
0000
0000
02F6
0A03
02F5
0A01
0800
04C6
0486
04A6
0000
chpsel equ 4
; chip select line (port_b)
;
;*************************************************************
org 01ffh
begin goto PWRUP ; set the reset vector
org 000h
goto PWRUP
;
;*************************************************************
;
DELAY ROUTINE
;
This routine takes the value in ‘loops’
;
and multiplies it times 1 millisecond to
;
determine delay time.
;*************************************************************
WAIT
;
top
movlw .110
; timing adjustment variable
movwf loops2
top2
nop
; sit and wait
nop
nop
nop
nop
nop
decfsz loops2
; inner loops complete?
goto top2
; no, go again
;
decfsz loops
; outer loops complete?
goto top
; no, go again
retlw 0
; yes, return from sub
;
;**************************************************************
;
Start Bit Subroutine
;
this routine generates a start bit
;
(Chip select and DI high when clock goes high)
;**************************************************************
BSTART
bcf
port_b,datin ; set datain and chipselect lines
bcf
port_b,chpsel ; low just to check operation
bcf
port_b,sclk ; make sure clock starts low too.
nop
;
16c5x/7x Cross-Assembler V4.12 Released Mon Jun 06 10:49:20 1994 Page 3
Line PC Opcode
0103 0012 0586
0104 0013 05C6
bsf
port_b,chpsel ; set chip select line high
bsf
port_b,datin ; set data in line high
8
0105 0014 0000
nop
0106 0015 05A6
bsf
port_b,sclk ; set the clock line high to
0107
; generate the start bit
0108 0016 0000
nop
0109 0017 0000
nop
0110 0018 04A6
bcf
port_b,sclk ; set clock low again
0111 0019 0800
retlw 0
0112
;
0113
;**************************************************************
0114
;
BITIN routine reads one bit of data from the
0115
;
serial EE device and stores it in ‘di’
0116
;**************************************************************
0117
BITIN
0118 001A 05EA
bsf
eeprom,di
; assume input bit is high
0119 001B 05A6
bsf
port_b,sclk ; set clock line high
0120 001C 0000
nop
;
0121 001D 07E6
btfss port_b,datout ; read the data bit
0122 001E 04EA
bcf
eeprom,di
; input bit was low
0123 001F 04A6
bcf
port_b,sclk ; set clock line low
0124
;
© 1994 Microchip Technology Inc.
8-115
DS00560D-page 17

Share Link: 

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