| Electronic Components Datasheet Search |
|
93LC66 Datasheet(PDF) 7 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
93LC66 Datasheet(HTML) 7 Page - Microchip Technology |
|
7 / 22 page ![]() © 1994 Microchip Technology Inc. DS00560D-page 7 Using the 93LC56 and 93LC66 8 0061 0006 do equ 6 ; eeprom output 0062 0007 datout equ 7 ; data out line (port_b) 0063 0006 datin equ 6 ; data in line (port_b) 0064 0005 sclk equ 5 ; clock line (port_b) 0065 0004 chpsel equ 4 ; chip select line (port_b) 0066 ; 0067 ;************************************************************* 0068 0000 org 01ffh 0069 01FF 0A2F begin goto PWRUP ; set the reset vector 0070 0000 org 000h 0071 0000 0A2F goto PWRUP 0072 ; 0073 ;************************************************************* 0074 ; DELAY ROUTINE 0075 ; This routine takes the value in ‘loops’ 0076 ; and multiplies it times 1 millisecond to 0077 ; determine delay time. 0078 ;************************************************************* 0079 WAIT 0080 ; 0081 0001 0C6E top movlw .110 ; timing adjustment variable 0082 0002 0036 movwf loops2 0083 0003 0000 top2 nop ; sit and wait 0084 0004 0000 nop 0085 0005 0000 nop 0086 0006 0000 nop 0087 0007 0000 nop 0088 0008 0000 nop 0089 0009 02F6 decfsz loops2 ; inner loops complete? 0090 000A 0A03 goto top2 ; no, go again 0091 ; 0092 000B 02F5 decfsz loops ; outer loops complete? 0093 000C 0A01 goto top ; no, go again 0094 000D 0800 retlw 0 ; yes, return from sub 0095 ; 0096 ;************************************************************** 0097 ; Start Bit Subroutine 0098 ; this routine generates a start bit 0099 ; (Chip select and DI high when clock goes high) 0100 ;**************************************************************; 0101 BSTART 0102 000E 0C8F movlw b’10001111' 16c5x/7x Cross-Assembler V4.12 Released Mon Jun 06 10:49:06 1994 Page 3 Line PC Opcode 0103 000F 0006 tris port_b ; set port b for output 0104 ; except for the data out line 0105 0010 04C6 bcf port_b,datin ; set datain and chipselect lines 0106 0011 0486 bcf port_b,chpsel ; low just to check operation 0107 0012 04A6 bcf port_b,sclk ; make sure clock starts low too. 0108 0013 0000 nop 0109 ; 0110 0014 0586 bsf port_b,chpsel ; set chip select line high 0111 0015 05C6 bsf port_b,datin ; set data in line high 0112 0016 0000 nop 0113 0017 05A6 bsf port_b,sclk ; set the clock line high to 0114 ; generate the start bit 0115 0018 0000 nop 0116 0019 0000 nop 0117 001A 04A6 bcf port_b,sclk ; set clock low again 0118 001B 0800 retlw 0 0119 ; 0120 ;************************************************************* 0121 ; BITOUT routine 0122 ; This routine takes one bit of data in ‘do’ and 0123 ; transmits it to the serial EE device 0124 ;************************************************************* 8-105 |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |