View Single Post
  #5   Spotlight this post!  
Unread 05-02-2005, 23:41
Robby's Avatar
Robby Robby is offline
Registered User
AKA: Kevin Beranek
FRC #0269 (Cooney Robotics)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Wisconsin
Posts: 47
Robby has a spectacular aura aboutRobby has a spectacular aura about
Re: Initialize_ADC help???

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