Electronic Components Datasheet Search |
|
AN560 Datasheet(PDF) 8 Page - Microchip Technology |
|
AN560 Datasheet(HTML) 8 Page - Microchip Technology |
8 / 22 page DS00560D-page 8 © 1994 Microchip Technology Inc. Using the 93LC56 and 93LC66 0125 BITOUT 0126 001C 07CA btfss eeprom,do ; check state of data bit 0127 001D 0A20 goto bitlow ; low, goto bitlow 0128 001E 05C6 bsf port_b,datin ; high, set datain high 0129 001F 0A21 goto clkout ; and clock it 0130 ; 0131 0020 04C6 bitlow bcf port_b,datin ; output a logic low 0132 0021 05A6 clkout bsf port_b,sclk ; set clock line high 0133 0022 0000 nop 0134 0023 04A6 bcf port_b,sclk ; return clock line low 0135 0024 0800 retlw 0 0136 ; 0137 ;**************************************************************** 0138 ; Transmit Data Subroutine 0139 ; This routine takes the byte of data stored in the 0140 ; ‘datao’ register and transmits it to the serial EE device. 0141 ;**************************************************************** 0142 TX 0143 0025 0212 movf bits,w ; set the number of bits to xmit 0144 0026 0031 movwf count 0145 ; 0146 TXLP 0147 0027 04CA bcf eeprom,do ; assume bit 7 is low 0148 0028 06F0 btfsc txbuf,7 ; is bit 7 clear? 0149 0029 05CA bsf eeprom,do ; no, set data bit =1 0150 002A 091C call BITOUT ; transmit 1 bit to serial EE 0151 002B 0370 rlf txbuf ; rotate txbuf left 0152 002C 02F1 decfsz count ; all bits done? 0153 002D 0A27 goto TXLP ; no, do another bit 16c5x/7x Cross-Assembler V4.12 Released Mon Jun 06 10:49:06 1994 Page 4 Line PC Opcode 0154 002E 0800 retlw 0 ; yes, jump out 0155 ; 0156 ;**************************************************************** 0157 ; POWER-UP ROUTINE 0158 ; This is the program entry point, which in this case simply 0159 ; sets the port_a I/O lines and directs control to the 0160 ; erase/write enable routine. 0161 ;***************************************************************** 0162 PWRUP 0163 ; 0164 002F 0C00 movlw b’00000000' 0165 0030 0005 tris port_a ; set port_a as all output 0166 0031 0065 clrf port_a ; all lines low 0167 0168 0032 0C80 movlw b’10000000' 0169 0033 0006 tris port_b ; set RB7 as input, rest output; 0170 ; 0171 ; Fall through and do erase/write enable 0172 ; 0173 ;**************************************************************** 0174 ; EWEN (Erase/Write ENable Routine) 0175 ; this routine enables the dut for erasing and 0176 ; writing. This must be done prior to any erase,write 0177 ; eral,wral instructions. 0178 ;**************************************************************** 0179 EWEN 0180 ; 0181 0034 090E call BSTART ; generate a start bit 0182 ; 0183 0035 0C02 movlw .2 ; set # bits to 2 0184 0036 0032 movwf bits ; 0185 0037 0C00 movlw b’00000000' ; get the opcode (00b) 0186 0038 0030 movwf txbuf ; into the output buffer 0187 0039 0925 call TX ; and transmit it 0188 003A 0C08 movlw .8 ; set # bits to 8 8-106 |
Similar Part No. - AN560 |
|
Similar Description - AN560 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.COM |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Datasheet Upload | Contact us | Privacy Policy | 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 |