Hi i wanted to create a 16 bit unsigned int in to an 8 bit value so i did a test of anding the Lower byte and then giving it on PORT A(LATCH obviously). I ran it in MPLAB SIM, the code is correct(checked the disassembly code) but even thought there is a clear command to show the number on LATCHA it isnt showing the output.
It didn't work because PORTA was still digital and the last instruction will have done a RMW and reset all the bits to zero. Try adding ADCON1=0x7f to your code.
Also, try,
i=j;
and
i=(char)j;
BTW, it is not a good idea to let main terminate. Add a while(1); at the end of main.