Hi,
May i know it is allow to use only 1 of the Port A pin (channel 0 to read the adc), then the remaining Port A pins to control my motor?
Problem Encountered:
when i only use PIN_A0 interface with the output of LM35, my LCD show me valid temperature result. (29 Celcius or 61 Resolution number.)
But when i enable my motor control pins that also use in Port A, then the temperature result become not correct. I wonder why this could happen
following is my setup:
Code:
set_tris_A(1) ; //only pin_a0 to be an input
output_A(0) ; //set all pins to 0 value by default
setup_adc(ADC_CLOCK_INTERNAL); //use internal clock
setup_adc_ports(0xE); //use only pin_a0 as analog input
set_adc_channel(0); //set pin_a0 as adc channel
Anyone can point out my setup problem?
Thanks,
sysysy