Atmega32, ADC and IO on port A

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey guys,
One quick question, that I haven't been able to find an answer to:
If I activate the analogue -> Digital converter on my Atmega 32 chip, and read a value on port ADC0 (Also pin PA0).. can I then still use the remaining pins on port A (PA1 -> PA7) for regular IO for switches, LED's and what not?
(Or does all pins in port A switch to the "alternate function" when I enable the ADC?)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
...can I then still use the remaining pins on port A (PA1 -> PA7) for regular IO for switches, LED's and what not?
Yes, but don't output anything during a conversion or you could get crosstalk on the ADC pin .

Also see the digital input disable register in the datasheet, for that MCU .

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, thanks! :-)
I'm amazed how much those chips can do..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would clarify that slightly and say don't change the state of any of the output pins on porta while a conversion is in progress.