I've make simple circuit to test my PIC.in this circuit switch as counter.
When counter=1 led1=on led2=off
When counter=2 led1=off led2=on
When counter=3 led1=on led2=on
When counter=4 led is off and counter back to 0.
When I try in simulation its working .
But, sadly when try in hardware its not working and nothing happen.I check the voltage its oky.power source that I used is battery 9V and lowered the voltage using by 78L05 voltage regulator. I allready pullup mclr pin and check the configuration bits.
FOSC=HS oscillator
WDT=disable
PWRTE=Enable
BOREN=disable
LVP=disable
CPD=off
WRT=off
CP=off
I attach this post with schematic circuit.
Hope u guys can help me solve my problem