| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
93LC66 Datasheet(PDF) 17 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
93LC66 Datasheet(HTML) 17 Page - Microchip Technology |
|
17 / 22 page ![]() © 1994 Microchip Technology Inc. DS00560D-page 17 Using the 93LC56 and 93LC66 8 0061 0004 chpsel equ 4 ; chip select line (port_b) 0062 ; 0063 ;************************************************************* 0064 0000 org 01ffh 0065 01FF 0A40 begin goto PWRUP ; set the reset vector 0066 0000 org 000h 0067 0000 0A40 goto PWRUP 0068 ; 0069 ;************************************************************* 0070 ; DELAY ROUTINE 0071 ; This routine takes the value in ‘loops’ 0072 ; and multiplies it times 1 millisecond to 0073 ; determine delay time. 0074 ;************************************************************* 0075 WAIT 0076 ; 0077 0001 0C6E top movlw .110 ; timing adjustment variable 0078 0002 0036 movwf loops2 0079 0003 0000 top2 nop ; sit and wait 0080 0004 0000 nop 0081 0005 0000 nop 0082 0006 0000 nop 0083 0007 0000 nop 0084 0008 0000 nop 0085 0009 02F6 decfsz loops2 ; inner loops complete? 0086 000A 0A03 goto top2 ; no, go again 0087 ; 0088 000B 02F5 decfsz loops ; outer loops complete? 0089 000C 0A01 goto top ; no, go again 0090 000D 0800 retlw 0 ; yes, return from sub 0091 ; 0092 ;************************************************************** 0093 ; Start Bit Subroutine 0094 ; this routine generates a start bit 0095 ; (Chip select and DI high when clock goes high) 0096 ;************************************************************** 0097 BSTART 0098 000E 04C6 bcf port_b,datin ; set datain and chipselect lines 0099 000F 0486 bcf port_b,chpsel ; low just to check operation 0100 0010 04A6 bcf port_b,sclk ; make sure clock starts low too. 0101 0011 0000 nop 0102 ; 16c5x/7x Cross-Assembler V4.12 Released Mon Jun 06 10:49:20 1994 Page 3 Line PC Opcode 0103 0012 0586 bsf port_b,chpsel ; set chip select line high 0104 0013 05C6 bsf port_b,datin ; set data in line high 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 ; 8-115 |
|
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes 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 |