MahmoudHassan
Full Member level 6
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
Third iteration
PORTA = 0;
ADCON1 = 0x06;
TRISA = 0xCF;
Fourth Iteration
ADCON1=6;
TRISA=1;
so anybody recommend me other iterations :lol:
Thanks
(iam newbie)
any help appreciated
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
Third iteration
PORTA = 0;
ADCON1 = 0x06;
TRISA = 0xCF;
Fourth Iteration
ADCON1=6;
TRISA=1;
so anybody recommend me other iterations :lol:
Thanks
(iam newbie)
any help appreciated