Hi Ian,
I am sorry if i confused you, Solar panel used is 200Watt(12V solar panel, 17- 19V at open circuit)
1) RA4 pin is configured as Input pin and as Solar Sense
2) If solar is present the 12V voltage from Solar Panel is cut down using Voltage divider circuits to 4.9V and given to RA4 pin
3) If solar is not present RA4 pin will get 0V
4) If solar is present then we are turning on the RA5 pin in normal charging mode and using PWM at RA5 pin if the charging mode is Trickle
5) If solar is not present RA5 value is set to 0.
I have removed the config settings which u pointed out and replaced them with __PROG_CONFIG(1, 0x31C4); and eventhough now if solar is present the system is not crashing and PWM duty cycle change is working fine with MPLAB IDE and Xc8 Compiler. Thanks once again for the help
__PROG_CONFIG(1, 0x31C4); // Can u tell me what is the meaning on 1 here, Is it an Instance?
Regards,
Suresh