Hello Tahmid,
Thank you for your reply.
In the code I found these lines..
Code:
AD1CHS = 0; // Input to AN0 (potentiometer)
AD1PCFGbits.PCFG4 = 0; // Disable digital input on AN4 (TC1047A temp sensor)
AD1PCFGbits.PCFG5 = 0; // Disable digital input on AN5 (potentiometer)
They have enabled AN0 as input for potentiometer. But,, is'nt it necessary to do the same for AN4 i.e.,for Temp. Sensor to be enabled ?? by the way there is no temp sensor on the board.
I want to use AN6 and AN7 which are located as 17th and 18th pins respectively in the PIC. So for my application the other analog pins are not available which has been used for other purposes.
So to take AN6 as input what code should i add ?
I want to retrieve analog format voice through AN6 and process it for ADC conversion.
Looking at the code I think,,, to receive an analog signal it uses 2 pins... Am I correct ???
If so for that I want to use AN7 to disable it as digital input to make it analog if I am not wrong.
so for that is this the correct code ?
Code:
AD1PCFGbits.PCFG6 = 0;
or
AD1PCFGbits.PCFG7 = 0;
So please suggest Idea and codes.
Thanks in advance.
Regards.
Nikhil Raj.