
_main:

;LED_PWM.c,8 :: 		void main() {
;LED_PWM.c,9 :: 		OSCCON = 0b01110000;                  //8MHz
	MOVLW       112
	MOVWF       OSCCON+0 
;LED_PWM.c,10 :: 		PLLEn_bit = 1;                        //Enable PLL (Now 48MHz)
	BSF         PLLEN_bit+0, 6 
;LED_PWM.c,11 :: 		TRISC2_bit = 0;                       //Make PortC.2 an output
	BCF         TRISC2_bit+0, 2 
;LED_PWM.c,12 :: 		LATC2_bit = 0;                        //Default LED to off
	BCF         LATC2_bit+0, 2 
;LED_PWM.c,13 :: 		i = MinBright;
	MOVLW       1
	MOVWF       _i+0 
;LED_PWM.c,14 :: 		dir = 0;
	BCF         _dir+0, BitPos(_dir+0) 
;LED_PWM.c,15 :: 		PPS_Mapping(13, _OUTPUT, _CCP1_P1A);  //Assign CCP1 to RP13
	MOVLW       13
	MOVWF       FARG_PPS_Mapping_rp_num+0 
	CLRF        FARG_PPS_Mapping_input_output+0 
	MOVLW       14
	MOVWF       FARG_PPS_Mapping_funct_name+0 
	CALL        _PPS_Mapping+0, 0
;LED_PWM.c,16 :: 		PWM1_Init(5000);                      //Initialise PWM at 5kHz
	BSF         T2CON+0, 0, 0
	BSF         T2CON+0, 1, 0
	MOVLW       149
	MOVWF       PR2+0, 0
	CALL        _PWM1_Init+0, 0
;LED_PWM.c,17 :: 		PWM1_Start();
	CALL        _PWM1_Start+0, 0
;LED_PWM.c,18 :: 		while (1) {
L_main0:
;LED_PWM.c,20 :: 		PWM1_Set_Duty(i);
	MOVF        _i+0, 0 
	MOVWF       FARG_PWM1_Set_Duty_new_duty+0 
	CALL        _PWM1_Set_Duty+0, 0
;LED_PWM.c,21 :: 		delay_ms(GlowSlow);
	MOVLW       110
	MOVWF       R12, 0
	MOVLW       21
	MOVWF       R13, 0
L_main2:
	DECFSZ      R13, 1, 1
	BRA         L_main2
	DECFSZ      R12, 1, 1
	BRA         L_main2
	NOP
	NOP
;LED_PWM.c,23 :: 		if (dir == 0) {
	BTFSC       _dir+0, BitPos(_dir+0) 
	GOTO        L_main3
;LED_PWM.c,24 :: 		i++;
	INCF        _i+0, 1 
;LED_PWM.c,25 :: 		} else {
	GOTO        L_main4
L_main3:
;LED_PWM.c,26 :: 		i--;
	DECF        _i+0, 1 
;LED_PWM.c,27 :: 		}
L_main4:
;LED_PWM.c,29 :: 		if (i == MaxBright) {
	MOVF        _i+0, 0 
	XORLW       50
	BTFSS       STATUS+0, 2 
	GOTO        L_main5
;LED_PWM.c,30 :: 		dir = 1; //Count down
	BSF         _dir+0, BitPos(_dir+0) 
;LED_PWM.c,31 :: 		}
L_main5:
;LED_PWM.c,32 :: 		if (i == MinBright) {
	MOVF        _i+0, 0 
	XORLW       1
	BTFSS       STATUS+0, 2 
	GOTO        L_main6
;LED_PWM.c,33 :: 		dir = 0; //Count up
	BCF         _dir+0, BitPos(_dir+0) 
;LED_PWM.c,35 :: 		PWM1_Stop();
	CALL        _PWM1_Stop+0, 0
;LED_PWM.c,36 :: 		delay_ms(1000);
	MOVLW       61
	MOVWF       R11, 0
	MOVLW       225
	MOVWF       R12, 0
	MOVLW       63
	MOVWF       R13, 0
L_main7:
	DECFSZ      R13, 1, 1
	BRA         L_main7
	DECFSZ      R12, 1, 1
	BRA         L_main7
	DECFSZ      R11, 1, 1
	BRA         L_main7
	NOP
	NOP
;LED_PWM.c,37 :: 		PWM1_Start();
	CALL        _PWM1_Start+0, 0
;LED_PWM.c,38 :: 		}
L_main6:
;LED_PWM.c,39 :: 		}
	GOTO        L_main0
;LED_PWM.c,40 :: 		}
L_end_main:
	GOTO        $+0
; end of _main
