| Electronic Components Datasheet Search |
|
93LC56 Datasheet(PDF) 4 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
93LC56 Datasheet(HTML) 4 Page - Microchip Technology |
|
4 / 22 page ![]() DS00560D-page 4 © 1994 Microchip Technology Inc. Using the 93LC56 and 93LC66 0125 ; 0126 ;************************************************************* 0127 ; BITOUT routine 0128 ; This routine takes one bit of data in ‘do’ and 0129 ; transmits it to the serial EE device 0130 ;************************************************************* 0131 BITOUT 0132 0020 07CA btfss eeprom,do ; check state of data bit 0133 0021 0A24 goto bitlow ; low, goto bitlow 0134 0022 05C6 bsf port_b,datin ; high, set datain high 0135 0023 0A25 goto clkout ; and clock it 0136 ; 0137 0024 04C6 bitlow bcf port_b,datin ; output a logic low 0138 0025 05A6 clkout bsf port_b,sclk ; set clock line high 0139 0026 0000 nop 0140 0027 04A6 bcf port_b,sclk ; return clock line low 0141 0028 0800 retlw 0 0142 ; 0143 ;**************************************************************** 0144 ; Transmit Data Subroutine 0145 ; This routine takes the byte of data stored in the 0146 ; ‘datao’ register and transmits it to the serial EE device. 0147 ;**************************************************************** 0148 TX 0149 0029 0212 movf bits,w ; set the number of bits to xmit 0150 002A 0031 movwf count 0151 ; 0152 TXLP 0153 002B 04CA bcf eeprom,do ; assume bit 7 is low 16c5x/7x Cross-Assembler V4.12 Released Mon Jun 06 10:49:10 1994 Page 4 Line PC Opcode 0154 002C 06F0 btfsc txbuf,7 ; is bit 7 clear? 0155 002D 05CA bsf eeprom,do ; no, set data bit =1 0156 002E 0920 call BITOUT ; transmit 1 bit to serial EE 0157 002F 0370 rlf txbuf ; rotate txbuf left 0158 0030 02F1 decfsz count ; all bits done? 0159 0031 0A2B goto TXLP ; no, do another bit 0160 0032 0800 retlw 0 ; yes, jump out 0161 ; 0162 ;**************************************************************** 0163 ; POWER-UP ROUTINE 0164 ; This is the program entry point, which in this case simply 0165 ; sets the port_a I/O lines and directs control to the 0166 ; read routine. 0167 ;***************************************************************** 0168 PWRUP 0169 ; 0170 0033 0C00 movlw b’00000000' 0171 0034 0005 tris port_a ; set port_a as all output 0172 0035 0065 clrf port_a ; all lines low 0173 0174 0036 0C80 movlw b’10000000' 0175 0037 0006 tris port_b ; set RB7 as input, rest output; 0176 ; 0177 ; Fall through and do the read 0178 ; 0179 ;********************************************************************* 0180 ; READ ROUTINE 0181 ; This routine reads 8 consecutive addresses in 0182 ; random mode starting at address 0. This is done in 0183 ; x16 mode and will repeat forever. 0184 ;********************************************************************* 0185 READ 0186 ; 0187 0038 0C00 movlw .0 ; set starting address to 00 0188 0039 002C movwf addr ; 8-102 |
|
|
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 |