| Electronic Components Datasheet Search |
|
AN663 Datasheet(PDF) 10 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
AN663 Datasheet(HTML) 10 Page - Microchip Technology |
|
10 / 17 page ![]() AN665 DS00665A-page 10 ã 1997 Microchip Technology Inc. 00181 002F 0C0F 00182 movlw .15 0030 0032 00183 movwf TIMELO 0031 00184 SBitT2 0031 02F2 00185 decfsz TIMELO,F ; 45us loop (data stable) 0032 0A31 00186 goto SBitT2 00187 0033 0516 00188 bsf GPIOTEMP,PCCLK ; clk rise 0034 0216 00189 movf GPIOTEMP,W 0035 0006 00190 tris GPIO 0036 0800 00191 retlw 0 00192 00193 ;********************************************************************** 00194 ;* SendKEY 00195 ;* sends a scan code to the PC 00196 ;* 00197 ;* Input Variables: 00198 ;* W 00199 ;* Output Variables: 00200 ;* none 00201 ;********************************************************************** 00202 ; 0037 00203 SendKEY 0037 0034 00204 movwf AUX ; temp storage 00205 00206 ; wait PC ready 0038 00207 SendW 0038 0706 00208 btfss GPIO,PCCLK ; test PCCLK 0039 0A38 00209 goto SendW ; loop until HIGH 00210 00211 ; PC request ? 00212 ; btfss DATA ; PC pull down Data? 00213 ; goto RecKEY ; go receive first 00214 00215 ; send start bit 003A 0403 00216 bcf STATUS,C 003B 0922 00217 call SendBit 00218 00219 ; than shift out 8 bit LSB first 003C 0C08 00220 movlw .8 003D 002F 00221 movwf BITCOUNT 003E 0073 00222 clrf PARITY 00223 003F 00224 SBitL 003F 0334 00225 rrf AUX,F ; next bit 0040 0603 00226 btfsc STATUS,C 0041 02B3 00227 incf PARITY,F ; count parity 0042 0922 00228 call SendBit 0043 02EF 00229 decfsz BITCOUNT,F 0044 0A3F 00230 goto SBitL ; loop for 8 bit 00231 0045 02B3 00232 incf PARITY,F ; parity odd 0046 0333 00233 rrf PARITY,F ; send parity Bit 0047 0922 00234 call SendBit 00235 0048 0503 00236 bsf STATUS,C 0049 0A22 00237 goto SendBit ; send stop bit (high = released) 00238 00239 00240 ;********************************************************************** 00241 ;* Receive 00242 ;* receives first 64 bit transmitted by an HCS300 encoder 00243 ;* simplified to operate with 400us PWM only 00244 ;* 00245 ;* Input Variables: 00246 ;* none |
|
|
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 |