| 数据搜索系统,热门电子元器件搜索 |
|
HCS300 数据表(PDF) 12 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
HCS300 数据表(HTML) 12 Page - Microchip Technology |
|
12 / 17 page ![]() AN665 DS00665A-page 12 ã 1997 Microchip Technology Inc. 006C 032D 00313 rrf BUFFER6,F 006D 032C 00314 rrf BUFFER5,F 006E 032B 00315 rrf BUFFER4,F 006F 032A 00316 rrf BUFFER3,F 0070 0329 00317 rrf BUFFER2,F 0071 0328 00318 rrf BUFFER1,F 0072 0327 00319 rrf BUFFER0,F 00320 00321 ; compare duty cycle, to skip preamble 0073 0CE0 00322 movlw 0E0 ; test duty cycle 0074 0152 00323 andwf TIMELO,W ; delta >200us? (32 cycles) 0075 0643 00324 btfsc STATUS,Z 0076 0A4A 00325 goto Receive ; no! itÕs a preamble 00326 0077 02EF 00327 decfsz BITCOUNT,F ; loop to completion 0078 0A5B 00328 goto RNextBit 0079 0800 00329 retlw 0 00330 00331 ;---------------------------------------------------------------------- 00332 ;********************************************************************** 00333 ;* Main loop 00334 ;* set TRIS and option register 00335 ;* wait for start (LED) 00336 ;* disable keyboard 00337 ;* receive new hopping code 00338 ;* send 16 hex digits 00339 ;* wait transmission end 00340 ;* loop 00341 ;********************************************************************** 00342 ; 007A 00343 Main 007A 0C04 00344 movlw bÕ00000100Õ ; set switch ON 007B 0026 00345 movwf GPIO 007C 0CFB 00346 movlw MASKDEF ; init port 007D 0006 00347 tris GPIO 007E 0C00 00348 movlw 0 007F 0002 00349 option 00350 0080 06A6 00351 btfsc LED ; wait for Led output fall 0081 0A7A 00352 goto Main 00353 0082 00354 Disable 0082 0066 00355 clrf GPIO ; send disable kb 00356 ; SWITCH = LOW 00357 0083 094A 00358 call Receive ; gets the new hopping code 00359 00360 ;---------------------------------------------------------------------- 00361 ; emulate a keyboard and send data as a sequence of 16 key 00362 ; pressed and released, one each hex digit 00363 ; 0084 0C08 00364 movlw .8 ; 8 byte from the buffer 0085 0030 00365 movwf BYTECOUNT 0086 0C07 00366 movlw BUFFER0 ; init pointer 0087 0024 00367 movwf FSR 00368 0088 00369 KEYL 0088 0200 00370 movf INDF,W ; low nibble 0089 0E0F 00371 andlw 0F 008A 0902 00372 call ScanCode ; encode hex nibble 008B 0035 00373 movwf KEY 008C 0937 00374 call SendKEY ; emulate key press 008D 091A 00375 call Wait10ms 008E 0CF0 00376 movlw BREAK ; emulate key release 008F 0937 00377 call SendKEY 0090 0C01 00378 movlw 1 |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |