Pugnator
готово, сменил на автоматическую регистрацию
гут! вошел
здесь - "Tips 'n Trics для микроконтроллеров" ?
Pugnator
готово, сменил на автоматическую регистрацию
The Button Library provides routines for detecting button presses and debouncing (eliminating the influence of contact flickering upon pressing a button).
Parameter port specifies the location of the button; parameter pin is the pin number on designated port and goes from 0..7; parameter time is a debounce period in milliseconds; parameter active_state can be either 0 or 1, and it determines if the button is active upon logical zero or logical one.
;RA2_int.c,24 :: void interrupt()
;RA2_int.c,26 :: if(INTF_bit)
0x000B 0x1C8B BTFSS INTF_bit, BitPos(INTF_bit+0)
0x000C 0x2812 GOTO L_interrupt2
;RA2_int.c,28 :: LED = 1^LED;
0x000D 0x2810 GOTO L__interrupt6
0x000E 0x1407 BSF RC0_bit, BitPos(RC0_bit+0)
0x000F 0x2811 GOTO L__interrupt7
L__interrupt6:
0x0010 0x1007 BCF RC0_bit, BitPos(RC0_bit+0)
L__interrupt7:
;RA2_int.c,29 :: INTF_bit = 0;
0x0011 0x108B BCF INTF_bit, BitPos(INTF_bit+0)
;RA2_int.c,30 :: }
L_interrupt2:
;RA2_int.c,31 :: }
L_end_interrupt:
;RA2_int.c,24 :: void interrupt()
;RA2_int.c,26 :: if(INTF_bit)
0x000B 0x1C8B BTFSS INTF_bit, BitPos(INTF_bit+0)
0x000C 0x2810 GOTO L_interrupt2
;RA2_int.c,28 :: LED = LED^1;
0x000D 0x3001 MOVLW 1
0x000E 0x0687 XORWF RC0_bit, 1
;RA2_int.c,29 :: INTF_bit = 0;
0x000F 0x108B BCF INTF_bit, BitPos(INTF_bit+0)
;RA2_int.c,30 :: }
L_interrupt2:
;RA2_int.c,31 :: }
L_end_interrupt:
0x000D 0x2810 GOTO L__interrupt6
0x000D 0x3001 MOVLW 1