On Mon, Apr 25, 2011 at 1:02 AM, Prasanna Karthik V <
[email protected]> wrote:

>
> Thanks eric. That really helped. I just have one more related question,
>
> - An ADC pin, say, ADC0 [P6.0] can be used as a GPIO. Just by setting the
> appropriate bits of P6SEL, does it start working as a GPIO?
>

Normally, PxSEL is used to change a pin from being digital I/O or connect it
to
a module such as a USART etc.

But with the ADC, TI uses P6SEL to disconnect the digital I/O from any
analog
signal that might be getting applied to the ADC pins.   This is to avoid the
CMOS
circuits going nuts if the input voltage is close to the switching level.
You can
get lots of current flowing in that case.  Not good.

So if you are using the ADC pins as analog inputs to the ADC, then you
should
definitely turn the associated P6SEL on to disconnect the digitial
circuitry.

Now if you want to use the pin as digital I/O then P6SEL must be off.  You
have to set P6DIR appropriately as well depending on how you want to use
the pin.

Have you read the 1611 user manual?   You should start there.   Also the
device
specific data sheet has lots of usefull information but is a bitch to read.
 Typical
TI documentation.

-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to