|
From: | Mattias Svensson |
Subject: | Re: [avr-gcc-list] atmega16 |
Date: | Tue, 28 Dec 2004 11:33:35 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030915 |
I'll like to now some details about atmega16. Can I use some pins of Port A as Analog Inputs while some others will be used as d\ igital in/out ?Yes, but noise may be induced on an analog input if a port A output switches levels.Do you mean that coupling among the same port is somehow tighter then coupling with pins of another port? My gues would be no, but your formulation provoked this question in my mind: If one have to switch output level during the A/D conversion, are there better and worse pin assignments to choose from? My choice would be to use pins which are physically far apart but maybe somebody knows better...
The thing is that port A uses the same power supply pin for the ADC and the digital IO. That means, if you switch an port pin while running an ADC conversion, the supply for the ADC will be bumped, and result in false readings. Usually you put a filter on the analog supply for port A if you use it as analog input. This to filter out noise from the rest of the circuitry (and the AVR itself). The filter means higher impedance and if you switch the digital IO it will give even larger bumps in the supply.
/Mattias S
[Prev in Thread] | Current Thread | [Next in Thread] |