Quote:
|
Originally Posted by Splintercell
Hey, does anyone know if you can run 2 devices at once on different analog pins using the Initialize_ADC? If so can someone please point me in the right direction. Any help is greatly appreciated.
|
i'm not absolutely sure on this, but i have two ideas
1) i would imagine that you would need to periodically switch which pin the adc is set to. In order to do this, i think all you need to do is just change the ADCON0bits.CHSx bit to reflect which analog input you wish you use
2) after looking through the default code i noticed how they get analog values. When you call Get_Analog_Value() it makes a call to OpenADC(), i imagine you could use the same code, i believe the function it refers to is in adc.h
i hope i adressed what you were looking for