_main:
;TimerIssues.c,30 :: void main()
;TimerIssues.c,32 :: ADCON1 = 0x0F;//Digital I/O
MOVLW 15
MOVWF ADCON1+0
;TimerIssues.c,33 :: TRISB=0xF7; //Inputs for buttons
MOVLW 247
MOVWF TRISB+0
;TimerIssues.c,34 :: TRISD=0x00; //Output
CLRF TRISD+0
;TimerIssues.c,35 :: TRISC=0x00;
CLRF TRISC+0
;TimerIssues.c,36 :: TRISA=0x00;
CLRF TRISA+0
;TimerIssues.c,39 :: T1CON = 0x01;
MOVLW 1
MOVWF T1CON+0
;TimerIssues.c,40 :: TMR1IF_bit = 0;
BCF TMR1IF_bit+0, BitPos(TMR1IF_bit+0)
;TimerIssues.c,41 :: TMR1H = 0xFF;
MOVLW 255
MOVWF TMR1H+0
;TimerIssues.c,42 :: TMR1L = 0xFE;
MOVLW 254
MOVWF TMR1L+0
;TimerIssues.c,43 :: TMR1IE_bit = 1;
BSF TMR1IE_bit+0, BitPos(TMR1IE_bit+0)
;TimerIssues.c,44 :: INTCON = 0xC0;
MOVLW 192
MOVWF INTCON+0
;TimerIssues.c,46 :: Lcd_Init(); // Initialize LCD
CALL _Lcd_Init+0, 0
;TimerIssues.c,47 :: Lcd_Cmd(_LCD_CLEAR); // Clear display
MOVLW 1
MOVWF FARG_Lcd_Cmd_out_char+0
CALL _Lcd_Cmd+0, 0
;TimerIssues.c,48 :: Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
MOVLW 12
MOVWF FARG_Lcd_Cmd_out_char+0
CALL _Lcd_Cmd+0, 0
;TimerIssues.c,49 :: Lcd_Out(1,3,"Simple test");
MOVLW 1
MOVWF FARG_Lcd_Out_row+0
MOVLW 3
MOVWF FARG_Lcd_Out_column+0
MOVLW ?lstr1_TimerIssues+0
MOVWF FARG_Lcd_Out_text+0
MOVLW hi_addr(?lstr1_TimerIssues+0)
MOVWF FARG_Lcd_Out_text+1
CALL _Lcd_Out+0, 0
;TimerIssues.c,51 :: while(1)
L_main0:
;TimerIssues.c,53 :: input=getInput();
CALL _getInput+0, 0
MOVF R0, 0
MOVWF _input+0
;TimerIssues.c,54 :: if(input==UP)
MOVF R0, 0
XORLW 100
BTFSS STATUS+0, 2
GOTO L_main2
;TimerIssues.c,55 :: testVariable++;
INCF _testVariable+0, 1
L_main2:
;TimerIssues.c,56 :: if(input==DOWN)
MOVF _input+0, 0
XORLW 101
BTFSS STATUS+0, 2
GOTO L_main3
;TimerIssues.c,57 :: testVariable--;
DECF _testVariable+0, 1
L_main3:
;TimerIssues.c,59 :: ByteToStr(testVariable, txt);
MOVF _testVariable+0, 0
MOVWF FARG_ByteToStr_input+0
MOVLW _txt+0
MOVWF FARG_ByteToStr_output+0
MOVLW hi_addr(_txt+0)
MOVWF FARG_ByteToStr_output+1
CALL _ByteToStr+0, 0
;TimerIssues.c,60 :: Lcd_Out(2,5, txt);
MOVLW 2
MOVWF FARG_Lcd_Out_row+0
MOVLW 5
MOVWF FARG_Lcd_Out_column+0
MOVLW _txt+0
MOVWF FARG_Lcd_Out_text+0
MOVLW hi_addr(_txt+0)
MOVWF FARG_Lcd_Out_text+1
CALL _Lcd_Out+0, 0
;TimerIssues.c,62 :: }
GOTO L_main0
;TimerIssues.c,63 :: }
L_end_main:
GOTO $+0
; end of _main
_getInput:
;TimerIssues.c,67 :: unsigned char getInput()
;TimerIssues.c,70 :: if (!PORTB.F5)
BTFSC PORTB+0, 5
GOTO L_getInput4
;TimerIssues.c,72 :: buttonUP=1;
MOVLW 1
MOVWF _buttonUP+0
;TimerIssues.c,73 :: }
L_getInput4:
;TimerIssues.c,74 :: if (buttonUP && PORTB.F5) //Check button UP
MOVF _buttonUP+0, 1
BTFSC STATUS+0, 2
GOTO L_getInput7
BTFSS PORTB+0, 5
GOTO L_getInput7
L__getInput14:
;TimerIssues.c,76 :: buttonUP=0;
CLRF _buttonUP+0
;TimerIssues.c,77 :: return UP;
MOVLW 100
MOVWF R0
GOTO L_end_getInput
;TimerIssues.c,78 :: }
L_getInput7:
;TimerIssues.c,81 :: if (!PORTB.F4) //Check button DOWN
BTFSC PORTB+0, 4
GOTO L_getInput8
;TimerIssues.c,83 :: buttonDOWN=1;
MOVLW 1
MOVWF _buttonDOWN+0
;TimerIssues.c,84 :: }
L_getInput8:
;TimerIssues.c,85 :: if (buttonDOWN && PORTB.F4)
MOVF _buttonDOWN+0, 1
BTFSC STATUS+0, 2
GOTO L_getInput11
BTFSS PORTB+0, 4
GOTO L_getInput11
L__getInput13:
;TimerIssues.c,87 :: buttonDOWN=0;
CLRF _buttonDOWN+0
;TimerIssues.c,88 :: return DOWN;
MOVLW 101
MOVWF R0
GOTO L_end_getInput
;TimerIssues.c,89 :: }
L_getInput11:
;TimerIssues.c,90 :: return 1;
MOVLW 1
MOVWF R0
;TimerIssues.c,91 :: }
L_end_getInput:
RETURN 0
; end of _getInput
_Interrupt:
;TimerIssues.c,95 :: void Interrupt()
;TimerIssues.c,97 :: if (TMR1IF_bit)
BTFSS TMR1IF_bit+0, BitPos(TMR1IF_bit+0)
GOTO L_Interrupt12
;TimerIssues.c,99 :: TMR1IF_bit = 0;
BCF TMR1IF_bit+0, BitPos(TMR1IF_bit+0)
;TimerIssues.c,100 :: TMR1H = 0xFF;
MOVLW 255
MOVWF TMR1H+0
;TimerIssues.c,101 :: TMR1L = 0xFE;
MOVLW 254
MOVWF TMR1L+0
;TimerIssues.c,103 :: cnt++;
INCF _cnt+0, 1
;TimerIssues.c,105 :: PORTC.F6=1;
BSF PORTC+0, 6
;TimerIssues.c,106 :: }
L_Interrupt12:
;TimerIssues.c,107 :: }
L_end_Interrupt:
L__Interrupt18:
RETFIE 1
; end of _Interrupt