Hello
i wanted to configure port A to be digital but i have problem with that simply it
doesnot worked
iam using MikroC
PIC16F877a
attached protues file for the problem
i tried to configure it like that
first iteration
ADCON1 = 0x0F; // All AtoD pins on PORTA to digital
CMCON = 0x07; // Disable Comparators
ADCON1 = 0x0F; // Make PORTA all inputs for switches
Second iteration
ADCON1 = 1; // Set inputs as analog, Ref=+5V
TRISA = 0x00; // Set PORT A as inputs
hi
in mikroC too you have to configure the ports as inputs and outputs.there's no function in microC which automatically make ports. if you want to make inputs, write 1 to the pins which is to be used as an inputs
disable ADC and Comparators.it's clearly mentioned in microchip data sheet. i think the system is not working because you did not configure the controller parameters like MCLR in proteus and the compiler.