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
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
0007
0006
0005
0004
0000
0A33
0000
0A33
04C6
0486
04A6
0000
0586
05C6
0000
05A6
0000
0000
04A6
0800
05EA
05A6
0000
07E6
04EA
datout equ 7
; data out line (port_b)
datin equ 6
; data in line (port_b)
sclk equ 5
; clock line (port_b)
chpsel equ 4
; chip select line (port_b)
;
;*************************************************************
org 01ffh
begin goto PWRUP ; set the reset vector
org 000h
goto PWRUP
;
;**************************************************************
;
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
;
bsf
port_b,chpsel ; set chip select line high
bsf
port_b,datin ; set data in line high
nop
bsf
port_b,sclk ; set the clock line high to
; generate the start bit
nop
nop
bcf
port_b,sclk ; set clock low again
retlw 0
;
;**************************************************************
;
BITIN routine reads one bit of data from the
;
serial EE device and stores it in ‘di’
;**************************************************************
BITIN
bsf
eeprom,di
; assume input bit is high
bsf
port_b,sclk ; set clock line high
nop
;
btfss port_b,datout ; read the data bit
bcf
eeprom,di
; input bit was low
16c5x/7x Cross-Assembler V4.12 Released Mon Jun 06 10:49:10 1994 Page 3
Line PC Opcode
0103 0012 04A6
0104
bcf
port_b,sclk ; set clock line low
;
8
0105 0013 0800
retlw 0
;
0106
0107
;****************************************************************
0108
;
Receive data routine
0109
;
This routine reads one byte of data from the part
0110
;
into the ‘datai’ register.
0111
;****************************************************************
0112
RX
0113 0014 006D
clrf datai
; clear input buffer
0114 0015 0C08
movlw .8
; set # bits to 8
0115 0016 0031
movwf count
0116 0017 0403
bcf
status,0
; make sure carry bit is low
0117 0018 036D RXLP
rlf
datai
; rotate the buffer left 1 bit
0118 0019 090D
call BITIN
; read 1 bit
0119 001A 040D
bcf
datai,0
; assume the input bit was low
0120 001B 06EA
btfsc eeprom,di
; check the bit
0121 001C 050D
bsf
datai,0
; set high if neccessary
0122 001D 02F1
decfsz count
; 8 bits done?
0123 001E 0A18
goto RXLP
; no, do another
0124 001F 0800
retlw 0
© 1994 Microchip Technology Inc.
8-101
DS00560D-page 3

Share Link: 

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