Using ADC channels

Post Reply
kdalyan
Posts: 2
Joined: Fri Aug 21, 2009 4:08 am

Using ADC channels

Post by kdalyan » Fri Sep 11, 2009 1:42 am

Hi,
How can use the ADC channels on GPIO socket. i want to use 3 adc input but the board has only one pot. i can connect 2 extra but in software how can use them. is ADC drive in linux adaptable for changing the channels?
is there a simple example please?


Thankyou for your help

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: Using ADC channels

Post by nicolas » Fri Sep 11, 2009 4:45 pm

Im not sure if linux has a driver for it.


But directly via i/o...
To read the other channels you need to change the channel on the mux then tell the adc to perform a conversion then read the value (unless you have the READ_START bit set, in which case a read will cause an auto adc calculation)

To change the channel, set the proper bits of the ADCCON register.

See sample code without OS\2440test\src\adc.c for example

Sak1s
Posts: 12
Joined: Thu Mar 26, 2009 3:06 am
Location: Greece

Re: Using ADC channels

Post by Sak1s » Mon May 17, 2010 11:08 am

hello.I there any tip about adding an adc input ?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests