Use code tags to show your code. Its the hash - # - symbol . Or just use [ code ] [ /code ] without the spaces.
void main()
{
unsigned int result;
OSCCON = 0x70; // set internal clock to 8 MHz
TRISB = 0x00; //PORTB as output
TRISA = 0x01; //PORTA.A0 as input
ADCON1 = 0x0E;
ADCON0 = 0x00;
ADCON0.ADON = 1;
do
{
ADCON0.GO_DONE = 1;
while(ADCON0.GO_DONE); //added this semi colon
result = ADC_Read(0);
PORTB = result>>3;
}while(1);
}
Well, it looks like you've configured analogue inputs ok - AN0 is analogue, rest digital, RA0 is an input. I would connect MCLR to VCC via a resistor, 10k is fine.
Also note, the output will be binary, not a bargraph. So the lower bits could change constantly making them appear somewhat dim, but the upper bits should be stable.
Aside from the added change, I can't see anything wrong with the code. What config bits have you set? In MikroC these are in the projects settings - make sure you have INTOSC selected.